[llvm] e8dd4df - [NFC][TTI] Mark `getReplicationShuffleCost()` as `const` (#92194)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 22 09:44:14 PDT 2024
Author: Tyler Lanphear
Date: 2024-05-22T09:44:10-07:00
New Revision: e8dd4df72bb5f63a235359d46d7825fe46761ed2
URL: https://github.com/llvm/llvm-project/commit/e8dd4df72bb5f63a235359d46d7825fe46761ed2
DIFF: https://github.com/llvm/llvm-project/commit/e8dd4df72bb5f63a235359d46d7825fe46761ed2.diff
LOG: [NFC][TTI] Mark `getReplicationShuffleCost()` as `const` (#92194)
Added:
Modified:
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/lib/Analysis/TargetTransformInfo.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/TargetTransformInfo.h b/llvm/include/llvm/Analysis/TargetTransformInfo.h
index 0c3a6b3742c73..cefce93f9e25c 100644
--- a/llvm/include/llvm/Analysis/TargetTransformInfo.h
+++ b/llvm/include/llvm/Analysis/TargetTransformInfo.h
@@ -1397,7 +1397,7 @@ class TargetTransformInfo {
InstructionCost getReplicationShuffleCost(Type *EltTy, int ReplicationFactor,
int VF,
const APInt &DemandedDstElts,
- TTI::TargetCostKind CostKind);
+ TTI::TargetCostKind CostKind) const;
/// \return The cost of Load and Store instructions.
InstructionCost
diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp
index f6a458f7ded46..82b6d7e7c4833 100644
--- a/llvm/lib/Analysis/TargetTransformInfo.cpp
+++ b/llvm/lib/Analysis/TargetTransformInfo.cpp
@@ -1037,7 +1037,7 @@ TargetTransformInfo::getVectorInstrCost(const Instruction &I, Type *Val,
InstructionCost TargetTransformInfo::getReplicationShuffleCost(
Type *EltTy, int ReplicationFactor, int VF, const APInt &DemandedDstElts,
- TTI::TargetCostKind CostKind) {
+ TTI::TargetCostKind CostKind) const {
InstructionCost Cost = TTIImpl->getReplicationShuffleCost(
EltTy, ReplicationFactor, VF, DemandedDstElts, CostKind);
assert(Cost >= 0 && "TTI should not produce negative costs!");
More information about the llvm-commits
mailing list