[llvm] a8b35e0 - [TTI] NFC: Change getVectorSplitCost to return InstructionCost
via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 21 07:32:17 PDT 2021
Author: dfukalov
Date: 2021-04-21T17:32:02+03:00
New Revision: a8b35e0f5230c9c12ff9046283137cb907fc1230
URL: https://github.com/llvm/llvm-project/commit/a8b35e0f5230c9c12ff9046283137cb907fc1230
DIFF: https://github.com/llvm/llvm-project/commit/a8b35e0f5230c9c12ff9046283137cb907fc1230.diff
LOG: [TTI] NFC: Change getVectorSplitCost 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: sdesmalen
Differential Revision: https://reviews.llvm.org/D100952
Added:
Modified:
llvm/include/llvm/CodeGen/BasicTTIImpl.h
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/CodeGen/BasicTTIImpl.h b/llvm/include/llvm/CodeGen/BasicTTIImpl.h
index adf1fb83ead0..0be18451d9d8 100644
--- a/llvm/include/llvm/CodeGen/BasicTTIImpl.h
+++ b/llvm/include/llvm/CodeGen/BasicTTIImpl.h
@@ -2087,7 +2087,7 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
return RedCost + MulCost + ExtCost;
}
- unsigned getVectorSplitCost() { return 1; }
+ InstructionCost getVectorSplitCost() { return 1; }
/// @}
};
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
index 03f737477b1f..e4e816a7a74e 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
@@ -197,7 +197,7 @@ class GCNTTIImpl final : public BasicTTIImplBase<GCNTTIImpl> {
std::function<void(Instruction *, unsigned, APInt, APInt &)>
SimplifyAndSetOp) const;
- unsigned getVectorSplitCost() { return 0; }
+ InstructionCost getVectorSplitCost() { return 0; }
InstructionCost getShuffleCost(TTI::ShuffleKind Kind, VectorType *Tp,
ArrayRef<int> Mask, int Index,
More information about the llvm-commits
mailing list