[llvm] [VPlan] First step towards VPlan cost modeling (LegacyCM in CostCtx) (PR #92555)
via llvm-commits
llvm-commits at lists.llvm.org
Tue May 28 02:36:37 PDT 2024
================
@@ -1621,6 +1622,12 @@ class LoopVectorizationCostModel {
/// \p VF is the vectorization factor chosen for the original loop.
bool isEpilogueVectorizationProfitable(const ElementCount VF) const;
+ /// Return the cost of instructions in an inloop reduction pattern, if I is
+ /// part of that pattern.
+ std::optional<InstructionCost>
+ getReductionPatternCost(Instruction *I, ElementCount VF, Type *VectorTy,
----------------
ayalz wrote:
> Will adjust separately.
Very well. Another suggestion is to use Invalid cost for "no cost" instead of optional.
https://github.com/llvm/llvm-project/pull/92555
More information about the llvm-commits
mailing list