Commit Graph

13 Commits

Author SHA1 Message Date
Chris Lattner
23cfda719e contract movechild+checktype into a new checkchild node, shrinking the
x86 table by 1200 bytes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97053 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-24 20:15:25 +00:00
Chris Lattner
19b5a7590b implement a simple proof-of-concept optimization for
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
2010-02-24 07:31:45 +00:00
Chris Lattner
02f73585f7 The new isel was not properly handling patterns that covered
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97021 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-24 05:33:42 +00:00
Chris Lattner
12a667c1e8 add a new CheckMultiOpcode opcode for checking that a node
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
2010-02-22 22:30:37 +00:00
Chris Lattner
77f2e2724d implement the last known missing feature: updating uses of results
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
2010-02-21 06:03:07 +00:00
Chris Lattner
8e946bea14 Lots of improvements to the new dagisel emitter. This gets it to
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
2010-02-21 03:22:59 +00:00
Chris Lattner
845c042734 add support for referencing registers and immediates,
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
2010-02-18 22:03:03 +00:00
Chris Lattner
bd8227f529 rename the child field to 'next'. This is not a parent/child
relationship, this is a linear list relationship.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96561 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-18 02:53:41 +00:00
Chris Lattner
8ef9c7958a eliminate the MatcherNodeWithChild class, give the 'child'
field to MatcherNode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96560 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-18 02:49:24 +00:00
Chris Lattner
9a747f1305 Emulate the current isel's "IsChainCompatible" logic for now.
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
2010-02-17 06:23:39 +00:00
Chris Lattner
21390d7984 convert the new matcher to check intermediate nodes for a single
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
2010-02-16 19:15:55 +00:00
Chris Lattner
e39650a805 add support for the new isel matcher to generate
(isprofitable|islegal)tofold checks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96331 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-16 06:10:58 +00:00
Chris Lattner
da272d1a70 Check in the first big step of rewriting DAGISelEmitter to
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
2010-02-15 08:04:42 +00:00