[PATCH] D102920: [SLP]Better detection of perfect/shuffles matches for gather nodes.
Eric Christopher via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 21 09:48:39 PDT 2021
echristo added a comment.
Given the iterations here I think that it needs a lot of inline documentation for cost model of what you're doing and what it's expecting here.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3708
+ }
+ if (isSplat(VL)) {
+ return ReuseShuffleCost +
----------------
This needs to be documented as to what you're doing and what it means in the code.
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:3713
}
- return ReuseShuffleCost + GatherCost;
+ if (E->getOpcode() == Instruction::ExtractElement && allSameType(VL) &&
+ allSameBlock(VL)) {
----------------
Same :)
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:4431
+ // found not a shuffle.
+ SmallVector<SmallPtrSet<const TreeEntry *, 4>> UsedTEs;
+ DenseMap<Value *, int> UsedValuesEntry;
----------------
Please document this :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102920/new/
https://reviews.llvm.org/D102920
More information about the llvm-commits
mailing list