summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2011-05-21 20:54:46 +0000
committerDuncan Sands <baldrick@free.fr>2011-05-21 20:54:46 +0000
commit5ec65765e6c19c19f3d4a1ad4938e7ccf24177e1 (patch)
treedc61b7e615e01f5f1b71b7755f1c6421ddbfd31d /llvm/lib/Analysis/BasicAliasAnalysis.cpp
parent5c12367b441b8c673f6afec5e5389ef55eefe5e3 (diff)
downloadbcm5719-llvm-5ec65765e6c19c19f3d4a1ad4938e7ccf24177e1.tar.gz
bcm5719-llvm-5ec65765e6c19c19f3d4a1ad4938e7ccf24177e1.zip
Revert commit 131781, to see if it fixes the x86-64 dragonegg buildbot.
Original log message: When BasicAA can determine that two pointers have the same base but differ by a dynamic offset, return PartialAlias instead of MayAlias. See the comment in the code for details. This fixes PR9971. llvm-svn: 131809
Diffstat (limited to 'llvm/lib/Analysis/BasicAliasAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/BasicAliasAnalysis.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
index f50660844fe..f1bb8a38f09 100644
--- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
@@ -940,17 +940,7 @@ BasicAliasAnalysis::aliasGEP(const GEPOperator *GEP1, uint64_t V1Size,
return NoAlias;
}
- // Statically, we can see that the base objects are the same, but the
- // pointers have dynamic offsets which we can't resolve. And none of our
- // little tricks above worked.
- //
- // TODO: Returning PartialAlias instead of MayAlias is a mild hack; the
- // practical effect of this is protecting TBAA in the case of dynamic
- // indices into arrays of unions. An alternative way to solve this would
- // be to have clang emit extra metadata for unions and/or union accesses.
- // A union-specific solution wouldn't handle the problem for malloc'd
- // memory however.
- return PartialAlias;
+ return MayAlias;
}
/// aliasSelect - Provide a bunch of ad-hoc rules to disambiguate a Select
OpenPOWER on IntegriCloud