summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Sort the #include lines for utils/...Chandler Carruth2012-12-041-1/+1
| | | | | | | I've tried to find main moudle headers where possible, but the TableGen stuff may warrant someone else looking at it. llvm-svn: 169251
* Add 'virtual' keywoards to output file for overridden functions.Craig Topper2012-09-161-5/+6
| | | | llvm-svn: 164002
* TblGen: Tweak to pretty-print DAGISel.inc a bit better.Jim Grosbach2012-07-181-2/+2
| | | | llvm-svn: 160463
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-051-6/+5
| | | | llvm-svn: 149814
* Move TableGen's parser and entry point into a libraryPeter Collingbourne2011-10-011-1/+1
| | | | | | This is the first step towards splitting LLVM and Clang's tblgen executables. llvm-svn: 140951
* Rework our internal representation of node predicates to expose moreChris Lattner2011-04-171-27/+19
| | | | | | | | structure and fix some fixmes. We now have a TreePredicateFn class that handles all of the decoding of these things. This is an internal cleanup that has no impact on the code generated by tblgen. llvm-svn: 129670
* Teach TableGen to pre-calculate register enum values when creating theJim Grosbach2011-03-111-23/+16
| | | | | | | | | | | CodeGenRegister entries. Use this information to more intelligently build the literal register entires in the DAGISel matcher table. Specifically, use a single-byte OPC_EmitRegister entry for registers with a value of less than 256 and OPC_EmitRegister2 entry for registers with a larger value. rdar://9066491 llvm-svn: 127456
* trailing whitespace.Jim Grosbach2011-03-011-79/+79
| | | | llvm-svn: 126733
* Generalize the register matching code in DAGISel a bit.Jim Grosbach2011-03-011-19/+39
| | | | llvm-svn: 126731
* flags -> glue for selectiondagChris Lattner2010-12-231-4/+4
| | | | llvm-svn: 122509
* sdisel flag -> glue.Chris Lattner2010-12-231-2/+2
| | | | llvm-svn: 122507
* continue renaming flag -> glue.Chris Lattner2010-12-231-5/+5
| | | | llvm-svn: 122506
* Rework passing parent pointers into complexpatterns, I forgotChris Lattner2010-09-211-2/+3
| | | | | | | | that complex patterns are matched after the entire pattern has a structural match, therefore the NodeStack isn't in a useful state when the actual call to the matcher happens. llvm-svn: 114489
* just like they can opt into getting the root of the pattern beingChris Lattner2010-09-211-1/+6
| | | | | | | matched, allow ComplexPatterns to opt into getting the parent node of the operand being matched. llvm-svn: 114472
* fix a long standing wart: all the ComplexPattern's were beingChris Lattner2010-09-211-1/+7
| | | | | | | | | | | passed the root of the match, even though only a few patterns actually needed this (one in X86, several in ARM [which should be refactored anyway], and some in CellSPU that I don't feel like detangling). Instead of requiring all ComplexPatterns to take the dead root, have targets opt into getting the root by putting SDNPWantRoot on the ComplexPattern. llvm-svn: 114471
* Moar words!Eric Christopher2010-08-061-1/+1
| | | | llvm-svn: 110422
* generate better code in CheckComplexPatternChris Lattner2010-06-141-2/+3
| | | | llvm-svn: 105970
* print the complexity of the pattern being matched in theChris Lattner2010-03-291-9/+10
| | | | | | comment in the generated table. llvm-svn: 99794
* add an optimized form of OPC_EmitMergeInputChains for the 1, 0 and Chris Lattner2010-03-281-0/+7
| | | | | | | 1, 1 cases which are by-far the most frequent. This shrinks the X86 isel table from 77014 -> 74657 bytes. llvm-svn: 99740
* fix a bug in my recent patch that increased opcode size to 2 bytes:Chris Lattner2010-03-271-9/+13
| | | | | | | the index comments nested under OPC_SwitchOpcode were off by one. This fixes the comments. llvm-svn: 99722
* Change tblgen to emit FOOISD opcode names as twoChris Lattner2010-03-251-10/+11
| | | | | | | | | | | | | | bytes instead of one byte. This is important because we're running up to too many opcodes to fit in a byte and it is aggrevated by FIRST_TARGET_MEMORY_OPCODE making the numbering sparse. This just bites the bullet and bloats out the table. In practice, this increases the size of the x86 isel table from 74.5K to 76K. I think we'll cope :) This fixes rdar://7791648 llvm-svn: 99494
* add plumbing for handling multiple result nodes Chris Lattner2010-03-241-0/+2
| | | | | | in some more places. llvm-svn: 99366
* so hey, it turns out that the histogram was completely wrong, becauseChris Lattner2010-03-041-10/+32
| | | | | | | we sometimes emit nodes multiple times to string buffers to size them. Compute the histogram correctly. llvm-svn: 97708
* change the new isel matcher to emit ComplexPattern matchesChris Lattner2010-03-041-6/+8
| | | | | | | | | | as the very last thing before node emission. This should dramatically reduce the number of times we do 'MatchAddress' on X86, speeding up compile time. This also improves comments in the tables and shrinks the table a bit, now down to 80506 bytes for x86. llvm-svn: 97703
* enhance comment output to specify what recorded slotChris Lattner2010-03-041-2/+5
| | | | | | numbers a ComplexPat will match into. llvm-svn: 97696
* introduce a new SwitchTypeMatcher node (which is analogous toChris Lattner2010-03-031-10/+35
| | | | | | | | SwitchOpcodeMatcher) and have DAGISelMatcherOpt form it. This speeds up selection, particularly for X86 which has lots of variants of instructions with only type differences. llvm-svn: 97645
* Rewrite chain handling validation and input TokenFactor handlingChris Lattner2010-03-021-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | stuff now that we don't care about emulating the old broken behavior of the old isel. This eliminates the 'CheckChainCompatible' check (along with IsChainCompatible) which did an incorrect and inefficient scan *up* the chain nodes which happened as the pattern was being formed and does the validation at the end in HandleMergeInputChains when it forms a structural pattern. This scans "down" the graph, which means that it is quickly bounded by nodes already selected. This also handles token factors that get "trapped" in the dag. Removing the CheckChainCompatible nodes also shrinks the generated tables by about 6K for X86 (down to 83K). There are two pieces remaining before I can nuke PreprocessRMW: 1. I xfailed a test because we're now producing worse code in a case that has nothing to do with the change: it turns out that our use of MorphNodeTo will leave dead nodes in the graph which (depending on how the graph is walked) end up causing bogus uses of chains and blocking matches. This is really bad for other reasons, so I'll fix this in a follow-up patch. 2. CheckFoldableChainNode needs to be improved to handle the TF. llvm-svn: 97539
* add some missing \n'sChris Lattner2010-03-021-11/+19
| | | | llvm-svn: 97527
* fixme resolved.Chris Lattner2010-03-011-3/+0
| | | | llvm-svn: 97517
* remove a little hack I did for the old isel, not neededChris Lattner2010-03-011-4/+0
| | | | | | now that it is gone. llvm-svn: 97516
* Missed a \n in previous commit.Torok Edwin2010-03-011-0/+1
| | | | llvm-svn: 97472
* Add command-line flag to tblgen to turn off generating comments for the newTorok Edwin2010-03-011-57/+117
| | | | | | | isel (defaults it to generate comments). This reduces the size of the generated source file. llvm-svn: 97470
* eliminate the CheckMultiOpcodeMatcher code and have each Chris Lattner2010-03-011-11/+1
| | | | | | | | | ComplexPattern at the root be generated multiple times, once for each opcode they are part of. This encourages factoring because the opcode checks get treated just like everything else in the matcher. llvm-svn: 97439
* add a new OPC_SwitchOpcode which is semantically equivalentChris Lattner2010-03-011-2/+50
| | | | | | | | | | | | to a scope where every child starts with a CheckOpcode, but executes more efficiently. Enhance DAGISelMatcherOpt to form it. This also fixes a bug in CheckOpcode: apparently the SDNodeInfo objects are not pointer comparable, we have to compare the enum name. llvm-svn: 97438
* enhance RecordNode and RecordChild comments to indicate whatChris Lattner2010-03-011-2/+4
| | | | | | slot they're recording into, no functionality change. llvm-svn: 97433
* inline the node transforms and node predicates into the generatedChris Lattner2010-03-011-13/+56
| | | | | | | | dispatcher method. This eliminates the dependence of the new isel's generated code on the old isel's predicates, however some random hand written isel code still uses them. llvm-svn: 97431
* simplify some code now that chain/flag results are not stored in Chris Lattner2010-02-281-1/+1
| | | | | | the vtlist for emitnode. llvm-svn: 97429
* don't emit useless functions. These were producingChris Lattner2010-02-281-47/+56
| | | | | | warnings in release-assert builds if there were no cases. llvm-svn: 97428
* change a few opcodes to use VBRs instead of embeddingChris Lattner2010-02-281-60/+15
| | | | | | immediate sizes into the opcode. llvm-svn: 97423
* enhance the EmitNode/MorphNodeTo operands to take a bit thatChris Lattner2010-02-281-1/+2
| | | | | | | | specifies whether there is an output flag or not. Use this instead of redundantly encoding the chain/flag results in the output vtlist. llvm-svn: 97419
* use MorphNodeTo instead of SelectNodeTo. SelectNodeToChris Lattner2010-02-281-4/+4
| | | | | | is just a silly wrapper around MorphNodeTo. llvm-svn: 97416
* enhance the new isel to use SelectNodeTo for most patterns,Chris Lattner2010-02-281-6/+11
| | | | | | | | | even some the old isel didn't. There are several parts of this that make me feel dirty, but it's no worse than the old isel. I'll clean up the parts I can do without ripping out the old one next. llvm-svn: 97415
* enhance EmitNodeMatcher to keep track of the recorded slot numbersChris Lattner2010-02-281-1/+15
| | | | | | it will populate. llvm-svn: 97363
* add infrastructure to support forming selectnodeto. Not used yetChris Lattner2010-02-281-3/+6
| | | | | | because I have to go on another detour first. llvm-svn: 97362
* change CheckOpcodeMatcher to hold the SDNodeInfo instead ofChris Lattner2010-02-271-5/+5
| | | | | | the opcode name. This gives the optimizer more semantic info. llvm-svn: 97346
* add some helpful comments to the emitterChris Lattner2010-02-261-0/+6
| | | | llvm-svn: 97219
* change the scope node to include a list of children to be checkedChris Lattner2010-02-251-48/+62
| | | | | | | | | instead of to have a chained series of scope nodes. This makes the generated table smaller, improves the efficiency of the interpreter, and make the factoring optimization much more reasonable to implement. llvm-svn: 97160
* formatting.Chris Lattner2010-02-251-6/+3
| | | | llvm-svn: 97097
* rename fooMatcherNode to fooMatcher.Chris Lattner2010-02-251-109/+108
| | | | llvm-svn: 97096
* rename PushMatcherNode -> ScopeMatcherNode to more accuratelyChris Lattner2010-02-251-9/+9
| | | | | | | reflect what it does. Switch the sense of the Next and the Check arms to be more logical. No functionality change. llvm-svn: 97093
OpenPOWER on IntegriCloud