summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-12-15 07:22:25 +0000
committerChris Lattner <sabre@nondot.org>2004-12-15 07:22:25 +0000
commitb17f3e13ec7add443fe637711e67d77bd910d190 (patch)
tree42cd38382f78610e22506517f6e62b15e558ff9a /llvm/lib/Transforms
parent71d04bce55095a05ead507681032becd70d2f8fd (diff)
downloadbcm5719-llvm-b17f3e13ec7add443fe637711e67d77bd910d190.tar.gz
bcm5719-llvm-b17f3e13ec7add443fe637711e67d77bd910d190.zip
Adjust to new interfaces
llvm-svn: 18958
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/LICM.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index c20e179f107..15c98a5393f 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -358,9 +358,10 @@ bool LICM::canSinkOrHoistInst(Instruction &I) {
} else if (CallInst *CI = dyn_cast<CallInst>(&I)) {
// Handle obvious cases efficiently.
if (Function *Callee = CI->getCalledFunction()) {
- if (AA->doesNotAccessMemory(Callee))
+ AliasAnalysis::ModRefBehavior Behavior =AA->getModRefBehavior(Callee, CI);
+ if (Behavior == AliasAnalysis::DoesNotAccessMemory)
return true;
- else if (AA->onlyReadsMemory(Callee)) {
+ else if (Behavior == AliasAnalysis::OnlyReadsMemory) {
// If this call only reads from memory and there are no writes to memory
// in the loop, we can hoist or sink the call as appropriate.
bool FoundMod = false;
OpenPOWER on IntegriCloud