Update BBVectorize to use aliasesUnknownInst.

This allows BBVectorize to check the "unknown instruction" list in the
alias sets. This is important to prevent instruction fusing from reordering
function calls. Resolves PR11920.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150250 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Hal Finkel
2012-02-10 15:52:40 +00:00
parent ce0dd7314b
commit 38a7f22445
2 changed files with 247 additions and 9 deletions

View File

@@ -692,16 +692,10 @@ namespace {
} else {
for (AliasSetTracker::iterator W = WriteSet.begin(),
WE = WriteSet.end(); W != WE; ++W) {
for (AliasSet::iterator A = W->begin(), AE = W->end();
A != AE; ++A) {
AliasAnalysis::Location ptrLoc(A->getValue(), A->getSize(),
A->getTBAAInfo());
if (AA->getModRefInfo(J, ptrLoc) != AliasAnalysis::NoModRef) {
UsesI = true;
break;
}
if (W->aliasesUnknownInst(J, *AA)) {
UsesI = true;
break;
}
if (UsesI) break;
}
}
}