[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LICM.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Feb 26 13:30:01 PST 2003
Changes in directory llvm/lib/Transforms/Scalar:
LICM.cpp updated: 1.21 -> 1.22
---
Log message:
Convert to work with new AliasAnalysis interface by conservatively assuming all pointers are arbitrarily large accesses
---
Diffs of the changes:
Index: llvm/lib/Transforms/Scalar/LICM.cpp
diff -u llvm/lib/Transforms/Scalar/LICM.cpp:1.21 llvm/lib/Transforms/Scalar/LICM.cpp:1.22
--- llvm/lib/Transforms/Scalar/LICM.cpp:1.21 Sun Feb 23 21:52:32 2003
+++ llvm/lib/Transforms/Scalar/LICM.cpp Wed Feb 26 13:28:55 2003
@@ -123,17 +123,17 @@
LoopBodyInfo::PointerClass LoopBodyInfo::calculatePointerInfo(Value *V,
AliasAnalysis &AA) const {
for (unsigned i = 0, e = Calls.size(); i != e; ++i)
- if (AA.canCallModify(*Calls[i], V))
+ if (AA.getModRefInfo(Calls[i], V, ~0))
return PointerMayStore;
for (unsigned i = 0, e = Invokes.size(); i != e; ++i)
- if (AA.canInvokeModify(*Invokes[i], V))
+ if (AA.getModRefInfo(Invokes[i], V, ~0))
return PointerMayStore;
PointerClass Result = PointerNoStore;
for (std::set<Value*>::const_iterator I = StoredPointers.begin(),
E = StoredPointers.end(); I != E; ++I)
- if (AA.alias(V, *I))
+ if (AA.alias(V, ~0, *I, ~0))
if (V == *I)
Result = PointerMustStore; // If this is the only alias, return must
else
@@ -485,7 +485,7 @@
bool PointerOk = true;
for (std::set<Value*>::const_iterator I =CurLBI->LoadedPointers.begin(),
E = CurLBI->LoadedPointers.end(); I != E; ++I)
- if (AA->alias(V, *I) == AliasAnalysis::MayAlias) {
+ if (AA->alias(V, ~0, *I, ~0) == AliasAnalysis::MayAlias) {
PointerOk = false;
break;
}
@@ -503,13 +503,13 @@
for (std::set<Value*>::const_iterator
I = CurLBI->LoadedPointers.begin(),
E = CurLBI->LoadedPointers.end(); I != E; ++I)
- if (AA->alias(V, *I) == AliasAnalysis::MustAlias)
+ if (AA->alias(V, ~0, *I, ~0) == AliasAnalysis::MustAlias)
ValueToAllocaMap[*I] = AI;
for (std::set<Value*>::const_iterator
I = CurLBI->StoredPointers.begin(),
E = CurLBI->StoredPointers.end(); I != E; ++I)
- if (AA->alias(V, *I) == AliasAnalysis::MustAlias)
+ if (AA->alias(V, ~0, *I, ~0) == AliasAnalysis::MustAlias)
ValueToAllocaMap[*I] = AI;
}
}
More information about the llvm-commits
mailing list