[PATCH] D73423: [LV] Do not try to sink dead instructions.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 08:58:36 PST 2020


fhahn marked an inline comment as done.
fhahn added inline comments.


================
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());
----------------
fhahn wrote:
> gilr wrote:
> > Independently, this belongs in collectTriviallyDeadInstructions(), right?
> I am not sure if it makes sense to put them there. As indicated in the comment, we really should handle them properly. They are not really dead, it's more that dropping them is the easiest way to handle them legally and adding them to DeadInstructions is the quickest way to not add them to the plan.
> 
> It should be initialized in the caller though I think. I'll put that up as a follow-up change.
I've pushed a commit moving this to the caller https://reviews.llvm.org/rGd1f849a284d9


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