aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorSander de Smalen <sander.desmalen@arm.com>2021-01-27 10:52:58 +0000
committerSander de Smalen <sander.desmalen@arm.com>2021-04-14 17:20:35 +0100
commit1af35e77f4b8c3314dc20a10d579b52f22c75a00 (patch)
treee8ea94f89788a53d762521b24c8696a7c33b0472 /llvm/lib/Analysis
parent174e8f6c5e467d403272715c8649134f350ff2c7 (diff)
downloadllvm-1af35e77f4b8c3314dc20a10d579b52f22c75a00.zip
llvm-1af35e77f4b8c3314dc20a10d579b52f22c75a00.tar.gz
llvm-1af35e77f4b8c3314dc20a10d579b52f22c75a00.tar.bz2
[TTI] NFC: Change getVectorInstrCost 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 Reviewed By: dmgreen Differential Revision: https://reviews.llvm.org/D100315
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/TargetTransformInfo.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp
index 5b49d23..14fc8e8 100644
--- a/llvm/lib/Analysis/TargetTransformInfo.cpp
+++ b/llvm/lib/Analysis/TargetTransformInfo.cpp
@@ -809,9 +809,10 @@ InstructionCost TargetTransformInfo::getCmpSelInstrCost(
return Cost;
}
-int TargetTransformInfo::getVectorInstrCost(unsigned Opcode, Type *Val,
- unsigned Index) const {
- int Cost = TTIImpl->getVectorInstrCost(Opcode, Val, Index);
+InstructionCost TargetTransformInfo::getVectorInstrCost(unsigned Opcode,
+ Type *Val,
+ unsigned Index) const {
+ InstructionCost Cost = TTIImpl->getVectorInstrCost(Opcode, Val, Index);
assert(Cost >= 0 && "TTI should not produce negative costs!");
return Cost;
}