From: Chris Lattner Date: Wed, 15 Dec 2004 07:22:25 +0000 (+0000) Subject: Adjust to new interfaces X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=68a9d3eb38d78e851cce532ffa307a89373036c6;p=oota-llvm.git Adjust to new interfaces git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18958 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index c20e179f107..15c98a5393f 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/lib/Transforms/Scalar/LICM.cpp @@ -358,9 +358,10 @@ bool LICM::canSinkOrHoistInst(Instruction &I) { } else if (CallInst *CI = dyn_cast(&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;