Commit Graph

54 Commits

Author SHA1 Message Date
Chris Lattner f8695c1ee9 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.

llvm-svn: 96368
2010-02-16 19:15:55 +00:00
Chris Lattner 5ce8303950 generate code for node and pattern predicates. Note that this won't
build if enabled, it will fail with constness issues. I'll resolve 
these next.

llvm-svn: 96336
2010-02-16 07:21:10 +00:00
Chris Lattner aa7d3e096b add support for the new isel matcher to generate
(isprofitable|islegal)tofold checks.

llvm-svn: 96331
2010-02-16 06:10:58 +00:00
Chris Lattner b02cdaaa9c 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.

llvm-svn: 96215
2010-02-15 08:04:42 +00:00