summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/DAGISelMatcher.h
Commit message (Collapse)AuthorAgeFilesLines
...
* simplify some code now that chain/flag results are not stored in Chris Lattner2010-02-281-9/+0
| | | | | | the vtlist for emitnode. llvm-svn: 97429
* enhance the EmitNode/MorphNodeTo operands to take a bit thatChris Lattner2010-02-281-9/+15
| | | | | | | | 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-12/+12
| | | | | | is just a silly wrapper around MorphNodeTo. llvm-svn: 97416
* enhance the new isel to use SelectNodeTo for most patterns,Chris Lattner2010-02-281-3/+16
| | | | | | | | | 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-5/+6
| | | | | | it will populate. llvm-svn: 97363
* add infrastructure to support forming selectnodeto. Not used yetChris Lattner2010-02-281-11/+53
| | | | | | because I have to go on another detour first. llvm-svn: 97362
* change CheckOpcodeMatcher to hold the SDNodeInfo instead ofChris Lattner2010-02-271-11/+12
| | | | | | the opcode name. This gives the optimizer more semantic info. llvm-svn: 97346
* teach the optimizer that opcode == ISD::STORE is contradictoryChris Lattner2010-02-271-0/+1
| | | | | | | | 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-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+49
| | | | | | | | | 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
* fix same bug in CheckChainCompatibleMatcher::isEqualImplChris Lattner2010-02-261-1/+1
| | | | llvm-svn: 97217
* fix a nasty bug in CheckTypeMatcher::isEqualImplChris Lattner2010-02-261-1/+1
| | | | llvm-svn: 97216
* 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. llvm-svn: 97214
* change the scope node to include a list of children to be checkedChris Lattner2010-02-251-12/+23
| | | | | | | | | 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
* factor the print method better.Chris Lattner2010-02-251-34/+34
| | | | llvm-svn: 97125
* add methods to do equality checks and get hashes of MatchersChris Lattner2010-02-251-7/+178
| | | | llvm-svn: 97123
* rename fooMatcherNode to fooMatcher.Chris Lattner2010-02-251-181/+178
| | | | llvm-svn: 97096
* rename PushMatcherNode -> ScopeMatcherNode to more accuratelyChris Lattner2010-02-251-13/+13
| | | | | | | 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-0/+21
| | | | | | x86 table by 1200 bytes. llvm-svn: 97053
* implement a simple proof-of-concept optimization forChris Lattner2010-02-241-1/+29
| | | | | | | | the new isel: fold movechild+record+moveparent into a single recordchild N node. This shrinks the X86 table from 125443 to 117502 bytes. llvm-svn: 97031
* The new isel passes all tests, time to start making it go fast.Chris Lattner2010-02-241-1/+1
| | | | | | | Also add an easy macro at the top of DAGISelEmitter.cpp to enable it. Lets see if I can avoid accidentally turning it on :) llvm-svn: 97029
* The new isel was not properly handling patterns that coveredChris Lattner2010-02-241-0/+24
| | | | | | | | | internal nodes with flag results. Record these with a new OPC_MarkFlagResults opcode and use this to update the interior nodes' flag results properly. This fixes CodeGen/X86/i256-add.ll with the new isel. llvm-svn: 97021
* add a new CheckMultiOpcode opcode for checking that a nodeChris Lattner2010-02-221-0/+21
| | | | | | | has one of the list of acceptable opcodes for a complex pattern. This fixes 4 regtest failures. llvm-svn: 96814
* implement the last known missing feature: updating uses of results Chris Lattner2010-02-211-9/+15
| | | | | | | of the matched pattern to use the newly created node results. Onto the "making it actually work" phase! llvm-svn: 96724
* Lots of improvements to the new dagisel emitter. This gets it toChris Lattner2010-02-211-17/+205
| | | | | | | | | | | | | | | | | | | the point where it is to the 95% feature complete mark, it just needs result updating to be done (then testing, optimization etc). More specificallly, this adds support for chain and flag handling on the result nodes, support for sdnodexforms, support for variadic nodes, memrefs, pinned physreg inputs, and probably lots of other stuff. In the old DAGISelEmitter, this deletes the dead code related to OperatorMap, cleans up a variety of dead stuff handling "implicit remapping" from things like globaladdr -> targetglobaladdr (which is no longer used because globaladdr always needs to be legalized), and some minor formatting fixes. llvm-svn: 96716
* add emitter support for integer constants and simple physreg references.Chris Lattner2010-02-191-1/+1
| | | | llvm-svn: 96663
* add support for referencing registers and immediates,Chris Lattner2010-02-181-32/+74
| | | | | | | building the tree to represent them but not emitting table entries for them yet. llvm-svn: 96617
* rename the child field to 'next'. This is not a parent/child Chris Lattner2010-02-181-8/+10
| | | | | | relationship, this is a linear list relationship. llvm-svn: 96561
* eliminate the MatcherNodeWithChild class, give the 'child'Chris Lattner2010-02-181-54/+42
| | | | | | field to MatcherNode. llvm-svn: 96560
* Emulate the current isel's "IsChainCompatible" logic for now.Chris Lattner2010-02-171-1/+21
| | | | | | | I'd like to eventually rip it out, but for now producing the same selections as the old matcher is more important. llvm-svn: 96458
* prefix captured value names with $ so they look likeChris Lattner2010-02-171-2/+2
| | | | | | | variables. Use the fancy OpNo variable instead of i, which has the right index including chains. llvm-svn: 96436
* improve comments on OPC_Record to say what we're recording a node.Chris Lattner2010-02-171-1/+7
| | | | llvm-svn: 96433
* make the new isel generator plop out a CheckComplexPattern functionChris Lattner2010-02-171-0/+2
| | | | | | | for evaluating complex patterns. Some cleanup has to happen before this can be used though. llvm-svn: 96419
* convert the new matcher to check intermediate nodes for a singleChris Lattner2010-02-161-21/+7
| | | | | | | | | use and only call IsProfitableToFold/IsLegalToFold on the load being folded, like the old dagiselemitter does. This substantially simplifies the code and improves opportunities for sharing. llvm-svn: 96368
* generate code for node and pattern predicates. Note that this won'tChris Lattner2010-02-161-1/+2
| | | | | | | build if enabled, it will fail with constness issues. I'll resolve these next. llvm-svn: 96336
* add support for the new isel matcher to generate Chris Lattner2010-02-161-1/+29
| | | | | | (isprofitable|islegal)tofold checks. llvm-svn: 96331
* Check in the first big step of rewriting DAGISelEmitter to Chris Lattner2010-02-151-0/+362
produce a table based matcher instead of gobs of C++ Code. Though it's not done yet, the shrinkage seems promising, the table for the X86 ISel is 75K and still has a lot of optimization to come (compare to the ~1.5M of .o generated the old way, much of which will go away). The code is currently disabled by default (the #if 0 in DAGISelEmitter.cpp). When enabled it generates a dead SelectCode2 function in the DAGISel Header which will eventually replace SelectCode. There is still a lot of stuff left to do, which are documented with a trail of FIXMEs. llvm-svn: 96215
OpenPOWER on IntegriCloud