- 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: 10810
-
- 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
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: 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: 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
-
Alkis Evlogimenos authored
register so that LiveVariable analysis is not confused. llvm-svn: 10773
-
Chris Lattner authored
* Implement SCCP of load instructions, implementing Transforms/SCCP/loadtest.ll This allows us to fold expressions like "foo"[2], even if the pointer is only a conditional constant. llvm-svn: 10767
-
Chris Lattner authored
from constant memory is, but lets not take chances. llvm-svn: 10765
-
Chris Lattner authored
llvm-svn: 10763
-
Chris Lattner authored
case that the C/C++ front-end generates. llvm-svn: 10761
-
Chris Lattner authored
llvm-svn: 10759
-
Chris Lattner authored
llvm-svn: 10757
-
Chris Lattner authored
llvm-svn: 10756
-
- Jan 11, 2004
-
-
Alkis Evlogimenos authored
LiveVariables::HandlePhysRegDef private they use information that is not in memory when LiveVariables finishes the analysis. Also update the TwoAddressInstructionPass to not use this interface. llvm-svn: 10755
-
Chris Lattner authored
The first change (which is disabled) compactifies all of the function constant pools into the global constant pool, in an attempt to reduce the amount of duplication and overhead. Unfortunately, as the comment indicates, this is not yet a win, so it is disabled. The second change sorts the typeid's so that those types that can be used by instructions in the program appear earlier in the table than those that cannot (such as structures and arrays). This causes the instructions to be able to use the dense encoding more often, saving about 5K on 254.gap. This is only a .65% savings though, unfortunately. :( llvm-svn: 10754
-
- Jan 10, 2004
-
-
Chris Lattner authored
llvm-svn: 10753
-