[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LICM.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Dec 14 23:22:37 PST 2004



Changes in directory llvm/lib/Transforms/Scalar:

LICM.cpp updated: 1.69 -> 1.70
---
Log message:

Adjust to new interfaces


---
Diffs of the changes:  (+3 -2)

Index: llvm/lib/Transforms/Scalar/LICM.cpp
diff -u llvm/lib/Transforms/Scalar/LICM.cpp:1.69 llvm/lib/Transforms/Scalar/LICM.cpp:1.70
--- llvm/lib/Transforms/Scalar/LICM.cpp:1.69	Mon Nov 29 15:26:12 2004
+++ llvm/lib/Transforms/Scalar/LICM.cpp	Wed Dec 15 01:22:25 2004
@@ -358,9 +358,10 @@
   } 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;






More information about the llvm-commits mailing list