- Oct 15, 2011
-
-
Duncan Sands authored
use can't be dominated, saving one domtree lookup. llvm-svn: 142066
-
- Oct 14, 2011
-
-
Eli Friedman authored
Enhance the memdep interface so that users can tell the difference between a dependency which cannot be calculated and a path reaching the entry point of the function. This patch introduces isNonFuncLocal, which replaces isUnknown in some cases. Patch by Xiaoyi Guo. llvm-svn: 141896
-
- Oct 07, 2011
-
-
Duncan Sands authored
switch (n) { case 27: do_something(x); ... } the call do_something(x) will be replaced with do_something(27). In gcc-as-one-big-file this results in the removal of about 500 lines of bitcode (about 0.02%), so has about 1/10 of the effect of propagating branch conditions. llvm-svn: 141360
-
- Oct 05, 2011
-
-
Duncan Sands authored
branch "br i1 %x, label %if_true, label %if_false" then it replaces "%x" with "true" in places only reachable via the %if_true arm, and with "false" in places only reachable via the %if_false arm. Except that actually it doesn't: if value numbering shows that %y is equal to %x then, yes, %y will be turned into true/false in this way, but any occurrences of %x itself are not transformed. Fix this. What's more, it's often the case that %x is an equality comparison such as "%x = icmp eq %A, 0", in which case every occurrence of %A that is only reachable via the %if_true arm can be replaced with 0. Implement this and a few other variations on this theme. This reduces the number of lines of LLVM IR in "GCC as one big file" by 0.2%. It has a bigger impact on Ada code, typically reducing the number of lines of bitcode by around 0.4% by removing repeated compiler generated checks. Passes the LLVM nightly testsuite and the Ada ACATS testsuite. llvm-svn: 141177
-
Duncan Sands authored
it's OK for the false/true destination to have multiple predecessors as long as the extra ones are dominated by the branch destination. llvm-svn: 141176
-
- Sep 27, 2011
-
-
Benjamin Kramer authored
Stop emitting instructions with the name "tmp" they eat up memory and have to be uniqued, without any benefit. If someone prefers %tmp42 to %42, run instnamer. llvm-svn: 140634
-
- Sep 02, 2011
-
-
Jakub Staszak authored
will be valid. This fixes PR10820. llvm-svn: 139005
-
- Aug 18, 2011
-
-
Eli Friedman authored
llvm-svn: 137888
-
- Aug 17, 2011
-
-
Bill Wendling authored
PRE needs the landing pads to have their critical edges split. Doing this for a landing pad is non-trivial. Abandon the attempt to perform PRE when we come across a landing pad. (Reviewed by Owen!) llvm-svn: 137876
-
- Jul 21, 2011
-
-
Jay Foad authored
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef. llvm-svn: 135673
-
- Jul 18, 2011
-
-
Chris Lattner authored
llvm-svn: 135375
-
- Jul 09, 2011
-
-
Lang Hames authored
Added recognition for signed add/sub/mul with overflow intrinsics to GVN as per Chris and Frits suggestion. llvm-svn: 134777
-
- Jul 08, 2011
-
-
Lang Hames authored
Make GVN look through extractvalues for recognised intrinsics. GVN can then CSE ops that match values produced by the intrinsics. llvm-svn: 134677
-
- Jun 20, 2011
-
-
Jay Foad authored
Change various bits of code to make better use of the existing PHINode API, to insulate them from forthcoming changes in how PHINodes store their operands. llvm-svn: 133434
-
- Jun 15, 2011
-
-
Eli Friedman authored
Add "unknown" results for memdep, which mean "I don't know whether a dependence for the given instruction exists in the given block". This cleans up all the existing hacks in memdep which represent this concept by returning clobber with various unrelated instructions. llvm-svn: 133031
-
- May 22, 2011
-
-
Chris Lattner authored
causing it to get into infinite loops when it would widen a load (which can necessarily leave around dead loads). llvm-svn: 131847
-
- May 17, 2011
-
-
Devang Patel authored
llvm-svn: 131482
-
Devang Patel authored
llvm-svn: 131481
-
- May 05, 2011
-
-
Devang Patel authored
llvm-svn: 130895
-
- Apr 28, 2011
-
-
Chris Lattner authored
llvm-svn: 130426
-
Chris Lattner authored
a nice and tidy: %x1 = load i32* %0, align 4 %1 = icmp eq i32 %x1, 1179403647 br i1 %1, label %if.then, label %if.end instead of doing lots of loads and branches. May the FreeBSD bootloader long fit in its allocated space. llvm-svn: 130416
-
Chris Lattner authored
llvm-svn: 130414
-
Chris Lattner authored
static functions instead of passing around tons of random ivars. llvm-svn: 130403
-
Chris Lattner authored
llvm-svn: 130401
-
Chris Lattner authored
wider load would allow elimination of subsequent loads, and when the wider load is still a native integer type. This eliminates a ton of loads on various benchmarks involving struct fields, though it is somewhat hobbled by clang not being very aggressive about field alignment. This is yet another step along the way towards resolving PR6627. llvm-svn: 130390
-
- Apr 26, 2011
-
-
Chris Lattner authored
translation fails. We were bailing out in some cases that would cause us to miss GVN'ing some non-local cases away. llvm-svn: 130206
-
Chris Lattner authored
return it as a clobber. This allows GVN to do smart things. Enhance GVN to be smart about the case when a small load is clobbered by a larger overlapping load. In this case, forward the value. This allows us to compile stuff like this: int test(void *P) { int tmp = *(unsigned int*)P; return tmp+*((unsigned char*)P+1); } into: _test: ## @test movl (%rdi), %ecx movzbl %ch, %eax addl %ecx, %eax ret which has one load. We already handled the case where the smaller load was from a must-aliased base pointer. llvm-svn: 130180
-
- Mar 30, 2011
- 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
-
- Jan 11, 2011
-
-
Jakob Stoklund Olesen authored
llvm-svn: 123288
-
Cameron Zwarich authored
once at the beginning of GVN instead of once per iteration. llvm-svn: 123278
-
Cameron Zwarich authored
llvm-svn: 123270
-
Chris Lattner authored
actually reached in the testcase in PR8954, but it's safe and good practice. llvm-svn: 123224
-
Chris Lattner authored
phi nodes. It is called from MergeBlockIntoPredecessor which is called from GVN, which claims to preserve these. I'm skeptical that this is the actual problem behind PR8954, but this is a stab in the right direction. llvm-svn: 123222
-
- Jan 04, 2011
-
-
Owen Anderson authored
Don't bother value numbering instructions with void types in GVN. In theory this should allow us to insert fewer things into the value numbering maps, but any speedup is beneath the noise threshold on my machine on 403.gcc. llvm-svn: 122844
-
Owen Anderson authored
llvm-svn: 122828
-
Owen Anderson authored
llvm-svn: 122827
-
Owen Anderson authored
llvm-svn: 122826
-
Owen Anderson authored
Clarify terminology, settling on referring to what was the "number table" as the "leader table", and rename methods to make it much more clear what they're doing. llvm-svn: 122823
-