Rename PaddedSize to AllocSize, in the hope that this
[oota-llvm.git] / lib / Transforms / Scalar / MemCpyOptimizer.cpp
index b6c4c45274a2181a49227a2bef70c2e2f58a752c..5cf05183ec0508d2e095e26f3e3fb4d86a4b6518 100644 (file)
@@ -104,7 +104,7 @@ static int64_t GetOffsetFromIndex(const GetElementPtrInst *GEP, unsigned Idx,
     
     // Otherwise, we have a sequential type like an array or vector.  Multiply
     // the index by the ElementSize.
-    uint64_t Size = TD.getTypePaddedSize(GTI.getIndexedType());
+    uint64_t Size = TD.getTypeAllocSize(GTI.getIndexedType());
     Offset += Size*OpC->getSExtValue();
   }
 
@@ -511,7 +511,7 @@ bool MemCpyOpt::performCallSlotOptzn(MemCpyInst *cpy, CallInst *C) {
   if (!srcArraySize)
     return false;
 
-  uint64_t srcSize = TD.getTypePaddedSize(srcAlloca->getAllocatedType()) *
+  uint64_t srcSize = TD.getTypeAllocSize(srcAlloca->getAllocatedType()) *
     srcArraySize->getZExtValue();
 
   if (cpyLength->getZExtValue() < srcSize)
@@ -526,7 +526,7 @@ bool MemCpyOpt::performCallSlotOptzn(MemCpyInst *cpy, CallInst *C) {
     if (!destArraySize)
       return false;
 
-    uint64_t destSize = TD.getTypePaddedSize(A->getAllocatedType()) *
+    uint64_t destSize = TD.getTypeAllocSize(A->getAllocatedType()) *
       destArraySize->getZExtValue();
 
     if (destSize < srcSize)
@@ -538,7 +538,7 @@ bool MemCpyOpt::performCallSlotOptzn(MemCpyInst *cpy, CallInst *C) {
       return false;
 
     const Type* StructTy = cast<PointerType>(A->getType())->getElementType();
-    uint64_t destSize = TD.getTypePaddedSize(StructTy);
+    uint64_t destSize = TD.getTypeAllocSize(StructTy);
 
     if (destSize < srcSize)
       return false;