diff options
author | Guillaume Chatelet <gchatelet@google.com> | 2023-01-11 16:34:43 +0000 |
---|---|---|
committer | Guillaume Chatelet <gchatelet@google.com> | 2023-01-11 16:36:39 +0000 |
commit | 48f5d77eeed4d7453d199c4b4ac16c1bbfbdbddf (patch) | |
tree | 86f5b6a24a773b4632211ba76f22c3b59823e9d9 /llvm/lib/Analysis/InlineCost.cpp | |
parent | 0d9afee3d159f5b7cdac7637808f3e25ff16a536 (diff) | |
download | llvm-48f5d77eeed4d7453d199c4b4ac16c1bbfbdbddf.zip llvm-48f5d77eeed4d7453d199c4b4ac16c1bbfbdbddf.tar.gz llvm-48f5d77eeed4d7453d199c4b4ac16c1bbfbdbddf.tar.bz2 |
[NFC] Use TypeSize::getKnownMinValue() instead of TypeSize::getKnownMinSize()
This change is one of a series to implement the discussion from
https://reviews.llvm.org/D141134.
Diffstat (limited to 'llvm/lib/Analysis/InlineCost.cpp')
-rw-r--r-- | llvm/lib/Analysis/InlineCost.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/InlineCost.cpp b/llvm/lib/Analysis/InlineCost.cpp index 309da99..bce71b2 100644 --- a/llvm/lib/Analysis/InlineCost.cpp +++ b/llvm/lib/Analysis/InlineCost.cpp @@ -1394,7 +1394,7 @@ bool CallAnalyzer::visitAlloca(AllocaInst &I) { Type *Ty = I.getAllocatedType(); AllocatedSize = SaturatingMultiplyAdd( AllocSize->getLimitedValue(), - DL.getTypeAllocSize(Ty).getKnownMinSize(), AllocatedSize); + DL.getTypeAllocSize(Ty).getKnownMinValue(), AllocatedSize); if (AllocatedSize > InlineConstants::MaxSimplifiedDynamicAllocaToInline) HasDynamicAlloca = true; return false; @@ -1404,8 +1404,8 @@ bool CallAnalyzer::visitAlloca(AllocaInst &I) { // Accumulate the allocated size. if (I.isStaticAlloca()) { Type *Ty = I.getAllocatedType(); - AllocatedSize = - SaturatingAdd(DL.getTypeAllocSize(Ty).getKnownMinSize(), AllocatedSize); + AllocatedSize = SaturatingAdd(DL.getTypeAllocSize(Ty).getKnownMinValue(), + AllocatedSize); } // FIXME: This is overly conservative. Dynamic allocas are inefficient for |