aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen
Commit message (Collapse)AuthorAgeFilesLines
* don't emit the old sdnodexform stuff for the new isel.Chris Lattner2010-03-011-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97486 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn on the new isel by default. Here are some fun numbersChris Lattner2010-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | with a release-asserts build on x86-64-darwin10: LLC Size: Old: 15,426,852 New: 12,759,140 (down 2.7M) LLI Size: Old: 9,926,876 New: 8,864,292 (down 1.1M) X86ISelDAGToDAG.o size: Old: 1,401,232 New: 162,868 (down 1.3M) Time to build X86ISelDAGToDAG.o: Old: 67.147u 2.060s 1:09.78 New: 4.234u 0.387s 0:04.77 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97475 91177308-0d34-0410-b5e6-96231b3b80d8
* Missed a \n in previous commit.Torok Edwin2010-03-011-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97472 91177308-0d34-0410-b5e6-96231b3b80d8
* 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97470 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit type checks late instead of early, this encouragesChris Lattner2010-03-011-1/+6
| | | | | | | | structural matching code to be factored and shared this shrinks the X86 isel table from 86537 to 83890 bytes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97442 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit a redundant check for immediates at root context, e.g. (imm 0).Chris Lattner2010-03-012-2/+10
| | | | | | | | | This allows formation of OpcodeSwitch for top level patterns, in particular on X86. This saves about 1K of data space in the x86 table and makes the dispatch much more efficient. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97440 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate the CheckMultiOpcodeMatcher code and have each Chris Lattner2010-03-016-78/+46
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97439 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new OPC_SwitchOpcode which is semantically equivalentChris Lattner2010-03-014-11/+149
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97438 91177308-0d34-0410-b5e6-96231b3b80d8
* pull MarkFlagResult out from between an EmitNode/CompleteMatchChris Lattner2010-03-011-1/+17
| | | | | | | | | pair. This encourages MorphNodeTo formation, this gets us 200 more MorphNodeTo's on X86 and shrinks the table a bit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97434 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance RecordNode and RecordChild comments to indicate whatChris Lattner2010-03-014-12/+30
| | | | | | | slot they're recording into, no functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97433 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit redundant opcode checks for andimm and orimm tests at rootChris Lattner2010-03-012-0/+27
| | | | | | | | | | | | so that we get grouping at the top level. Add an optimization to reorder type check & record nodes after opcode checks. We prefer to expose tree shape matching which improves grouping and will enhance the next optimization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97432 91177308-0d34-0410-b5e6-96231b3b80d8
* inline the node transforms and node predicates into the generatedChris Lattner2010-03-014-25/+71
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97431 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify some code now that chain/flag results are not stored in Chris Lattner2010-02-283-13/+4
| | | | | | | the vtlist for emitnode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97429 91177308-0d34-0410-b5e6-96231b3b80d8
* don't emit useless functions. These were producingChris Lattner2010-02-281-47/+56
| | | | | | | warnings in release-assert builds if there were no cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97428 91177308-0d34-0410-b5e6-96231b3b80d8
* change a few opcodes to use VBRs instead of embeddingChris Lattner2010-02-281-60/+15
| | | | | | | immediate sizes into the opcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97423 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance the EmitNode/MorphNodeTo operands to take a bit thatChris Lattner2010-02-285-19/+24
| | | | | | | | | specifies whether there is an output flag or not. Use this instead of redundantly encoding the chain/flag results in the output vtlist. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97419 91177308-0d34-0410-b5e6-96231b3b80d8
* use MorphNodeTo instead of SelectNodeTo. SelectNodeToChris Lattner2010-02-284-30/+30
| | | | | | | is just a silly wrapper around MorphNodeTo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97416 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance the new isel to use SelectNodeTo for most patterns,Chris Lattner2010-02-286-28/+100
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97415 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance EmitNodeMatcher to keep track of the recorded slot numbersChris Lattner2010-02-285-11/+26
| | | | | | | it will populate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97363 91177308-0d34-0410-b5e6-96231b3b80d8
* add infrastructure to support forming selectnodeto. Not used yetChris Lattner2010-02-285-23/+79
| | | | | | | because I have to go on another detour first. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97362 91177308-0d34-0410-b5e6-96231b3b80d8
* Generalize my hack to use SDNodeInfo to find out when aChris Lattner2010-02-283-19/+55
| | | | | | | | | | node is always guaranteed to have a particular type instead of hacking in ISD::STORE explicitly. This allows us to use implied types for a broad range of nodes, even target specific ones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97355 91177308-0d34-0410-b5e6-96231b3b80d8
* The mayHaveSideEffects flag is no longer used.Dan Gohman2010-02-272-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97348 91177308-0d34-0410-b5e6-96231b3b80d8
* change CheckOpcodeMatcher to hold the SDNodeInfo instead ofChris Lattner2010-02-275-31/+32
| | | | | | | the opcode name. This gives the optimizer more semantic info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97346 91177308-0d34-0410-b5e6-96231b3b80d8
* add another case from the ppc backend. This is obviously a huge andChris Lattner2010-02-271-1/+4
| | | | | | | dissatisfying hack. TODO: Improve it. :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97317 91177308-0d34-0410-b5e6-96231b3b80d8
* fix logic in DEBUG.Chris Lattner2010-02-271-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97315 91177308-0d34-0410-b5e6-96231b3b80d8
* teach the optimizer that opcode == ISD::STORE is contradictoryChris Lattner2010-02-273-8/+18
| | | | | | | | | | with getType() == MVT::i32 etc. Teach it that two different integer constants are contradictory. This cuts 1K off the X86 table, down to 98k git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97314 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the grouper some simple tricks about looking contradictoryChris Lattner2010-02-273-12/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | predicates. For example if we have: Scope: CheckType i32 ABC CheckType f32 DEF CheckType i32 GHI Then we know that we can transform this into: Scope: CheckType i32 Scope ABC GHI CheckType f32 DEF This reorders the check for the 'GHI' predicate above the check for the 'DEF' predidate. However it is safe to do this in this situation because we know that a node cannot have both an i32 and f32 type. We're now doing more factoring that the old isel did. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97312 91177308-0d34-0410-b5e6-96231b3b80d8
* use DEBUG instead of DebugFlag directly so that thisChris Lattner2010-02-271-7/+7
| | | | | | | respects -debug-only=something-else. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97307 91177308-0d34-0410-b5e6-96231b3b80d8
* implement a new optimization to sink pattern predicates (like isSSE1) Chris Lattner2010-02-272-0/+117
| | | | | | | | | | as deeply into the pattern as we can get away with. In pratice, this means "all the way to to the emitter code, but not across ComplexPatterns". This substantially increases the amount of factoring we get. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97305 91177308-0d34-0410-b5e6-96231b3b80d8
* add some helpful comments to the emitterChris Lattner2010-02-261-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97219 91177308-0d34-0410-b5e6-96231b3b80d8
* switch from my nice hashtable based merging solution to aChris Lattner2010-02-261-66/+22
| | | | | | | | | gross little neighbor merging implementation. This one has the benefit of not violating the ordering of patterns, so it generates code that passes tests again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97218 91177308-0d34-0410-b5e6-96231b3b80d8
* fix same bug in CheckChainCompatibleMatcher::isEqualImplChris Lattner2010-02-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97217 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a nasty bug in CheckTypeMatcher::isEqualImplChris Lattner2010-02-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97216 91177308-0d34-0410-b5e6-96231b3b80d8
* finish off the factoring optimization along the lines of the Chris Lattner2010-02-261-11/+32
| | | | | | | | | | | current design. This generates a matcher that successfully runs, but it turns out that the factoring we're doing violates the ordering of patterns, so we end up matching (e.g.) movups where we want movaps. This won't due, but I'll address this in a follow on patch. It's nice to not be on by default yet! :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97215 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new setNumChildren method for resizing scopes. Tweak getHash() soChris Lattner2010-02-261-1/+11
| | | | | | | | that we never return a tombstone value, which (thankfully) triggers an assert in densemap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97214 91177308-0d34-0410-b5e6-96231b3b80d8
* change the scope node to include a list of children to be checkedChris Lattner2010-02-255-94/+124
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97160 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the first half of redundancy factoring: efficiently Chris Lattner2010-02-251-4/+89
| | | | | | | | | | | splitting all the patterns under scope nodes into equality sets based on their first node. The second step is to rewrite the graph info a form that exposes the sharing. Before I do this, I want to redesign the Scope node. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97130 91177308-0d34-0410-b5e6-96231b3b80d8
* factor the print method better.Chris Lattner2010-02-252-100/+69
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97125 91177308-0d34-0410-b5e6-96231b3b80d8
* add methods to do equality checks and get hashes of MatchersChris Lattner2010-02-252-8/+245
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97123 91177308-0d34-0410-b5e6-96231b3b80d8
* formatting.Chris Lattner2010-02-251-6/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97097 91177308-0d34-0410-b5e6-96231b3b80d8
* rename fooMatcherNode to fooMatcher.Chris Lattner2010-02-256-401/+397
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97096 91177308-0d34-0410-b5e6-96231b3b80d8
* add some noop code to push it out of my tree.Chris Lattner2010-02-251-0/+23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97094 91177308-0d34-0410-b5e6-96231b3b80d8
* rename PushMatcherNode -> ScopeMatcherNode to more accuratelyChris Lattner2010-02-255-38/+37
| | | | | | | | reflect what it does. Switch the sense of the Next and the Check arms to be more logical. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97093 91177308-0d34-0410-b5e6-96231b3b80d8
* add a fixme for an experiment that defeated me for the time being.Chris Lattner2010-02-251-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97081 91177308-0d34-0410-b5e6-96231b3b80d8
* contract movechild+checktype into a new checkchild node, shrinking theChris Lattner2010-02-244-5/+46
| | | | | | | x86 table by 1200 bytes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97053 91177308-0d34-0410-b5e6-96231b3b80d8
* split the movechild/record/moveparent -> recordchild optzn into aChris Lattner2010-02-241-16/+22
| | | | | | | | | movechild/record -> recordchild/movechild and movechild/moveparent -> noop xforms. This slightly shrinks the tables (x86 to 117454) and enables adding future improvements. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97051 91177308-0d34-0410-b5e6-96231b3b80d8
* emit a histogram of the opcodes in comments.Chris Lattner2010-02-241-2/+59
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97047 91177308-0d34-0410-b5e6-96231b3b80d8
* lets not break the old isel.Chris Lattner2010-02-241-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97034 91177308-0d34-0410-b5e6-96231b3b80d8
* Since the new instruction selector now works, I don't need to keepChris Lattner2010-02-242-8/+7
| | | | | | | | | the old one around for comparative purposes: have the ENABLE_NEW_ISEL #define (which is not enabled on mainline) stop emitting the old isel at all, yay for build time win. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97033 91177308-0d34-0410-b5e6-96231b3b80d8
* implement a simple proof-of-concept optimization forChris Lattner2010-02-245-4/+73
| | | | | | | | | the new isel: fold movechild+record+moveparent into a single recordchild N node. This shrinks the X86 table from 125443 to 117502 bytes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97031 91177308-0d34-0410-b5e6-96231b3b80d8