- Dec 09, 2010
-
-
Dan Gohman authored
before eliminating the operation that zeros them. This fixes rdar://8739316. llvm-svn: 121353
-
- Dec 07, 2010
-
-
Frits van Bommel authored
The last uses of these functions were removed in r113852 when LazyValueInfo was permanently enabled and removed the need for them. llvm-svn: 121133
-
Jay Foad authored
zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method trunc(), to be const and to return a new value instead of modifying the object in place. llvm-svn: 121120
-
Chris Lattner authored
(if available) as we go so that we get simple constantexprs not insane ones. This fixes the failure of clang/test/CodeGenCXX/virtual-base-ctor.cpp that the previous iteration of this patch had. llvm-svn: 121111
-
Eric Christopher authored
CodeGenCXX/virtual-base-ctor.cpp. llvm-svn: 121102
-
Chris Lattner authored
put in a global variable's initializer. llvm-svn: 121100
-
Frits van Bommel authored
Implement jump threading of 'indirectbr' by keeping track of whether we're looking for ConstantInt*s or BlockAddress*s. llvm-svn: 121066
-
- Dec 06, 2010
-
-
Chris Lattner authored
No functionality change. llvm-svn: 121042
-
Chris Lattner authored
llvm-svn: 121040
-
Chris Lattner authored
llvm-svn: 121038
-
Chris Lattner authored
optimization. Consider: static void foo() { A = alloca ... } static void bar() { B = alloca ... call foo(); } void main() { bar() } The inliner proceeds bottom up, but lets pretend it decides not to inline foo into bar. When it gets to main, it inlines bar into main(), and says "hey, I just inlined an alloca "B" into main, lets remember that. Then it keeps going and finds that it now contains a call to foo. It decides to inline foo into main, and says "hey, foo has an alloca A, and I have an alloca B from another inlined call site, lets reuse it". The problem with this of course, is that the lifetime of A and B are nested, not disjoint. Unfortunately I can't create a reasonable testcase for this: the one in the PR is both huge and extremely sensitive, because you minor tweaks end up causing foo to get inlined into bar too early. We already have tests for the basic alloca merging optimization and this does not break them. llvm-svn: 120995
-
Chris Lattner authored
llvm-svn: 120994
-
Chris Lattner authored
llvm-svn: 120993
-
Chris Lattner authored
memcpy's like: memcpy(A, B) memcpy(A, C) we cannot delete the first memcpy as dead if A and C might be aliases. If so, we actually get: memcpy(A, B) memcpy(A, A) which is not correct to transform into: memcpy(A, A) This patch was heavily influenced by Jakub Staszak's patch in PR8728, thanks Jakub! llvm-svn: 120974
-
- Dec 05, 2010
-
-
Frits van Bommel authored
Should have no functional change other than the order of two transformations that are mutually-exclusive and the exact formatting of debug output. Internally, it now stores the ConstantInt*s as Constant*s, and actual undef values instead of nulls. llvm-svn: 120946
-
Frits van Bommel authored
llvm-svn: 120945
-
Frits van Bommel authored
(indirectbr (select cond, blockaddress(@fn, BlockA), blockaddress(@fn, BlockB))) into (br cond, BlockA, BlockB). llvm-svn: 120943
-
- Dec 01, 2010
-
-
Jay Foad authored
setAllBits(), setBit(unsigned), etc. llvm-svn: 120564
-
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
-