| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if (x) {
code
...
} else {
code
...
}
Turn it into:
code
if (x) {
...
} else {
...
}
This reduces code size and in some common cases allows us to completely
eliminate the conditional. This turns several if/then/else blocks in loops
into straightline code in 179.art, turning the loops into single basic blocks
(good for modsched even!).
Maybe now brg will leave me alone ;-)
llvm-svn: 18366
|
| |
|
|
| |
llvm-svn: 18363
|
| |
|
|
|
|
|
| |
* Make sure we handle signed to unsigned conversion correctly
* Move this visitSetCondInst case to its own method.
llvm-svn: 18312
|
| |
|
|
| |
llvm-svn: 18309
|
| |
|
|
|
|
| |
occurs many times in crafty
llvm-svn: 18273
|
| |
|
|
|
|
| |
allows us to hoist more loads in some cases.
llvm-svn: 18265
|
| |
|
|
| |
llvm-svn: 18110
|
| |
|
|
| |
llvm-svn: 18109
|
| |
|
|
|
|
| |
Patch contributed by Michael McCracken!
llvm-svn: 18108
|
| |
|
|
| |
llvm-svn: 18028
|
| |
|
|
|
|
| |
Morten Ofstad.
llvm-svn: 17996
|
| |
|
|
| |
llvm-svn: 17992
|
| |
|
|
| |
llvm-svn: 17970
|
| |
|
|
| |
llvm-svn: 17956
|
| |
|
|
| |
llvm-svn: 17897
|
| |
|
|
|
|
| |
Patch contributed by Morten Ofstad.
llvm-svn: 17830
|
| |
|
|
| |
llvm-svn: 17825
|
| |
|
|
| |
llvm-svn: 17824
|
| |
|
|
| |
llvm-svn: 17821
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 17818
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
value. This allows us to turn more globals into constants and eliminate them.
This patch implements GlobalOpt/load-store-global.llx.
Note that this patch speeds up 255.vortex from:
Output/255.vortex.out-cbe.time:program 7.640000
Output/255.vortex.out-llc.time:program 9.810000
to:
Output/255.vortex.out-cbe.time:program 7.250000
Output/255.vortex.out-llc.time:program 9.490000
Which isn't bad at all!
llvm-svn: 17746
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
This exposes subsequent optimization possiblities and reduces code size.
This triggers 1423 times in spec.
llvm-svn: 17740
|
| |
|
|
|
|
|
|
|
|
|
|
| |
%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
|
| |
|
|
| |
llvm-svn: 17734
|
| |
|
|
|
|
|
|
|
|
|
| |
constant value. This makes the return value dead and allows for
simplification in the caller.
This implements IPConstantProp/return-constant.ll
This triggers several dozen times throughout SPEC.
llvm-svn: 17730
|
| |
|
|
|
|
|
|
|
| |
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
|
| |
|
|
| |
llvm-svn: 17724
|
| |
|
|
| |
llvm-svn: 17719
|
| |
|
|
|
|
|
|
|
|
| |
argument pointers. This is only valid to do if the function already
unconditionally loaded an argument or if the pointer passed in is known
to be valid. Make sure to do the required checks.
This fixed ArgumentPromotion/control-flow.ll and the Burg program.
llvm-svn: 17718
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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
|
| |
|
|
|
|
| |
will actually get it.
llvm-svn: 17700
|
| |
|
|
| |
llvm-svn: 17699
|
| |
|
|
|
|
| |
instructions, setting DefBlock to a block it did not have dom info for.
llvm-svn: 17697
|
| |
|
|
| |
llvm-svn: 17696
|
| |
|
|
|
|
| |
as IPCP opportunities.
llvm-svn: 17680
|
| |
|
|
| |
llvm-svn: 17679
|
| |
|
|
|
|
| |
This implements IPConstantProp/recursion.ll
llvm-svn: 17666
|
| |
|
|
|
|
|
| |
This allows to elimination of a bunch of global pool descriptor args from
programs being pool allocated (and is also generally useful!)
llvm-svn: 17657
|
| |
|
|
|
|
| |
nightly testers
llvm-svn: 17646
|
| |
|
|
| |
llvm-svn: 17642
|
| |
|
|
|
|
|
| |
exciting to inline. Only inline medium or small sized functions with a
single call site.
llvm-svn: 17588
|
| |
|
|
| |
llvm-svn: 17545
|
| |
|
|
| |
llvm-svn: 17482
|
| |
|
|
| |
llvm-svn: 17481
|
| |
|
|
|
|
|
| |
* Disable broken transforms for simplifying (setcc (cast X to larger), CI)
where CC is not != or ==
llvm-svn: 17422
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
#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
|