diff options
author | Chris Lattner <sabre@nondot.org> | 2004-12-15 07:22:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-12-15 07:22:25 +0000 |
commit | b17f3e13ec7add443fe637711e67d77bd910d190 (patch) | |
tree | 42cd38382f78610e22506517f6e62b15e558ff9a /llvm/lib/Transforms/Scalar | |
parent | 71d04bce55095a05ead507681032becd70d2f8fd (diff) | |
download | bcm5719-llvm-b17f3e13ec7add443fe637711e67d77bd910d190.tar.gz bcm5719-llvm-b17f3e13ec7add443fe637711e67d77bd910d190.zip |
Adjust to new interfaces
llvm-svn: 18958
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LICM.cpp | 5 |
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; |