diff options
author | Chris Lattner <sabre@nondot.org> | 2007-02-10 20:35:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-02-10 20:35:22 +0000 |
commit | c44bd78a2ebc9188e02393bbd074e2b5a418b6db (patch) | |
tree | 69a9445b8cda000d1e65d9c7ebe8259bec1a92d5 /llvm/lib/Analysis/BasicAliasAnalysis.cpp | |
parent | b402e74fcd68029c29230597fc9386edb389b41d (diff) | |
download | bcm5719-llvm-c44bd78a2ebc9188e02393bbd074e2b5a418b6db.tar.gz bcm5719-llvm-c44bd78a2ebc9188e02393bbd074e2b5a418b6db.zip |
eliminate use of TargetData::getIndexedOffset that takes a vector
llvm-svn: 34163
Diffstat (limited to 'llvm/lib/Analysis/BasicAliasAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/BasicAliasAnalysis.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp index e6b81be1720..e65c173bd22 100644 --- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp +++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp @@ -436,7 +436,9 @@ BasicAliasAnalysis::alias(const Value *V1, unsigned V1Size, 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 @@ BasicAliasAnalysis::CheckGEPInstructions( // 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 @@ BasicAliasAnalysis::CheckGEPInstructions( } 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) { |