summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/DAGISelMatcherOpt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use unique_ptr to remove explicit delete.Craig Topper2014-12-151-4/+3
| | | | llvm-svn: 224224
* Make StringSet::insert return pair<iterator, bool> like other ↵David Blaikie2014-11-191-1/+1
| | | | | | | | | | | | self-associative containers StringSet is still a bit dodgy in that it exposes the raw iterator of the StringMap parent, which exposes the weird detail that StringSet actually has a 'value'... but anyway, this is useful for a handful of clients that want to reference the newly inserted/persistent string data in the StringSet/Map/Entry/thing. llvm-svn: 222302
* Fix typos in comments, NFCRobin Morisset2014-08-291-1/+1
| | | | | | | | | | | | | | Summary: Just fixing comments, no functional change. Test Plan: N/A Reviewers: jfb Subscribers: mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D5130 llvm-svn: 216784
* Remove uses of the redundant ".reset(nullptr)" of unique_ptr, in favor of ↵David Blaikie2014-07-191-1/+1
| | | | | | | | | | | ".reset()" It's also possible to just write "= nullptr", but there's some question of whether that's as readable, so I leave it up to authors to pick which they prefer for now. If we want to discuss standardizing on one or the other, we can do that at some point in the future. llvm-svn: 213438
* [Modules] Fix potential ODR violations by sinking the DEBUG_TYPEChandler Carruth2014-04-221-1/+2
| | | | | | definition below all of the header #include lines, TableGen edition. llvm-svn: 206846
* [C++11] More 'nullptr' conversion. In some cases just using a boolean check ↵Craig Topper2014-04-151-10/+10
| | | | | | instead of comparing to nullptr. llvm-svn: 206254
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-061-7/+7
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* [C++11] Replace OwningPtr::take() with OwningPtr::release().Ahmed Charles2014-03-051-8/+8
| | | | llvm-svn: 202957
* Add CheckChildInteger to ISelMatcher operations. Removes nearly 2000 bytes ↵Craig Topper2014-02-051-1/+5
| | | | | | from X86 matcher table. llvm-svn: 200821
* Use ArrayRef to simplify some code.Craig Topper2014-01-211-6/+5
| | | | llvm-svn: 199712
* Add OPC_CheckChildSame0-3 to the DAG isel matcher. This replaces sequences ↵Craig Topper2013-10-051-1/+5
| | | | | | of MoveChild, CheckSame, MoveParent. Saves 846 bytes from the X86 DAG isel matcher, ~300 from ARM, ~840 from Hexagon. llvm-svn: 192026
* Revert r191940 to see if it fixes the build bots.Craig Topper2013-10-041-5/+1
| | | | llvm-svn: 191941
* Add OPC_CheckChildSame0-3 to the DAG isel matcher. This replaces sequences ↵Craig Topper2013-10-041-1/+5
| | | | | | of MoveChild, CheckSame, MoveParent. Saves 846 bytes from the X86 DAG isel matcher, ~300 from ARM, ~840 from Hexagon. llvm-svn: 191940
* Remove unused STL header includes.Jay Foad2011-04-231-1/+0
| | | | llvm-svn: 130068
* Flag -> Glue, the ongoing sagaChris Lattner2010-12-231-1/+1
| | | | llvm-svn: 122513
* continue renaming flag -> glue.Chris Lattner2010-12-231-8/+8
| | | | llvm-svn: 122506
* add plumbing for handling multiple result nodes Chris Lattner2010-03-241-4/+7
| | | | | | in some more places. llvm-svn: 99366
* don't form a RecordChild or CheckChildType for child #'s over 7, we don'tChris Lattner2010-03-161-3/+5
| | | | | | have enums for them. llvm-svn: 98597
* turn off debug spewChris Lattner2010-03-071-2/+2
| | | | llvm-svn: 97912
* more factoring.Chris Lattner2010-03-071-22/+30
| | | | llvm-svn: 97911
* teach tblgen to be more aggressive when factoring CheckType nodes.Chris Lattner2010-03-071-29/+95
| | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 97908
* introduce a new SwitchTypeMatcher node (which is analogous toChris Lattner2010-03-031-11/+38
| | | | | | | | 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
* resolve a fixme by having the .td file parser reject thigns likeChris Lattner2010-03-011-1/+1
| | | | | | | | (set GPR, somecomplexpattern) if somecomplexpattern doesn't declare what it can match. llvm-svn: 97513
* remove dead code, simplify.Chris Lattner2010-03-011-10/+4
| | | | llvm-svn: 97510
* tolerate factoring the *last* node for CellSPU.Chris Lattner2010-03-011-0/+5
| | | | llvm-svn: 97508
* eliminate the CheckMultiOpcodeMatcher code and have each Chris Lattner2010-03-011-2/+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-5/+49
| | | | | | | | | | | | 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
* 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. llvm-svn: 97434
* enhance RecordNode and RecordChild comments to indicate whatChris Lattner2010-03-011-1/+2
| | | | | | slot they're recording into, no functionality change. llvm-svn: 97433
* Emit redundant opcode checks for andimm and orimm tests at rootChris Lattner2010-03-011-0/+20
| | | | | | | | | | | 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. llvm-svn: 97432
* simplify some code now that chain/flag results are not stored in Chris Lattner2010-02-281-3/+3
| | | | | | the vtlist for emitnode. llvm-svn: 97429
* enhance the EmitNode/MorphNodeTo operands to take a bit thatChris Lattner2010-02-281-3/+4
| | | | | | | | 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-13/+13
| | | | | | is just a silly wrapper around MorphNodeTo. llvm-svn: 97416
* enhance the new isel to use SelectNodeTo for most patterns,Chris Lattner2010-02-281-8/+65
| | | | | | | | | 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-3/+2
| | | | | | it will populate. llvm-svn: 97363
* add infrastructure to support forming selectnodeto. Not used yetChris Lattner2010-02-281-0/+9
| | | | | | because I have to go on another detour first. llvm-svn: 97362
* change CheckOpcodeMatcher to hold the SDNodeInfo instead ofChris Lattner2010-02-271-1/+3
| | | | | | the opcode name. This gives the optimizer more semantic info. llvm-svn: 97346
* fix logic in DEBUG.Chris Lattner2010-02-271-2/+2
| | | | llvm-svn: 97315
* teach the optimizer that opcode == ISD::STORE is contradictoryChris Lattner2010-02-271-6/+6
| | | | | | | | with getType() == MVT::i32 etc. Teach it that two different integer constants are contradictory. This cuts 1K off the X86 table, down to 98k llvm-svn: 97314
* Teach the grouper some simple tricks about looking contradictoryChris Lattner2010-02-271-12/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 97312
* implement a new optimization to sink pattern predicates (like isSSE1) Chris Lattner2010-02-271-0/+68
| | | | | | | | | 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. llvm-svn: 97305
* 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. llvm-svn: 97218
* 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! :) llvm-svn: 97215
* change the scope node to include a list of children to be checkedChris Lattner2010-02-251-17/+22
| | | | | | | | | 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
* 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. llvm-svn: 97130
* rename fooMatcherNode to fooMatcher.Chris Lattner2010-02-251-20/+20
| | | | llvm-svn: 97096
* add some noop code to push it out of my tree.Chris Lattner2010-02-251-0/+23
| | | | llvm-svn: 97094
* rename PushMatcherNode -> ScopeMatcherNode to more accuratelyChris Lattner2010-02-251-11/+10
| | | | | | | reflect what it does. Switch the sense of the Next and the Check arms to be more logical. No functionality change. llvm-svn: 97093
* contract movechild+checktype into a new checkchild node, shrinking theChris Lattner2010-02-241-4/+11
| | | | | | x86 table by 1200 bytes. llvm-svn: 97053
* 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. llvm-svn: 97051
OpenPOWER on IntegriCloud