[llvm] [NFC][SLP] Refactor so that CostKind is a property of BoUpSLP (PR #217463)

Ryan Buchner via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 20 08:57:55 PDT 2026


================
@@ -33,19 +33,18 @@ namespace llvm::slpvectorizer {
 /// Returns the cost of the shuffle instructions with the given \p Kind, vector
 /// type \p Tp and optional \p Mask. Adds SLP-specific cost estimation for
 /// insert subvector pattern.
-InstructionCost getShuffleCost(const TargetTransformInfo &TTI,
-                               TargetTransformInfo::ShuffleKind Kind,
-                               VectorType *Tp, ArrayRef<int> Mask = {},
-                               TargetTransformInfo::TargetCostKind CostKind =
-                                   TargetTransformInfo::TCK_RecipThroughput,
-                               int Index = 0, VectorType *SubTp = nullptr,
-                               ArrayRef<const Value *> Args = {});
----------------
bababuck wrote:

I reordered the function arguments since `CodeSize` no longer allows a default value. This is unfortunate since it no longer matches the signature of `TTI.getShuffleCost()`. However, when I removed the default value from the `TTI` version I will reorder the parameters there too.

https://github.com/llvm/llvm-project/pull/217463


More information about the llvm-commits mailing list