aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
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/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
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/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp')
-rw-r--r--llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp b/llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
index 1357860..d8ccf44 100644
--- a/llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
+++ b/llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp
@@ -81,9 +81,11 @@ unsigned WebAssemblyTTIImpl::getArithmeticInstrCost(
return Cost;
}
-unsigned WebAssemblyTTIImpl::getVectorInstrCost(unsigned Opcode, Type *Val,
- unsigned Index) {
- unsigned Cost = BasicTTIImplBase::getVectorInstrCost(Opcode, Val, Index);
+InstructionCost WebAssemblyTTIImpl::getVectorInstrCost(unsigned Opcode,
+ Type *Val,
+ unsigned Index) {
+ InstructionCost Cost =
+ BasicTTIImplBase::getVectorInstrCost(Opcode, Val, Index);
// SIMD128's insert/extract currently only take constant indices.
if (Index == -1u)