- 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
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
-
- 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
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
-
- Nov 21, 2010
-
-
Chris Lattner authored
llvm-svn: 119948
-
Chris Lattner authored
method in MemDep instead of inserting an instruction, doing a query, then removing it. Neither operation is effectively cached. llvm-svn: 119930
-
Chris Lattner authored
llvm-svn: 119927
-
Chris Lattner authored
allowing the memcpy to be eliminated. Unfortunately, the requirements on byval's without explicit alignment are really weak and impossible to predict in the mid-level optimizer, so this doesn't kick in much with current frontends. The fix is to change clang to set alignment on all byval arguments. llvm-svn: 119916
-
- Nov 20, 2010
-
-
Benjamin Kramer authored
llvm-svn: 119908
-
- Nov 19, 2010
-
-
Owen Anderson authored
llvm-svn: 119865
-
Owen Anderson authored
if all the operands of the PHI are equivalent. This allows CodeGenPrepare to undo unprofitable PRE transforms. llvm-svn: 119853
-
- Nov 18, 2010
-
-
Duncan Sands authored
preserves LCSSA form out of ScalarEvolution and into the LoopInfo class. Use it to check that SimplifyInstruction simplifications are not breaking LCSSA form. Fixes PR8622. llvm-svn: 119727
-
Owen Anderson authored
Completely rework the datastructure GVN uses to represent the value number to leader mapping. Previously, this was a tree of hashtables, and a query recursed into the table for the immediate dominator ad infinitum if the initial lookup failed. This led to really bad performance on tall, narrow CFGs. We can instead replace it with what is conceptually a multimap of value numbers to leaders (actually represented by a hashtable with a list of Value*'s as the value type), and then determine which leader from that set to use very cheaply thanks to the DFS numberings maintained by DominatorTree. Because there are typically few duplicates of a given value, this scan tends to be quite fast. Additionally, we use a custom linked list and BumpPtr allocation to avoid any unnecessary allocation in representing the value-side of the multimap. This change brings with it a 15% (!) improvement in the total running time of GVN on 403.gcc, which I think is pretty good considering that includes all the "real work" being done by MemDep as well. The one downside to this approach is that we can no longer use GVN to perform simple conditional progation, but that seems like an acceptable loss since we now have LVI and CorrelatedValuePropagation to pick up the slack. If you see conditional propagation that's not happening, please file bugs against LVI or CVP. llvm-svn: 119714
-
Chris Lattner authored
saying "it would be bad", give an example of what is going on. llvm-svn: 119695
-
Chris Lattner authored
refusing to optimize two memcpy's like this: copy A <- B copy C <- A if it couldn't prove that noalias(B,C). We can eliminate the copy by producing a memmove instead of memcpy. llvm-svn: 119694
-