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

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 21 05:00:29 PDT 2021


mkazantsev updated this revision to Diff 346989.
mkazantsev edited the summary of this revision.
mkazantsev added a comment.

Basing on our conversation with Philip, I've reframed it not as backward traversal, but topological walk by blocks live on 1st iteration.

As a follow-up, after we've proven 1 iteration, we can also break all non-taken edges.


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/noop-loops-with-subloops.ll
  llvm/test/Transforms/LoopDeletion/zero-btc.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102615.346989.patch
Type: text/x-patch
Size: 18032 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210521/54c7bad7/attachment.bin>


More information about the llvm-commits mailing list