aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Vectorize
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2012-02-10 15:52:40 +0000
committerHal Finkel <hfinkel@anl.gov>2012-02-10 15:52:40 +0000
commit38a7f22445b8782682d1f8f253454ea0390d4ac5 (patch)
treee5bc4e0a6384b5ff4e4a5f8b9b6202b221eaf814 /lib/Transforms/Vectorize
parentce0dd7314b59ffa427d2207cd289ad75f89062b5 (diff)
downloadexternal_llvm-38a7f22445b8782682d1f8f253454ea0390d4ac5.zip
external_llvm-38a7f22445b8782682d1f8f253454ea0390d4ac5.tar.gz
external_llvm-38a7f22445b8782682d1f8f253454ea0390d4ac5.tar.bz2
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
Diffstat (limited to 'lib/Transforms/Vectorize')
-rw-r--r--lib/Transforms/Vectorize/BBVectorize.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib/Transforms/Vectorize/BBVectorize.cpp b/lib/Transforms/Vectorize/BBVectorize.cpp
index ea26c1a..9592d25 100644
--- a/lib/Transforms/Vectorize/BBVectorize.cpp
+++ b/lib/Transforms/Vectorize/BBVectorize.cpp
@@ -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;
}
}
}