[PATCH] D61962: [WIP][LoopUnroll] Add support for loops with exiting headers and uncond latches.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 4 16:11:39 PDT 2019


fhahn added a comment.

In D61962#1503748 <https://reviews.llvm.org/D61962#1503748>, @efriedma wrote:

> If the loop is being completely unrolled, and the latch is unconditional, that implies the latch is unreachable.  So you can just rewrite the terminator to an "unreachable", rather than making it connect to the exit.  I think that would simplify the implementation a bit?


Done, thanks Eli. I've adjusted the inner loop in llvm/test/Transforms/LoopUnroll/runtime-li.ll to have multiple exits, to avoid unrolling it. Otherwise we fail to unroll the outer loop currently, because the unreachable terminator makes the block treated an exit block (no successors in the loop). SimplfiyCFG should take care of that later.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61962





More information about the llvm-commits mailing list