| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Bill Wendling!!
llvm-svn: 20649
|
| |
|
|
|
|
|
|
| |
using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*.
This patch is contributed by Gabor Greif, thanks!
llvm-svn: 20597
|
| |
|
|
| |
llvm-svn: 20463
|
| |
|
|
| |
llvm-svn: 20343
|
| |
|
|
| |
llvm-svn: 20334
|
| |
|
|
|
|
|
|
| |
This does a simple form of "jump threading", which eliminates CFG edges that
are provably dead. This triggers 90 times in the external tests, and
eliminating CFG edges is always always a good thing! :)
llvm-svn: 20300
|
| |
|
|
| |
llvm-svn: 19898
|
| |
|
|
|
|
|
|
| |
SimplifyCFG is one of those passes that we use for final cleanup: it should
not rely on other passes to clean up its garbage. This fixes the "why are
trivially dead setcc's in the output of gccas" problem.
llvm-svn: 19212
|
| |
|
|
| |
llvm-svn: 18799
|
| |
|
|
|
|
| |
and the failure on make_dparser last night.
llvm-svn: 18766
|
| |
|
|
| |
llvm-svn: 18381
|
| |
|
|
|
|
| |
This only fails on darwin or on X86 under valgrind.
llvm-svn: 18377
|
| |
|
|
| |
llvm-svn: 18369
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: 18028
|
| |
|
|
| |
llvm-svn: 17699
|
| |
|
|
|
|
| |
instructions, setting DefBlock to a block it did not have dom info for.
llvm-svn: 17697
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This speeds up simplifycfg on this program, from 44.87s to 0.29s (with
a profiled build):
#define CL0(a) case a: 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 testcase is contrived to expose N^2 behavior, but this patch should speedup
simplifycfg on any programs that use large switch statements. This testcase
comes from GCC PR17895.
llvm-svn: 17389
|
| |
|
|
| |
llvm-svn: 17286
|
| |
|
|
| |
llvm-svn: 17163
|
| |
|
|
| |
llvm-svn: 17155
|
| |
|
|
| |
llvm-svn: 17136
|
| |
|
|
|
|
| |
Patch contributed by Morten Ofstad. Thanks Morten!
llvm-svn: 17123
|
| |
|
|
|
|
|
| |
Simplify code by simplifying terminators that branch to blocks that start
with an unreachable instruction.
llvm-svn: 17116
|
| |
|
|
|
|
|
| |
particular, invoke ret values are only live in the normal dest of the invoke
not in the unwind dest.
llvm-svn: 17108
|
| |
|
|
|
|
|
| |
If a function had no return instruction in it, and the result of the inlined
call instruction was used, we would crash.
llvm-svn: 17104
|
| |
|
|
|
|
|
|
|
| |
unneccesary. This allows us to delete several hundred phi nodes of the
form PHI(x,x,x,undef) from 253.perlbmk and probably other programs as well.
This implements Mem2Reg/UndefValuesMerge.ll
llvm-svn: 17098
|
| |
|
|
|
|
| |
to think that PHI[4, undef] == 4.
llvm-svn: 17096
|
| |
|
|
| |
llvm-svn: 17056
|
| |
|
|
| |
llvm-svn: 17046
|
| |
|
|
| |
llvm-svn: 17045
|
| |
|
|
|
|
|
|
| |
nodes unless we KNOW that we are able to promote all of them.
This fixes: test/Regression/Transforms/SimplifyCFG/PhiNoEliminate.ll
llvm-svn: 16973
|
| |
|
|
| |
llvm-svn: 16950
|
| |
|
|
| |
llvm-svn: 16893
|
| |
|
|
|
|
| |
potentially fold more in one pass.
llvm-svn: 16583
|
| |
|
|
|
|
|
|
|
| |
whose addresses where used by trivial phi nodes and select instructions. This
is now performed by the instcombine pass, which is more powerful, is much
simpler, and is faster. This allows the deletion of a bunch of code, two
FIXME's and two gotos.
llvm-svn: 16406
|
| |
|
|
| |
llvm-svn: 16389
|
| |
|
|
|
|
| |
Patch contributed by Paolo Invernizzi. Thanks Paolo!
llvm-svn: 16368
|
| |
|
|
| |
llvm-svn: 16347
|
| |
|
|
|
|
| |
Patch contributed by Paolo Invernizzi!
llvm-svn: 16152
|
| |
|
|
|
|
|
|
| |
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.
llvm-svn: 16137
|
| |
|
|
|
|
|
|
|
| |
block (common in a switch), make sure to remove extra edges in successor
blocks. This fixes CodeExtractor/2004-08-12-BlockExtractPHI.ll and should
be pulled into LLVM 1.3 (though the regression test need not be, as that
would require pulling in the LoopExtract.cpp changes).
llvm-svn: 15717
|
| |
|
|
|
|
| |
the extracted code was, instead of putting it at the end of the function
llvm-svn: 15716
|
| |
|
|
|
|
| |
Nate ran into when bugpointing siod. This fix should go into LLVM 1.3
llvm-svn: 15712
|
| |
|
|
|
|
| |
run into. This should go into 1.3
llvm-svn: 15679
|
| |
|
|
| |
llvm-svn: 15487
|
| |
|
|
| |
llvm-svn: 15369
|
| |
|
|
| |
llvm-svn: 15337
|
| |
|
|
| |
llvm-svn: 15334
|
| |
|
|
| |
llvm-svn: 15325
|