- Jan 29, 2011
-
-
Evan Cheng authored
llvm-svn: 124522
-
Evan Cheng authored
Re-commit r124462 with fixes. Tail recursion elim will now dup ret into unconditional predecessor to enable TCE on demand. llvm-svn: 124518
-
Andrew Trick authored
Modified patch by Adam Preuss. This builds on the existing framework for block tracing, edge profiling and optimal edge profiling. See -help-hidden for new flags. For documentation, see the technical report "Implementation of Path Profiling..." in llvm.org/pubs. llvm-svn: 124515
-
- Jan 28, 2011
-
-
Duncan Sands authored
benchmarks, and that it can be simplified to X/Y. (In general you can only simplify (Z*Y)/Y to Z if the multiplication did not overflow; if Z has the form "X/Y" then this is the case). This patch implements that transform and moves some Div logic out of instcombine and into InstructionSimplify. Unfortunately instcombine gets in the way somewhat, since it likes to change (X/Y)*Y into X-(X rem Y), so I had to teach instcombine about this too. Finally, thanks to the NSW/NUW flags, sometimes we know directly that "Z*Y" does not overflow, because the flag says so, so I added that logic too. This eliminates a bunch of divisions and subtractions in 447.dealII, and has good effects on some other benchmarks too. It seems to have quite an effect on tramp3d-v4 but it's hard to say if it's good or bad because inlining decisions changed, resulting in massive changes all over. llvm-svn: 124487
-
Nick Lewycky authored
functionality change. llvm-svn: 124482
-
Nick Lewycky authored
llvm-svn: 124480
-
Nick Lewycky authored
llvm-svn: 124479
-
Evan Cheng authored
llvm-svn: 124478
-
Nick Lewycky authored
the function equality set. llvm-svn: 124475
-
Nick Lewycky authored
llvm-svn: 124469
-
Evan Cheng authored
branches. PR8575, rdar://5134905, rdar://8911460. - Allow codegen tail duplication to dup small return blocks after register allocation is done. llvm-svn: 124462
-
- Jan 27, 2011
-
-
Benjamin Kramer authored
llvm-svn: 124426
-
Nick Lewycky authored
llvm-svn: 124406
-
Nick Lewycky authored
llvm-svn: 124404
-
Nick Lewycky authored
that relationships like "i8* null" is equivalent to "i32* null". llvm-svn: 124368
-
- Jan 26, 2011
-
-
Duncan Sands authored
operand being factorized (and erased) could occur several times in Ops, resulting in freed memory being used when the next occurrence in Ops was analyzed. llvm-svn: 124287
-
Nick Lewycky authored
it. No functionality change! llvm-svn: 124286
-
Nick Lewycky authored
merge vector<intptr_t>::push_back() and vector<void*>::push_back() because Enumerate() doesn't realize that "i64* null" and "i8** null" are equivalent. llvm-svn: 124285
-
Nick Lewycky authored
elements for type equivalence. llvm-svn: 124284
-
- Jan 25, 2011
-
-
Nick Lewycky authored
for now. It's controlled by the HasGlobalAliases variable which is not attached to any flag yet. llvm-svn: 124182
-
- Jan 24, 2011
-
-
Dan Gohman authored
with BasicAA's DecomposeGEPExpression, which recently began using a TargetData. This fixes PR8968, though the testcase is awkward to reduce. Also, update several off GetUnderlyingObject's users which happen to have a TargetData handy to pass it in. llvm-svn: 124134
-
Chris Lattner authored
code. llvm-svn: 124100
-
Chris Lattner authored
llvm-svn: 124099
-
Chris Lattner authored
occurs because instcombine sinks loads and inserts phis. This kicks in on such apps as 175.vpr, eon, 403.gcc, xalancbmk and a bunch of times in spec2006 in some app that uses std::deque. This resolves the last of rdar://7339113. llvm-svn: 124090
-
- Jan 23, 2011
-
-
Chris Lattner authored
common cases. This triggers a surprising number of times in SPEC2K6 because min/max idioms end up doing this. For example, code from the STL ends up looking like this to SRoA: %202 = load i64* %__old_size, align 8, !tbaa !3 %203 = load i64* %__old_size, align 8, !tbaa !3 %204 = load i64* %__n, align 8, !tbaa !3 %205 = icmp ult i64 %203, %204 %storemerge.i = select i1 %205, i64* %__n, i64* %__old_size %206 = load i64* %storemerge.i, align 8, !tbaa !3 We can now promote both the __n and the __old_size allocas. This addresses another chunk of rdar://7339113, poor codegen on stringswitch. llvm-svn: 124088
-
Ted Kremenek authored
clang's -Wuninitialized-experimental warning. While these don't look like real bugs, clang's -Wuninitialized-experimental analysis is stricter than GCC's, and these fixes have the benefit of being general nice cleanups. llvm-svn: 124073
-
Chris Lattner authored
that have PHI or select uses of their element pointers. This can often happen when instcombine sinks two loads into a successor, inserting a phi or select. With this patch, we can scalarize the alloca, but the pinned elements are not yet promoted. This is still a win for large aggregates where only one element is used. This fixes rdar://8904039 and part of rdar://7339113 (poor codegen on stringswitch). llvm-svn: 124070
-
Cameron Zwarich authored
on test-suite + SPEC2000 & SPEC2006. llvm-svn: 124068
-
Chris Lattner authored
No functionality change. llvm-svn: 124067
-
Chris Lattner authored
handle the "Transformation preventing inst" printing, so that -scalarrepl -debug will always print the rejected instruction. No functionality change. llvm-svn: 124066
-
Chris Lattner authored
X86 backend has been fixed. llvm-svn: 124064
-
- Jan 21, 2011
-
-
Dan Gohman authored
how they should be checked. llvm-svn: 123999
-
Owen Anderson authored
A == B, and A > B, does not mean we can fold it to true. We still need to check for A ? B (A unordered B). llvm-svn: 123993
-
Nick Lewycky authored
instructions. llvm-svn: 123973
-
Chris Lattner authored
llvm-svn: 123968
-
Chris Lattner authored
llvm-svn: 123965
-
Nick Lewycky authored
a select. A vector select is pairwise on each element so we'd need a new condition with the right number of elements to select on. Fixes PR8994. llvm-svn: 123963
-
- Jan 20, 2011
-
-
Duncan Sands authored
auto-simplier the transform most missed by early-cse is (zext X) != 0 -> X != 0. This patch adds this transform and some related logic to InstructionSimplify and removes some of the logic from instcombine (unfortunately not all because there are several situations in which instcombine can improve things by making new instructions, whereas instsimplify is not allowed to do this). At -O2 this often results in more than 15% more simplifications by early-cse, and results in hundreds of lines of bitcode being eliminated from the testsuite. I did see some small negative effects in the testsuite, for example a few additional instructions in three programs. One program, 483.xalancbmk, got an additional 35 instructions, which seems to be due to a function getting an additional instruction and then being inlined all over the place. llvm-svn: 123911
-
- Jan 19, 2011
-
-
Rafael Espindola authored
llvm-svn: 123834
-
- Jan 18, 2011
-
-