[PATCH] D114101: [SLP]Improve analysis/emission of vector operands for alternate nodes.
Vasileios Porpodas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 23 14:35:21 PST 2021
vporpo added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5027
+ // main/alternate ops.
+ auto &&ExistMatchingNode = [this, E]() {
+ for (const std::unique_ptr<TreeEntry> &TE : VectorizableTree) {
----------------
I think a better place for this function is in BoUpSLP, there are methods that search the tree entries there, like `findReusedOrderedScalars(TE)`.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5032-5041
+ TE->getNumOperands() == E->getNumOperands() &&
+ ((TE->getOpcode() == E->getOpcode() &&
+ TE->getAltOpcode() == E->getAltOpcode()) ||
+ (TE->getOpcode() == E->getAltOpcode() &&
+ TE->getAltOpcode() == E->getOpcode()))) {
+ for (unsigned I = 0, End = E->getNumOperands(); I < End; ++I) {
+ if (TE->getOperand(I) != E->getOperand(I))
----------------
Could you place these checks in a method in `TreeEntry`? Perhaps as an `operator==()` ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114101/new/
https://reviews.llvm.org/D114101
More information about the llvm-commits
mailing list