mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-27 15:02:16 +00:00
Ok, the assertion was bogus. Calls that do not read/write memory should not
have an alias set, just like adds and subtracts don't. llvm-svn: 12422
This commit is contained in:
parent
5654b5de80
commit
19ce9dbb05
@ -117,6 +117,8 @@ void AliasSet::addCallSite(CallSite CS, AliasAnalysis &AA) {
|
||||
bool AliasSet::aliasesPointer(const Value *Ptr, unsigned Size,
|
||||
AliasAnalysis &AA) const {
|
||||
if (AliasTy == MustAlias) {
|
||||
assert(CallSites.empty() && "Illegal must alias set!");
|
||||
|
||||
// If this is a set of MustAliases, only check to see if the pointer aliases
|
||||
// SOME value in the set...
|
||||
HashNodePair *SomePtr = getSomePointer();
|
||||
@ -222,6 +224,10 @@ void AliasSetTracker::add(StoreInst *SI) {
|
||||
|
||||
|
||||
void AliasSetTracker::add(CallSite CS) {
|
||||
if (Function *F = CS.getCalledFunction())
|
||||
if (AA.doesNotAccessMemory(F))
|
||||
return;
|
||||
|
||||
AliasSet *AS = findAliasSetForCallSite(CS);
|
||||
if (!AS) {
|
||||
AliasSets.push_back(AliasSet());
|
||||
|
Loading…
x
Reference in New Issue
Block a user