- Nov 15, 2004
-
-
Chris Lattner authored
llvm-svn: 17821
-
Chris Lattner authored
1. Speedup getValueState by having it not consider Arguments. It's better to just add them before we start SCCP'ing. 2. SCCP can delete the contents of dead blocks. No really, it's ok! This reduces the size of the IR for subsequent passes, even though simplifycfg would do the same job. In practice, simplifycfg does not run until much later than sccp in gccas llvm-svn: 17820
-
Chris Lattner authored
llvm-svn: 17818
-
Chris Lattner authored
class. The only changes are minor: * Do not try to SCCP instructions that return void in the rewrite loop. This is silly and fool hardy, wasting a map lookup and adding an entry to the map which is never used. * If we decide something has an undefined value, rewrite it to undef, potentially leading to further simplications. llvm-svn: 17816
-
- Nov 14, 2004
-
-
Chris Lattner authored
If this happens, detect it early instead of relying on instcombine to notice it later. This can be a big speedup, because PHI nodes can have many incoming values. llvm-svn: 17741
-
Chris Lattner authored
This exposes subsequent optimization possiblities and reduces code size. This triggers 1423 times in spec. llvm-svn: 17740
-
Chris Lattner authored
%X = alloca ... %Y = alloca ... X == Y into false. This allows us to simplify some stuff in eon (and probably many other C++ programs) where operator= was checking for self assignment. Folding this allows us to SROA several additional structs. llvm-svn: 17735
-
Chris Lattner authored
of the array is just two. This occurs 8 times in gcc, 6 times in crafty, and 12 times in 099.go. This implements ScalarRepl/sroa_two.ll llvm-svn: 17727
-
Chris Lattner authored
llvm-svn: 17724
-
- Nov 13, 2004
-
-
Chris Lattner authored
for (X * C1) + (X * C2) (where * can be mul or shl), allowing us to fold: Y+Y+Y+Y+Y+Y+Y+Y into %tmp.8 = shl long %Y, ubyte 3 ; <long> [#uses=1] instead of %tmp.4 = shl long %Y, ubyte 2 ; <long> [#uses=1] %tmp.12 = shl long %Y, ubyte 2 ; <long> [#uses=1] %tmp.8 = add long %tmp.4, %tmp.12 ; <long> [#uses=1] This implements add.ll:test25 Also add support for (X*C1)-(X*C2) -> X*(C1-C2), implementing sub.ll:test18 llvm-svn: 17704
-
Chris Lattner authored
(X + (X << C2)) --> X * ((1 << C2) + 1) ((X << C2) + X) --> X * ((1 << C2) + 1) This means that we now canonicalize "Y+Y+Y" into: %tmp.2 = mul long %Y, 3 ; <long> [#uses=1] instead of: %tmp.10 = shl long %Y, ubyte 1 ; <long> [#uses=1] %tmp.6 = add long %Y, %tmp.10 ; <long> [#uses=1] llvm-svn: 17701
-
Chris Lattner authored
will actually get it. llvm-svn: 17700
-
- Nov 12, 2004
-
-
Chris Lattner authored
llvm-svn: 17696
-
- Nov 07, 2004
-
-
Chris Lattner authored
llvm-svn: 17545
-
- Nov 05, 2004
-
-
Chris Lattner authored
llvm-svn: 17481
-
- Nov 02, 2004
-
-
Chris Lattner authored
* Disable broken transforms for simplifying (setcc (cast X to larger), CI) where CC is not != or == llvm-svn: 17422
-
- Nov 01, 2004
-
-
Chris Lattner authored
#define CL0(a) case a: f(); goto c; #define CL1(a) CL0(a##0) CL0(a##1) CL0(a##2) CL0(a##3) CL0(a##4) CL0(a##5) \ CL0(a##6) CL0(a##7) CL0(a##8) CL0(a##9) #define CL2(a) CL1(a##0) CL1(a##1) CL1(a##2) CL1(a##3) CL1(a##4) CL1(a##5) \ CL1(a##6) CL1(a##7) CL1(a##8) CL1(a##9) #define CL3(a) CL2(a##0) CL2(a##1) CL2(a##2) CL2(a##3) CL2(a##4) CL2(a##5) \ CL2(a##6) CL2(a##7) CL2(a##8) CL2(a##9) #define CL4(a) CL3(a##0) CL3(a##1) CL3(a##2) CL3(a##3) CL3(a##4) CL3(a##5) \ CL3(a##6) CL3(a##7) CL3(a##8) CL3(a##9) void f(); void a() { int b; c: switch (b) { CL4(1) } } This comes from GCC PR 15524 llvm-svn: 17390
-
- Oct 28, 2004
-
-
Reid Spencer authored
llvm-svn: 17286
-
- Oct 27, 2004
-
-
Chris Lattner authored
and work better with VC++. Patch contributed by Morten Ofstad! llvm-svn: 17281
-
Chris Lattner authored
http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20041018/019708.html exposed ANOTHER latent bug in this xform, which caused Prolangs-C/bison to fill the zion nightly tester disk up and make the tester barf. This is obviously not a good thing, so lets fix this bug shall we? :) llvm-svn: 17276
-
Chris Lattner authored
llvm-svn: 17270
-
- Oct 25, 2004
-
-
Chris Lattner authored
llvm-svn: 17218
-
- Oct 22, 2004
-
-
Chris Lattner authored
llvm-svn: 17157
-
Reid Spencer authored
llvm-svn: 17155
-
- Oct 19, 2004
-
-
Chris Lattner authored
doing... I guess they're right. llvm-svn: 17142
-
Reid Spencer authored
llvm-svn: 17136
-
- Oct 18, 2004
-
-
Nate Begeman authored
loops. This optimization is not turned on by default yet, but may be run with the opt tool's -loop-reduce flag. There are many FIXMEs listed in the code that will make it far more applicable to a wide range of code, but you have to start somewhere :) This limited version currently triggers on the following tests in the MultiSource directory: pcompress2: 7 times cfrac: 5 times anagram: 2 times ks: 6 times yacr2: 2 times llvm-svn: 17134
-
Reid Spencer authored
Patch contributed by Morten Ofstad. Thanks Morten! llvm-svn: 17123
-
Chris Lattner authored
change hacks off 10K of bytecode from perlbmk (.5%) even though the front-end is not generating them yet and we are not optimizing the resultant code. This isn't too bad. llvm-svn: 17111
-
Chris Lattner authored
llvm-svn: 17110
-
Chris Lattner authored
occurs in the entry node of a function llvm-svn: 17109
-
Chris Lattner authored
exercise that I'm not interested in tackling right now. Just punt and treat them like unwind's. This 'fixes' test/Regression/Transforms/ADCE/unreachable-function.ll llvm-svn: 17106
-
- Oct 17, 2004
-
-
Chris Lattner authored
other blocks. llvm-svn: 17099
-
Chris Lattner authored
so prepare for this. llvm-svn: 17095
-
Chris Lattner authored
llvm-svn: 17069
-
- Oct 16, 2004
-
-
Chris Lattner authored
llvm-svn: 17067
-
Chris Lattner authored
ugly and giant constnat exprs in some programs. llvm-svn: 17066
-
Chris Lattner authored
llvm-svn: 17047
-
Chris Lattner authored
ignore unreachable instructions llvm-svn: 17044
-
Chris Lattner authored
llvm-svn: 17043
-