- Dec 01, 2010
-
-
Chris Lattner authored
20040709-1.c from the gcc testsuite. I was using the size of a pointer instead of the pointee. This fixes rdar://8713376 llvm-svn: 120519
-
Chris Lattner authored
llvm-svn: 120498
-
Chris Lattner authored
may-aliasing stores that partially overlap with different base pointers. This implements PR6043 and the non-variable part of PR8657 llvm-svn: 120485
-
- Nov 30, 2010
-
-
Chris Lattner authored
llvm-svn: 120476
-
Chris Lattner authored
llvm-svn: 120474
-
Chris Lattner authored
llvm-svn: 120471
-
Chris Lattner authored
the code. We now get accurate sizes on Loads, though it surely doesn't matter in practice. llvm-svn: 120469
-
Chris Lattner authored
1. if the underlying pointer passed in can be resolved to any argument or alloca, then we don't need to scan. Previously we would only avoid the scan if the alloca or byval was actually considered dead. 2. The dead store processing code is itself completely dead and didn't handle volatile stores right anyway, so delete it. This allows simplifying the interface to RemoveAccessedObjects. llvm-svn: 120467
-
Chris Lattner authored
made sense to me. We now have a set of dead stack objects, and they become live when loaded. Fix a theoretical problem where we'd pass in the wrong pointer to the alias query. llvm-svn: 120465
-
Chris Lattner authored
If the call might read all the allocas, stop scanning early. Convert a vector to smallvector, shrink SmallPtrSet to 16 instead of 64 to avoid crazy linear scans. llvm-svn: 120463
-
Dale Johannesen authored
there should be a better way to do this. PR 8679. llvm-svn: 120457
-
Chris Lattner authored
llvm-svn: 120454
-
Chris Lattner authored
AA and MD pass info instead of using getAnalysis<> all over. llvm-svn: 120453
-
Chris Lattner authored
llvm-svn: 120452
-
Chris Lattner authored
now that DSE hacks on them. This fixes a regression I introduced, by generalizing DSE to hack on transfers. llvm-svn: 120445
-
Chris Lattner authored
about pairs of AA::Location's instead of looking for MemDep's "Def" predicate. This is more powerful and general, handling memset/memcpy/store all uniformly, and implementing PR8701 and probably obsoleting parts of memcpyoptimizer. This also fixes an obscure bug with init.trampoline and i8 stores, but I'm not surprised it hasn't been hit yet. Enhancing init.trampoline to carry the size that it stores would allow DSE to be much more aggressive about optimizing them. llvm-svn: 120406
-
Anders Carlsson authored
llvm-svn: 120398
-
Chris Lattner authored
llvm-svn: 120391
-
Chris Lattner authored
is trivially dead, since these have side effects. This makes the (misnamed) MemoryUseIntrinsic class dead, so remove it. llvm-svn: 120382
-
Chris Lattner authored
remove an actively-wrong comment. llvm-svn: 120378
-
Chris Lattner authored
It can be seriously improved, but at least now it isn't intertwined with the other logic. llvm-svn: 120377
-
Chris Lattner authored
contains "ref". Enhance DSE to use a modref query instead of a store-specific hack to generalize the "ignore may-alias stores" optimization to handle memset and memcpy. llvm-svn: 120368
-
Chris Lattner authored
stores, fix and add a testcase. llvm-svn: 120363
-
Chris Lattner authored
1. Don't bother trying to optimize: lifetime.end(ptr) store(ptr) as it is undefined, and therefore shouldn't exist. 2. Move the 'storing a loaded pointer' xform up, simplifying the may-aliased store code. llvm-svn: 120359
-
Chris Lattner authored
llvm-svn: 120347
-
- Nov 29, 2010
-
-
Chris Lattner authored
llvm-svn: 120325
-
Frits van Bommel authored
Transform (extractvalue (load P), ...) to (load (gep P, 0, ...)) if the load has no other uses, shrinking the load. llvm-svn: 120323
-
- Nov 27, 2010
-
-
Owen Anderson authored
by my recent GVN improvement. Looking through a single layer of PHI nodes when attempting to sink GEPs, we need to iteratively look through arbitrary PHI nests. llvm-svn: 120202
-
- Nov 24, 2010
-
-
Nick Lewycky authored
whether the pointer can be replaced with the global variable it is a copy of. Fixes PR8680. llvm-svn: 120126
-
- Nov 23, 2010
-
-
Duncan Sands authored
llvm-svn: 120051
-
Benjamin Kramer authored
E.g. -5 % 5 is 0 with srem and 1 with urem. Also addresses Frits van Bommel's comments. llvm-svn: 120049
-
Duncan Sands authored
in two places that are really interested in simplified instructions, not constants. llvm-svn: 120044
-
Duncan Sands authored
(which does constant folding and more) is called a few lines later. llvm-svn: 120042
-
Benjamin Kramer authored
This allows to transform the rem in "1 << ((int)x % 8);" to an and. llvm-svn: 120028
-
Duncan Sands authored
Stylistic improvement suggested by Frits van Bommel. llvm-svn: 120026
-
Duncan Sands authored
llvm-svn: 120025
-
Duncan Sands authored
fairly systematic way in instcombine. Some of these cases were already dealt with, in which case I removed the existing code. The case of Add has a bunch of funky logic which covers some of this plus a few variants (considers shifts to be a form of multiplication), which I didn't touch. The simplification performed is: A*B+A*C -> A*(B+C). The improvement is to do this in cases that were not already handled [such as A*B-A*C -> A*(B-C), which was reported on the mailing list], and also to do it more often by not checking for "only one use" if "B+C" simplifies. llvm-svn: 120024
-
Chris Lattner authored
on this instcombine xform. This fixes a miscompilation of 403.gcc. llvm-svn: 119988
-
- Nov 22, 2010
-
-
Benjamin Kramer authored
llvm-svn: 119984
-
Duncan Sands authored
then replace the index with zero. llvm-svn: 119974
-