[llvm-commits] CVS: llvm/lib/Analysis/BasicAliasAnalysis.cpp
Chris Lattner
sabre at nondot.org
Sat Feb 10 12:35:38 PST 2007
Changes in directory llvm/lib/Analysis:
BasicAliasAnalysis.cpp updated: 1.103 -> 1.104
---
Log message:
eliminate use of TargetData::getIndexedOffset that takes a vector
---
Diffs of the changes: (+11 -5)
BasicAliasAnalysis.cpp | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
Index: llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff -u llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.103 llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.104
--- llvm/lib/Analysis/BasicAliasAnalysis.cpp:1.103 Mon Feb 5 17:42:17 2007
+++ llvm/lib/Analysis/BasicAliasAnalysis.cpp Sat Feb 10 14:35:22 2007
@@ -436,7 +436,9 @@
GEPOperands[i] =
Constant::getNullValue(GEPOperands[i]->getType());
int64_t Offset =
- getTargetData().getIndexedOffset(BasePtr->getType(), GEPOperands);
+ getTargetData().getIndexedOffset(BasePtr->getType(),
+ &GEPOperands[0],
+ GEPOperands.size());
if (Offset >= (int64_t)V2Size || Offset <= -(int64_t)V1Size)
return NoAlias;
@@ -617,11 +619,13 @@
// Okay, now get the offset. This is the relative offset for the full
// instruction.
const TargetData &TD = getTargetData();
- int64_t Offset1 = TD.getIndexedOffset(GEPPointerTy, GEP1Ops);
+ int64_t Offset1 = TD.getIndexedOffset(GEPPointerTy, &GEP1Ops[0],
+ GEP1Ops.size());
// Now crop off any constants from the end...
GEP1Ops.resize(MinOperands);
- int64_t Offset2 = TD.getIndexedOffset(GEPPointerTy, GEP1Ops);
+ int64_t Offset2 = TD.getIndexedOffset(GEPPointerTy, &GEP1Ops[0],
+ GEP1Ops.size());
// If the tail provided a bit enough offset, return noalias!
if ((uint64_t)(Offset2-Offset1) >= SizeMax)
@@ -731,8 +735,10 @@
}
if (GEPPointerTy->getElementType()->isSized()) {
- int64_t Offset1 = getTargetData().getIndexedOffset(GEPPointerTy, GEP1Ops);
- int64_t Offset2 = getTargetData().getIndexedOffset(GEPPointerTy, GEP2Ops);
+ int64_t Offset1 =
+ getTargetData().getIndexedOffset(GEPPointerTy,&GEP1Ops[0],GEP1Ops.size());
+ int64_t Offset2 =
+ getTargetData().getIndexedOffset(GEPPointerTy,&GEP2Ops[0],GEP2Ops.size());
assert(Offset1<Offset2 && "There is at least one different constant here!");
if ((uint64_t)(Offset2-Offset1) >= SizeMax) {
More information about the llvm-commits
mailing list