[llvm] [LoopVectorizer] Add support for partial reductions (PR #92418)
Graham Hunter via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 13 03:25:48 PDT 2024
================
@@ -1556,7 +1556,105 @@ class LoopVectorizationCostModel {
getReductionPatternCost(Instruction *I, ElementCount VF, Type *VectorTy,
TTI::TargetCostKind CostKind) const;
+ using PartialReductionList = DenseMap<Instruction *, PartialReductionChain>;
+
+ PartialReductionList getPartialReductionChains() {
+ return PartialReductionChains;
+ }
+
+ bool getInstructionsPartialReduction(Instruction *I,
----------------
huntergr-arm wrote:
This could return a `std::optional<PartialReductionChain *>` to reduce the possibility of misuse.
https://github.com/llvm/llvm-project/pull/92418
More information about the llvm-commits
mailing list