aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/DAGISelMatcherEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* really fix an off-by-one errorChris Lattner2010-02-231-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96845 91177308-0d34-0410-b5e6-96231b3b80d8
* switch the value# in OPC_CompleteMatch and OPC_EmitNode to use aChris Lattner2010-02-231-5/+29
| | | | | | | VBR encoding for the insanity being perpetrated by the spu backend. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96843 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new Push2 opcode for targets (like cellspu) which haveChris Lattner2010-02-221-5/+18
| | | | | | | | | ridiculously ginormous patterns and need more than one byte of displacement for encodings. This fixes CellSPU/fdiv.ll. SPU is still doing something else ridiculous though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96833 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new CheckMultiOpcode opcode for checking that a nodeChris Lattner2010-02-221-0/+9
| | | | | | | | has one of the list of acceptable opcodes for a complex pattern. This fixes 4 regtest failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96814 91177308-0d34-0410-b5e6-96231b3b80d8
* emit table indexes before each row so that it is debuggable.Chris Lattner2010-02-211-7/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96730 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a table size miscomputation, target opcodes are 2 bytes.Chris Lattner2010-02-211-1/+1
| | | | | | | | With this, the matcher actually works reasonably well, but crashes on larger examples in the scheduler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96727 91177308-0d34-0410-b5e6-96231b3b80d8
* emit to the right streams, to avoid emitting the pushChris Lattner2010-02-211-15/+16
| | | | | | | body before the push. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96726 91177308-0d34-0410-b5e6-96231b3b80d8
* implement the last known missing feature: updating uses of results Chris Lattner2010-02-211-5/+11
| | | | | | | | | of the matched pattern to use the newly created node results. Onto the "making it actually work" phase! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96724 91177308-0d34-0410-b5e6-96231b3b80d8
* Lots of improvements to the new dagisel emitter. This gets it toChris Lattner2010-02-211-18/+126
| | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96716 91177308-0d34-0410-b5e6-96231b3b80d8
* add emitter support for integer constants and simple physreg references.Chris Lattner2010-02-191-3/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96663 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for referencing registers and immediates,Chris Lattner2010-02-181-2/+7
| | | | | | | | | building the tree to represent them but not emitting table entries for them yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96617 91177308-0d34-0410-b5e6-96231b3b80d8
* start sketching out the structure of code for result emission generation.Chris Lattner2010-02-181-0/+3
| | | | | | | Nothing real here yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96575 91177308-0d34-0410-b5e6-96231b3b80d8
* rename the child field to 'next'. This is not a parent/child Chris Lattner2010-02-181-12/+12
| | | | | | | relationship, this is a linear list relationship. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96561 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate the MatcherNodeWithChild class, give the 'child'Chris Lattner2010-02-181-5/+3
| | | | | | | field to MatcherNode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96560 91177308-0d34-0410-b5e6-96231b3b80d8
* improve comments, the matcher is now feature complete, on to codegen.Chris Lattner2010-02-171-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96464 91177308-0d34-0410-b5e6-96231b3b80d8
* Emulate the current isel's "IsChainCompatible" logic for now.Chris Lattner2010-02-171-0/+4
| | | | | | | | I'd like to eventually rip it out, but for now producing the same selections as the old matcher is more important. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96458 91177308-0d34-0410-b5e6-96231b3b80d8
* improve comments on OPC_Record to say what we're recording a node.Chris Lattner2010-02-171-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96433 91177308-0d34-0410-b5e6-96231b3b80d8
* improve comments in generated matcher a bit.Chris Lattner2010-02-171-12/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96422 91177308-0d34-0410-b5e6-96231b3b80d8
* make the new isel generator plop out a CheckComplexPattern functionChris Lattner2010-02-171-2/+40
| | | | | | | | for evaluating complex patterns. Some cleanup has to happen before this can be used though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96419 91177308-0d34-0410-b5e6-96231b3b80d8
* convert the new matcher to check intermediate nodes for a singleChris Lattner2010-02-161-5/+2
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96368 91177308-0d34-0410-b5e6-96231b3b80d8
* generate code for node and pattern predicates. Note that this won'tChris Lattner2010-02-161-11/+58
| | | | | | | | build if enabled, it will fail with constness issues. I'll resolve these next. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96336 91177308-0d34-0410-b5e6-96231b3b80d8
* refactor some code into a local class.Chris Lattner2010-02-161-14/+22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96334 91177308-0d34-0410-b5e6-96231b3b80d8
* add support for the new isel matcher to generate Chris Lattner2010-02-161-0/+6
| | | | | | | (isprofitable|islegal)tofold checks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96331 91177308-0d34-0410-b5e6-96231b3b80d8
* Check in the first big step of rewriting DAGISelEmitter to Chris Lattner2010-02-151-0/+217
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96215 91177308-0d34-0410-b5e6-96231b3b80d8