[PATCH] D73423: [LV] Do not try to sink dead instructions.
Gil Rapaport via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 26 04:11:58 PST 2020
gilr added inline comments.
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7163
+ // ingredients whose recipe we'll need to record. Dead instructions do not
+ // need sinking and we remove them from SinkAfter.
+ for (auto &Entry : make_early_inc_range(SinkAfter)) {
----------------
How about cleaning sink-after once, immediately after calling collectTriviallyDeadInstrucions()?
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7165
+ for (auto &Entry : make_early_inc_range(SinkAfter)) {
+ if (DeadInstructions.find(Entry.first) == DeadInstructions.end()) {
+ RecipeBuilder.recordRecipeOf(Entry.first);
----------------
DeadInstructions.count()?
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7199
// control flow is preserved, we should keep them.
auto &ConditionalAssumes = Legal->getConditionalAssumes();
DeadInstructions.insert(ConditionalAssumes.begin(), ConditionalAssumes.end());
----------------
Independently, this belongs in collectTriviallyDeadInstructions(), right?
================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:7231
if (isa<BranchInst>(Instr) ||
DeadInstructions.find(Instr) != DeadInstructions.end())
continue;
----------------
DeadInstructions.count()?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73423/new/
https://reviews.llvm.org/D73423
More information about the llvm-commits
mailing list