[PATCH] D102615: [LoopDeletion] Break backedge if we can prove that the loop is exited on 1st iteration (try 3)

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 31 21:36:01 PDT 2021


mkazantsev updated this revision to Diff 348875.
mkazantsev retitled this revision from "[LoopDeletion] Break backedge if we can prove that the loop is exited on 1st iteration" to "[LoopDeletion] Break backedge if we can prove that the loop is exited on 1st iteration (try 3)".
mkazantsev added a comment.

Root cause: another case of irreducible CFG I didn't filter out. As result, RPOT makes no sense. Checked in failing unit test as https://reviews.llvm.org/rG4ef47eaed952. Added an assert decting this.

Turning off the transform for irreducible CFG at all. The potential win isn't worth problems it is causing. Should have followed David's advice in the first place.

I still want to have an option (on by default now) to be able to switch off this transform if required.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102615/new/

https://reviews.llvm.org/D102615

Files:
  llvm/lib/Transforms/Scalar/LoopDeletion.cpp
  llvm/test/Transforms/LoopDeletion/eval_first_iteration.ll
  llvm/test/Transforms/LoopDeletion/zero-btc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102615.348875.patch
Type: text/x-patch
Size: 18745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210601/b2571f50/attachment.bin>


More information about the llvm-commits mailing list