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
This commit is contained in:
Duncan Sands
2011-05-21 20:54:46 +00:00
parent ae6d5dc715
commit d22920aae8
3 changed files with 2 additions and 143 deletions

View File

@ -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