1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/Transforms/LoopDeletion
Philip Reames c08128ee52 [LoopDeletion] Handle inner loops w/untaken backedges
This builds on the restricted after initial revert form of D93906, and adds back support for breaking backedges of inner loops. It turns out the original invalidation logic wasn't quite right, specifically around the handling of LCSSA.

When breaking the backedge of an inner loop, we can cause blocks which were in the outer loop only because they were also included in a sub-loop to be removed from both loops. This results in the exit block set for our original parent loop changing, and thus a need for new LCSSA phi nodes.

This case happens when the inner loop has an exit block which is also an exit block of the parent, and there's a block in the child which reaches an exit to said block without also reaching an exit to the parent loop.

(I'm describing this in terms of the immediate parent, but the problem is general for any transitive parent in the nest.)

The approach implemented here involves a potentially expensive LCSSA rebuild.  Perf testing during review didn't show anything concerning, but we may end up needing to revert this if anyone encounters a practical compile time issue.

Differential Revision: https://reviews.llvm.org/D94378
2021-01-22 16:31:29 -08:00
..
2007-07-23-InfiniteLoop.ll
2008-05-06-Phi.ll
2011-06-21-phioperands.ll
2017-07-11-incremental-dt.ll
assume.ll
basic-remark.ll
crashbc.ll
dcetest.ll
diundef.ll
invalidation.ll
multiple-exit-conditions.ll
multiple-exits.ll
mustprogress.ll
no-exit-blocks.ll
noop-loops-with-subloops.ll
simplify-then-delete.ll
unreachable-loops.ll
update-scev.ll [LoopDeletion] Break backedge of outermost loops when known not taken 2021-01-10 16:02:33 -08:00
use-in-unreachable.ll
zero-btc.ll [LoopDeletion] Handle inner loops w/untaken backedges 2021-01-22 16:31:29 -08:00