[PATCH] D133441: [SLP] Look ahead for mutual horizontal reductions.
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 7 11:38:22 PDT 2022
ABataev added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:11035-11038
+ for (ArrayRef<Value *> RdxOps : ReductionOps)
+ for (Value *RdxOp : RdxOps)
+ if (RdxOp)
+ V.addHorizontalReduction(RdxOp);
----------------
Not sure it is a good idea to store reduction ops here, you're working with reduced values actually.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:11778
SmallPtrSet<Value *, 8> VisitedInstrs;
+ Optional<HorizontalReduction> PendingReduction = None;
bool Res = false;
----------------
Why do you need this one? In case of successful reduction, the vectorizer restarts the analysis and rebuilds the reduction graph.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133441/new/
https://reviews.llvm.org/D133441
More information about the llvm-commits
mailing list