summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/BasicAliasAnalysis.cpp2
-rw-r--r--llvm/lib/Analysis/ConstantFolding.cpp6
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp2
-rw-r--r--llvm/lib/Analysis/ValueTracking.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
index fe71f04098b..d9587463591 100644
--- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
@@ -123,7 +123,7 @@ static bool isObjectSmallerThan(const Value *V, unsigned Size,
}
if (AccessTy->isSized())
- return TD.getTypePaddedSize(AccessTy) < Size;
+ return TD.getTypeAllocSize(AccessTy) < Size;
return false;
}
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
index 7c99325b2dd..00b54413aa2 100644
--- a/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/llvm/lib/Analysis/ConstantFolding.cpp
@@ -77,7 +77,7 @@ static bool IsConstantOffsetFromGlobal(Constant *C, GlobalValue *&GV,
Offset += TD.getStructLayout(ST)->getElementOffset(CI->getZExtValue());
} else {
const SequentialType *SQT = cast<SequentialType>(*GTI);
- Offset += TD.getTypePaddedSize(SQT->getElementType())*CI->getSExtValue();
+ Offset += TD.getTypeAllocSize(SQT->getElementType())*CI->getSExtValue();
}
}
return true;
@@ -405,8 +405,8 @@ Constant *llvm::ConstantFoldInstOperands(unsigned Opcode, const Type *DestTy,
if (const ArrayType *AT =
dyn_cast<ArrayType>(GVTy->getElementType())) {
const Type *ElTy = AT->getElementType();
- uint64_t PaddedSize = TD->getTypePaddedSize(ElTy);
- APInt PSA(L->getValue().getBitWidth(), PaddedSize);
+ uint64_t AllocSize = TD->getTypeAllocSize(ElTy);
+ APInt PSA(L->getValue().getBitWidth(), AllocSize);
if (ElTy == cast<PointerType>(DestTy)->getElementType() &&
L->getValue().urem(PSA) == 0) {
APInt ElemIdx = L->getValue().udiv(PSA);
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 3f2656240e4..e65cdd218a7 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -1961,7 +1961,7 @@ SCEVHandle ScalarEvolution::createNodeForGEP(User *GEP) {
IntPtrTy);
LocalOffset =
getMulExpr(LocalOffset,
- getIntegerSCEV(TD->getTypePaddedSize(*GTI),
+ getIntegerSCEV(TD->getTypeAllocSize(*GTI),
IntPtrTy));
TotalOffset = getAddExpr(TotalOffset, LocalOffset);
}
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 20fa69ea24f..c4f6faf612f 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -459,7 +459,7 @@ void llvm::ComputeMaskedBits(Value *V, const APInt &Mask,
const Type *IndexedTy = GTI.getIndexedType();
if (!IndexedTy->isSized()) return;
unsigned GEPOpiBits = Index->getType()->getPrimitiveSizeInBits();
- uint64_t TypeSize = TD ? TD->getTypePaddedSize(IndexedTy) : 1;
+ uint64_t TypeSize = TD ? TD->getTypeAllocSize(IndexedTy) : 1;
LocalMask = APInt::getAllOnesValue(GEPOpiBits);
LocalKnownZero = LocalKnownOne = APInt(GEPOpiBits, 0);
ComputeMaskedBits(Index, LocalMask,
OpenPOWER on IntegriCloud