summaryrefslogtreecommitdiff
path: root/lib
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
commitd22920aae81ec318404f7c5235c634954d966cf6 (patch)
tree8317350099f872ed5c73a0ea96fea895a263056b /lib
parentae6d5dc715ec7d3edd825a4b8ca9f6f9a3fbfb58 (diff)
downloadllvm-d22920aae81ec318404f7c5235c634954d966cf6.tar.gz
llvm-d22920aae81ec318404f7c5235c634954d966cf6.tar.bz2
llvm-d22920aae81ec318404f7c5235c634954d966cf6.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131809 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/BasicAliasAnalysis.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp
index f50660844f..f1bb8a38f0 100644
--- a/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/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