diff options
author | Sander de Smalen <sander.desmalen@arm.com> | 2021-01-27 15:01:16 +0000 |
---|---|---|
committer | Sander de Smalen <sander.desmalen@arm.com> | 2021-04-23 16:06:36 +0100 |
commit | f9a50f04bacdbb4dde147e8994443377f33e5f46 (patch) | |
tree | 4267ac8c069c05b43c420634db2ffb170c1727c9 /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | 43ace8b5ce07a90b3562bbd0488f88e6290627c4 (diff) | |
download | llvm-f9a50f04bacdbb4dde147e8994443377f33e5f46.zip llvm-f9a50f04bacdbb4dde147e8994443377f33e5f46.tar.gz llvm-f9a50f04bacdbb4dde147e8994443377f33e5f46.tar.bz2 |
[TTI] NFC: Change getIntImmCost[Inst|Intrin] to return InstructionCost
This patch migrates the TTI cost interfaces to return an InstructionCost.
See this patch for the introduction of the type: https://reviews.llvm.org/D91174
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2020-November/146408.html
Differential Revision: https://reviews.llvm.org/D100565
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 1eaf70b..11e393c 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -7661,9 +7661,8 @@ static bool tryUnmergingGEPsAcrossIndirectBr(GetElementPtrInst *GEPI, for (GetElementPtrInst *UGEPI : UGEPIs) { ConstantInt *UGEPIIdx = cast<ConstantInt>(UGEPI->getOperand(1)); APInt NewIdx = UGEPIIdx->getValue() - GEPIIdx->getValue(); - unsigned ImmCost = - TTI->getIntImmCost(NewIdx, GEPIIdx->getType(), - TargetTransformInfo::TCK_SizeAndLatency); + InstructionCost ImmCost = TTI->getIntImmCost( + NewIdx, GEPIIdx->getType(), TargetTransformInfo::TCK_SizeAndLatency); if (ImmCost > TargetTransformInfo::TCC_Basic) return false; } |