diff options
author | Duncan Sands <baldrick@free.fr> | 2009-05-09 07:06:46 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2009-05-09 07:06:46 +0000 |
commit | 777d2306b36816a53bc1ae1244c0dc7d998ae691 (patch) | |
tree | 0e48f8284a5e10d4f43e51986e586740ab6eb029 /lib/Transforms/Scalar/MemCpyOptimizer.cpp | |
parent | 09560f805ef53e5876d025dbbf63a3244e15f8a6 (diff) | |
download | external_llvm-777d2306b36816a53bc1ae1244c0dc7d998ae691.zip external_llvm-777d2306b36816a53bc1ae1244c0dc7d998ae691.tar.gz external_llvm-777d2306b36816a53bc1ae1244c0dc7d998ae691.tar.bz2 |
Rename PaddedSize to AllocSize, in the hope that this
will make it more obvious what it represents, and stop
it being confused with the StoreSize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71349 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/MemCpyOptimizer.cpp')
-rw-r--r-- | lib/Transforms/Scalar/MemCpyOptimizer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/lib/Transforms/Scalar/MemCpyOptimizer.cpp index b6c4c45..5cf0518 100644 --- a/lib/Transforms/Scalar/MemCpyOptimizer.cpp +++ b/lib/Transforms/Scalar/MemCpyOptimizer.cpp @@ -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; |