summaryrefslogtreecommitdiffstats
path: root/utils/TableGen
Commit message (Collapse)AuthorAgeFilesLines
* Teach tablegen to reassociate operators when possible. This allows it toChris Lattner2005-09-291-10/+96
| | | | | | | find all of teh pattern matches for EQV from one definition git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23529 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach tblgen to build permutations of instructions, so that the target authorChris Lattner2005-09-292-6/+193
| | | | | | | | | | | | doesn't have to specify them manually. It currently handles associativity, e.g. knowing that (X*Y)+Z also matches X+(Y*Z) and will be extended in the future. It is smart enough to not introduce duplicate patterns or patterns that can never match. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23526 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for an associative markerChris Lattner2005-09-282-5/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23502 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit an error if instructions or patterns are defined but can never match.Chris Lattner2005-09-282-3/+52
| | | | | | | | | | | | | | | | Currently we check that immediate values live on the RHS of commutative operators. Defining ORI like this, for example: def ORI : DForm_4<24, (ops GPRC:$dst, GPRC:$src1, u16imm:$src2), "ori $dst, $src1, $src2", [(set GPRC:$dst, (or immZExt16:$src2, GPRC:$src1))]>; results in: tblgen: In ORI: Instruction can never match: Immediate values must be on the RHS of commutative operators! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23501 91177308-0d34-0410-b5e6-96231b3b80d8
* collect commutativity informationChris Lattner2005-09-282-0/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23499 91177308-0d34-0410-b5e6-96231b3b80d8
* Prefer cheaper patterns to more expensive ones. Print the costs to the ↵Chris Lattner2005-09-281-39/+50
| | | | | | | | | generated file git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23492 91177308-0d34-0410-b5e6-96231b3b80d8
* Select Constant nodes to TargetConstant nodesChris Lattner2005-09-281-5/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23488 91177308-0d34-0410-b5e6-96231b3b80d8
* memoize the assert resultsChris Lattner2005-09-261-2/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23457 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit the switch stmt cases in alphabetical order instead of pointer order,Chris Lattner2005-09-261-4/+19
| | | | | | | which is not stable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23456 91177308-0d34-0410-b5e6-96231b3b80d8
* implement a fixme: only select values once, even if used multiple times.Chris Lattner2005-09-261-5/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23454 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix VC++ build errors.Jeff Cohen2005-09-251-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23431 91177308-0d34-0410-b5e6-96231b3b80d8
* memoize translationsChris Lattner2005-09-241-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23419 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the DAG isel generator to emit code that creates nodes.Chris Lattner2005-09-242-18/+110
| | | | | | | Fix a few corner cases parsing things like (i32 imm:$foo) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23417 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit better code (no more copies for var references), and support DAG patternsChris Lattner2005-09-232-8/+25
| | | | | | | (e.g. things like rotates). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23416 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a fixme by passing around SDOperand's instead of SDNode*'sChris Lattner2005-09-231-15/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23415 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit code that matches the incoming DAG pattern and checks predicates.Chris Lattner2005-09-232-4/+64
| | | | | | | | | | This does not check that types match yet, but PPC only has one integer type ;-). This also doesn't have the code to build the resultant dag. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23414 91177308-0d34-0410-b5e6-96231b3b80d8
* emit information about the order patterns are to be matched.Chris Lattner2005-09-232-1/+60
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23413 91177308-0d34-0410-b5e6-96231b3b80d8
* start filling in the switch stmtChris Lattner2005-09-232-2/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23412 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a minor bug, add commentsChris Lattner2005-09-161-2/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23370 91177308-0d34-0410-b5e6-96231b3b80d8
* teach the type inference code how to infer types for instructions and nodeChris Lattner2005-09-152-33/+66
| | | | | | | | xforms. Run type inference on result patterns, so we always have fully typed results (and to catch errors in .td files). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23369 91177308-0d34-0410-b5e6-96231b3b80d8
* put instructions into a map instead of a vector for quick lookupChris Lattner2005-09-152-7/+18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23368 91177308-0d34-0410-b5e6-96231b3b80d8
* when parsing instructions remember information about the types taken andChris Lattner2005-09-152-7/+25
| | | | | | | returned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23367 91177308-0d34-0410-b5e6-96231b3b80d8
* Start parsing "Pattern" nodesChris Lattner2005-09-151-11/+52
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23365 91177308-0d34-0410-b5e6-96231b3b80d8
* rename a couple of methods, add structure for pattern parsingChris Lattner2005-09-152-17/+29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23364 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify that xform functions only occur in logical placesChris Lattner2005-09-141-5/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23363 91177308-0d34-0410-b5e6-96231b3b80d8
* Promote xform fns to be explicit nodes in result patterns, and clean offChris Lattner2005-09-141-1/+15
| | | | | | | predicates since they will have already matched at this point. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23362 91177308-0d34-0410-b5e6-96231b3b80d8
* start building the instruction dest pattern correctly. Change the xformChris Lattner2005-09-142-15/+27
| | | | | | | | functions to preserve the Record for the xform instead of making it into a function name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23361 91177308-0d34-0410-b5e6-96231b3b80d8
* catch unnamed inputsChris Lattner2005-09-141-1/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23360 91177308-0d34-0410-b5e6-96231b3b80d8
* check that there are no unexpected operandsChris Lattner2005-09-141-3/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23359 91177308-0d34-0410-b5e6-96231b3b80d8
* force all instruction operands to be named.Chris Lattner2005-09-142-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23358 91177308-0d34-0410-b5e6-96231b3b80d8
* Check that operands have unique names. REJECT instructions with broken operandChris Lattner2005-09-141-29/+39
| | | | | | | lists: only don't parse them if they are entirely missing (sparcv9). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23355 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a broke range checkChris Lattner2005-09-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23354 91177308-0d34-0410-b5e6-96231b3b80d8
* Parse significantly more of the instruction pattern, now collecting andChris Lattner2005-09-142-46/+141
| | | | | | | verifying information about the operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23353 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify that set destinations occur first in the instruction operand list.Chris Lattner2005-09-141-2/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23351 91177308-0d34-0410-b5e6-96231b3b80d8
* add an accessorChris Lattner2005-09-141-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23349 91177308-0d34-0410-b5e6-96231b3b80d8
* remove some code that isn't ready for prime timeChris Lattner2005-09-142-6/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23346 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch to a slightly more structured representation for instructionsChris Lattner2005-09-142-8/+24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23345 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some more checking/verification codeChris Lattner2005-09-141-2/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23344 91177308-0d34-0410-b5e6-96231b3b80d8
* start parsing instructions into patterns, start doing many more checks ofChris Lattner2005-09-142-4/+61
| | | | | | | 'set's. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23343 91177308-0d34-0410-b5e6-96231b3b80d8
* don't emit the namespace inside the class!Chris Lattner2005-09-131-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23341 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit code suitable for emission into the ISel class, allowing us to use/defineChris Lattner2005-09-131-4/+4
| | | | | | | methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23340 91177308-0d34-0410-b5e6-96231b3b80d8
* continue xform function parsingChris Lattner2005-09-132-1/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23338 91177308-0d34-0410-b5e6-96231b3b80d8
* Start parsing node transformation informationChris Lattner2005-09-132-6/+46
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23337 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new Record::getValueAsCode method to mirror the other getValueAs*Chris Lattner2005-09-133-11/+20
| | | | | | | methods. Use it to simplify some code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23336 91177308-0d34-0410-b5e6-96231b3b80d8
* completely eliminate TreePattern::PatternTypeChris Lattner2005-09-132-80/+42
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23335 91177308-0d34-0410-b5e6-96231b3b80d8
* RegenerateChris Lattner2005-09-123-1193/+1642
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23311 91177308-0d34-0410-b5e6-96231b3b80d8
* Rearrange two rules, which apparently makes some versions of bison happier.Chris Lattner2005-09-121-15/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23310 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix miscellaneous Visual Studio build problems.Jeff Cohen2005-09-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23307 91177308-0d34-0410-b5e6-96231b3b80d8
* add an accessor to provide more checkingChris Lattner2005-09-092-5/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23289 91177308-0d34-0410-b5e6-96231b3b80d8
* use new accessors to simplify code. Add checking to make sure top-level instrChris Lattner2005-09-091-4/+12
| | | | | | | definitions are void git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23288 91177308-0d34-0410-b5e6-96231b3b80d8