summaryrefslogtreecommitdiff
path: root/utils/TableGen/DAGISelMatcherOpt.cpp
Commit message (Collapse)AuthorAge
* Add OPC_CheckChildSame0-3 to the DAG isel matcher. This replaces sequences ↵Craig Topper2013-10-05
| | | | | | of MoveChild, CheckSame, MoveParent. Saves 846 bytes from the X86 DAG isel matcher, ~300 from ARM, ~840 from Hexagon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192026 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r191940 to see if it fixes the build bots.Craig Topper2013-10-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191941 91177308-0d34-0410-b5e6-96231b3b80d8
* Add OPC_CheckChildSame0-3 to the DAG isel matcher. This replaces sequences ↵Craig Topper2013-10-04
| | | | | | of MoveChild, CheckSame, MoveParent. Saves 846 bytes from the X86 DAG isel matcher, ~300 from ARM, ~840 from Hexagon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191940 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused STL header includes.Jay Foad2011-04-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130068 91177308-0d34-0410-b5e6-96231b3b80d8
* Flag -> Glue, the ongoing sagaChris Lattner2010-12-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122513 91177308-0d34-0410-b5e6-96231b3b80d8
* continue renaming flag -> glue.Chris Lattner2010-12-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122506 91177308-0d34-0410-b5e6-96231b3b80d8
* add plumbing for handling multiple result nodes Chris Lattner2010-03-24
| | | | | | | in some more places. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99366 91177308-0d34-0410-b5e6-96231b3b80d8
* don't form a RecordChild or CheckChildType for child #'s over 7, we don'tChris Lattner2010-03-16
| | | | | | | have enums for them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98597 91177308-0d34-0410-b5e6-96231b3b80d8
* turn off debug spewChris Lattner2010-03-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97912 91177308-0d34-0410-b5e6-96231b3b80d8
* more factoring.Chris Lattner2010-03-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97911 91177308-0d34-0410-b5e6-96231b3b80d8
* teach tblgen to be more aggressive when factoring CheckType nodes.Chris Lattner2010-03-07
| | | | | | | | | | | | | | | | | | | | | | | Now it will factor things like this: CheckType i32 ... CheckOpcode ISD::AND CheckType i64 ... into: SwitchType: i32: ... i64: CheckOpcode ISD::AND ... This shrinks hte table by a few bytes, nothing spectacular. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97908 91177308-0d34-0410-b5e6-96231b3b80d8
* introduce a new SwitchTypeMatcher node (which is analogous toChris Lattner2010-03-03
| | | | | | | | | SwitchOpcodeMatcher) and have DAGISelMatcherOpt form it. This speeds up selection, particularly for X86 which has lots of variants of instructions with only type differences. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97645 91177308-0d34-0410-b5e6-96231b3b80d8
* resolve a fixme by having the .td file parser reject thigns likeChris Lattner2010-03-01
| | | | | | | | | (set GPR, somecomplexpattern) if somecomplexpattern doesn't declare what it can match. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97513 91177308-0d34-0410-b5e6-96231b3b80d8
* remove dead code, simplify.Chris Lattner2010-03-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97510 91177308-0d34-0410-b5e6-96231b3b80d8
* tolerate factoring the *last* node for CellSPU.Chris Lattner2010-03-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97508 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate the CheckMultiOpcodeMatcher code and have each Chris Lattner2010-03-01
| | | | | | | | | | 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-01
| | | | | | | | | | | | | | 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-01
| | | | | | | | | 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-01
| | | | | | | 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-01
| | | | | | | | | | | | 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
* simplify some code now that chain/flag results are not stored in Chris Lattner2010-02-28
| | | | | | | the vtlist for emitnode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97429 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance the EmitNode/MorphNodeTo operands to take a bit thatChris Lattner2010-02-28
| | | | | | | | | 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-28
| | | | | | | 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-28
| | | | | | | | | | 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-28
| | | | | | | 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-28
| | | | | | | 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
* change CheckOpcodeMatcher to hold the SDNodeInfo instead ofChris Lattner2010-02-27
| | | | | | | 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
* fix logic in DEBUG.Chris Lattner2010-02-27
| | | | 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-27
| | | | | | | | | | 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-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* implement a new optimization to sink pattern predicates (like isSSE1) Chris Lattner2010-02-27
| | | | | | | | | | 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
* switch from my nice hashtable based merging solution to aChris Lattner2010-02-26
| | | | | | | | | 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
* finish off the factoring optimization along the lines of the Chris Lattner2010-02-26
| | | | | | | | | | | 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
* change the scope node to include a list of children to be checkedChris Lattner2010-02-25
| | | | | | | | | | 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-25
| | | | | | | | | | | 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
* rename fooMatcherNode to fooMatcher.Chris Lattner2010-02-25
| | | | 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-25
| | | | 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-25
| | | | | | | | 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
* contract movechild+checktype into a new checkchild node, shrinking theChris Lattner2010-02-24
| | | | | | | 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-24
| | | | | | | | | 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
* implement a simple proof-of-concept optimization forChris Lattner2010-02-24
| | | | | | | | | 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
* The new isel passes all tests, time to start making it go fast.Chris Lattner2010-02-24
Also add an easy macro at the top of DAGISelEmitter.cpp to enable it. Lets see if I can avoid accidentally turning it on :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97029 91177308-0d34-0410-b5e6-96231b3b80d8