[PATCH] D80773: [SLP] Apply external to vectorizable tree users cost adjustment for relevant aggregate build instructions only (UserCost).
Alexey Bataev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 29 06:29:15 PDT 2020
ABataev added inline comments.
================
Comment at: llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h:104
+ bool AllowReorder = false,
+ ArrayRef<Value *> InsertUses = {});
----------------
`= None`
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5987
+ bool compensateUseCost =
+ InsertUses.size() != 0 && llvm::all_of(InsertUses, [](const Value *V) {
----------------
`CompensateUseCost`
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:5988
+ bool compensateUseCost =
+ InsertUses.size() != 0 && llvm::all_of(InsertUses, [](const Value *V) {
+ return V && isa<InsertElementInst>(V);
----------------
`!InsertUses.empty()` instead of `InsertUses.size() != 0`
================
Comment at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:6068
+ // and tends to create bias toward favoring vectorization.
+ // Swithing to the TTI interface might help a bit.
+ // Alternative solution could be pattern-match to detect a no-op or
----------------
Switching
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80773/new/
https://reviews.llvm.org/D80773
More information about the llvm-commits
mailing list