#
7d58bc7b |
| 15-Jun-2011 |
Eli Friedman <eli.friedman@gmail.com> |
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
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
show more ...
|
#
a471751c |
| 04-Jun-2011 |
Dan Gohman <gohman@apple.com> |
Disable the main feature of 130180, the elimination of loads that are redundant with partially-aliasing loads.
When computing what portion of a clobbering load value is needed, it doesn't consider p
Disable the main feature of 130180, the elimination of loads that are redundant with partially-aliasing loads.
When computing what portion of a clobbering load value is needed, it doesn't consider phi-translation which may have occurred between the clobbing load and the redundant load.
llvm-svn: 132631
show more ...
|
#
b576b167 |
| 02-Jun-2011 |
Eli Friedman <eli.friedman@gmail.com> |
When marking a block as being unanalyzable, use "Clobber" on the terminator instead of the first instruction in the block. This is a bit of a hack; "Clobber" isn't really the right marking in the fi
When marking a block as being unanalyzable, use "Clobber" on the terminator instead of the first instruction in the block. This is a bit of a hack; "Clobber" isn't really the right marking in the first place. memdep doesn't really have any way of properly expressing "unanalyzable" at the moment. Using it on the terminator is much less ambiguous than using it on an arbitrary instruction, though.
In the given testcase, the "Clobber" was pointing to a load, and GVN was incorrectly assuming that meant that the "Clobber" load overlapped the load being analyzed (when they are actually unrelated).
The included testcase tests both this commit and r132434.
Part two of rdar://9429882. (r132434 was mislabeled.)
llvm-svn: 132442
show more ...
|
#
4b6eeb9c |
| 01-Jun-2011 |
Eli Friedman <eli.friedman@gmail.com> |
In MemoryDependenceAnalysis::getNonLocalPointerDepFromBB, if a given block is is deemed unanalyzable (and we execute one of the "goto PredTranslationFailure" statements), make sure we don't put infor
In MemoryDependenceAnalysis::getNonLocalPointerDepFromBB, if a given block is is deemed unanalyzable (and we execute one of the "goto PredTranslationFailure" statements), make sure we don't put information about the predecessors of that block into the returned data structures; this can lead to, among other things, extraneous results (which will confuse passes using memdep). Fixes an assert in GVN compiling ruby. Part of rdar://problem/9521954 .
Testcase coming up soon.
llvm-svn: 132434
show more ...
|
#
97f0cf32 |
| 17-May-2011 |
Owen Anderson <resistor@mac.com> |
@llvm.lifetime.begin acts as a load, not @llvm.lifetime.end.
llvm-svn: 131437
|
#
827a270a |
| 28-Apr-2011 |
Chris Lattner <sabre@nondot.org> |
teach GVN to widen integer loads when they are overaligned, when doing an wider load would allow elimination of subsequent loads, and when the wider load is still a native integer type. This elimin
teach GVN to widen integer loads when they are overaligned, when doing an 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
show more ...
|
#
7aab2799 |
| 26-Apr-2011 |
Chris Lattner <sabre@nondot.org> |
Enhance memdep to return clobber relation between noalias loads when an earlier load could be widened to encompass a later load. For example, if we see:
X = load i8* P, align 4 Y = load i8* (P+
Enhance memdep to return clobber relation between noalias loads when an earlier load could be widened to encompass a later load. For example, if we see:
X = load i8* P, align 4 Y = load i8* (P+3), align 1
and we have a 32-bit native integer type, we can widen the former load to i32 which then makes the second load redundant. GVN can't actually do anything with this load/load relation yet, so this isn't testable, but it is the next step to resolving PR6627, and a fairly general class of "merge neighboring loads" missed optimizations.
llvm-svn: 130250
show more ...
|
#
32dc9bd1 |
| 26-Apr-2011 |
Chris Lattner <sabre@nondot.org> |
use AA::isMustAlias to simplify some calls.
llvm-svn: 130248
|
#
6b96621a |
| 26-Apr-2011 |
Chris Lattner <sabre@nondot.org> |
remove support for llvm.invariant.end from memdep. It is a work-in-progress that is not progressing, and it has issues.
llvm-svn: 130247
|
#
6f83d06f |
| 26-Apr-2011 |
Chris Lattner <sabre@nondot.org> |
Enhance MemDep: When alias analysis returns a partial alias result, 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
Enhance MemDep: When alias analysis returns a partial alias result, 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
show more ...
|
Revision tags: llvmorg-2.9.0, llvmorg-2.9.0-rc3, llvmorg-2.9.0-rc2, llvmorg-2.9.0-rc1 |
|
#
0f124e19 |
| 24-Jan-2011 |
Dan Gohman <gohman@apple.com> |
Give GetUnderlyingObject a TargetData, to keep it in sync with BasicAA's DecomposeGEPExpression, which recently began using a TargetData. This fixes PR8968, though the testcase is awkward to reduce.
Give GetUnderlyingObject a TargetData, to keep it in sync 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
show more ...
|
#
087f2070 |
| 11-Jan-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Revert r123207: "Turn on memdep's verifyRemoved() in an attempt to smoke out the cause of our gcc bootstrap miscompare."
It didn't.
llvm-svn: 123215
|
#
9b6853ef |
| 11-Jan-2011 |
Jakob Stoklund Olesen <stoklund@2pi.dk> |
Turn on memdep's verifyRemoved() in an attempt to smoke out the cause of our gcc bootstrap miscompare.
llvm-svn: 123207
|
#
9b43f336 |
| 23-Dec-2010 |
Jeffrey Yasskin <jyasskin@google.com> |
Change all self assignments X=X to (void)X, so that we can turn on a new gcc warning that complains on self-assignments and self-initializations.
llvm-svn: 122458
|
#
a4fcd241 |
| 15-Dec-2010 |
Dan Gohman <gohman@apple.com> |
Move Value::getUnderlyingObject to be a standalone function so that it can live in Analysis instead of VMCore.
llvm-svn: 121885
|
#
ba5d0abe |
| 13-Dec-2010 |
Dan Gohman <gohman@apple.com> |
Update memdep to handle PartialAlias as MayAlias.
llvm-svn: 121723
|
#
d540a5d8 |
| 30-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
strength reduce this.
llvm-svn: 120381
|
#
585dfa2b |
| 21-Nov-2010 |
Benjamin Kramer <benny.kra@googlemail.com> |
Initialize MemDep's TD member so buildbots don't trip over an uninitialized pointer (TD is passed to PHITransAddr).
I wonder why this didn't explode earlier.
llvm-svn: 119944
|
#
e48c31ce |
| 21-Nov-2010 |
Chris Lattner <sabre@nondot.org> |
implement PR8576, deleting dead stores with intervening may-alias stores.
llvm-svn: 119927
|
#
65316d67 |
| 11-Nov-2010 |
Dan Gohman <gohman@apple.com> |
Add helper functions for computing the Location of load, store, and vaarg instructions.
llvm-svn: 118845
|
#
c87c843d |
| 11-Nov-2010 |
Dan Gohman <gohman@apple.com> |
It's not necessary to clear out the Size and TBAATag at each of these points.
llvm-svn: 118752
|
#
8bf3d832 |
| 11-Nov-2010 |
Dan Gohman <gohman@apple.com> |
Set NonLocalDepInfo's Size field to UnknownSize when invalidating it, so that it doesn't appear to be a known size.
llvm-svn: 118748
|
#
67919368 |
| 10-Nov-2010 |
Dan Gohman <gohman@apple.com> |
When clearing a non-local pointer dependency cache entry, clear the reverse map too. This fixes seflhost build errors.
llvm-svn: 118729
|
#
1d760ce8 |
| 10-Nov-2010 |
Dan Gohman <gohman@apple.com> |
Factor out the code for computing an AliasAnalysis::Location for a given instruction into a helper function.
llvm-svn: 118723
|
#
2e8ca44b |
| 10-Nov-2010 |
Dan Gohman <gohman@apple.com> |
Fully invalidate cached results when a prior query's size or type is insufficient for, or incompatible with, the current query.
llvm-svn: 118721
|