- Jan 13, 2004
-
-
Chris Lattner authored
testcase test/Regression/Assembler/ConstantExprFold.llx Note that these kinds of things only rarely show up in source code, but are exceedingly common in the intermediate stages of algorithms like SCCP. By folding things (especially relational operators) that use symbolic constants, we are able to speculatively fold more conditional branches, which can lead to some big simplifications. It would be easy to add a lot more special cases here, so if you notice SCCP missing anything "obvious", you know what to make smarter. :) llvm-svn: 10812
-
Chris Lattner authored
llvm-svn: 10811
-
Chris Lattner authored
llvm-svn: 10810
-
Chris Lattner authored
llvm-svn: 10809
-
- Jan 12, 2004
-
-
Chris Lattner authored
llvm-svn: 10808
-
Chris Lattner authored
Move a bunch of (now) private stuff from ConstantFolding.h into ConstantFolding.cpp. This _finally_ gets us to a place where we have a sane constant folder. The rules are: 1. LLVM clients now use ConstantExpr::get* methods to fold constants. If they cannot be folded, a constantexpr is created, so these methods always return valid Constant*'s. 2. The implementation of ConstantExpr::get* uses the functions exposed by ConstantFolding.h to try to fold constants. If they cannot be folded, they should return a null pointer. 3. The implementation of ConstantFolding can do whatever it wants, and only has one client (Constants.cpp) This cuts down on the wierd dependencies, and eliminates the two interfaces. The old constanthandling interface was especially bad for clients to use because almost none of them took the failure condition into consideration, thus leading to obscure problems. llvm-svn: 10807
-
Chris Lattner authored
this whole refactoring: allow constant folding methods to return something other than predefined classes, allow them to return generic Constant*'s. llvm-svn: 10806
-
Chris Lattner authored
llvm-svn: 10805
-
Chris Lattner authored
llvm-svn: 10804
-
Chris Lattner authored
operator constant folding stuff. llvm-svn: 10803
-
Chris Lattner authored
llvm-svn: 10802
-
Chris Lattner authored
llvm-svn: 10801
-
Chris Lattner authored
llvm-svn: 10800
-
Chris Lattner authored
llvm-svn: 10799
-
Chris Lattner authored
llvm-svn: 10798
-
Chris Lattner authored
llvm-svn: 10797
-
Chris Lattner authored
llvm-svn: 10796
-
Chris Lattner authored
llvm-svn: 10795
-
Chris Lattner authored
llvm-svn: 10794
-
Chris Lattner authored
llvm-svn: 10793
-
Chris Lattner authored
llvm-svn: 10792
-
Chris Lattner authored
llvm-svn: 10791
-
Chris Lattner authored
llvm-svn: 10790
-
Chris Lattner authored
llvm-svn: 10789
-
Chris Lattner authored
llvm-svn: 10788
-
Chris Lattner authored
llvm-svn: 10787
-
Chris Lattner authored
llvm-svn: 10786
-
Chris Lattner authored
llvm-svn: 10785
-
Chris Lattner authored
llvm-svn: 10784
-
Chris Lattner authored
llvm-svn: 10783
-
Chris Lattner authored
llvm-svn: 10782
-
Chris Lattner authored
llvm-svn: 10781
-
Chris Lattner authored
llvm-svn: 10780
-
Chris Lattner authored
llvm-svn: 10779
-
Chris Lattner authored
constants as being "true" when evaluating branches. This was introduced because we now create constantexprs for the constants instead of failing the fold. llvm-svn: 10778
-
Chris Lattner authored
llvm-svn: 10777
-
John Criswell authored
binary and YACC as bison -y. llvm-svn: 10776
-
John Criswell authored
YACC as bison -y. In this way, we ensure that bison is being used, but the Makefiles have macros for using bison itself and for getting bison to act like it is traditional yacc. llvm-svn: 10774
-
Alkis Evlogimenos authored
register so that LiveVariable analysis is not confused. llvm-svn: 10773
-
Chris Lattner authored
llvm-svn: 10770
-