1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/test/Transforms/LoopDeletion
Philip Reames b5eb31e440 [LoopDeletion] Break backedge of outermost loops when known not taken
This is a resubmit of dd6bb367 (which was reverted due to stage2 build failures in 7c63aac), with the additional restriction added to the transform to only consider outer most loops.

As shown in the added test case, ensuring LCSSA is up to date when deleting an inner loop is tricky as we may actually need to remove blocks from any outer loops, thus changing the exit block set.   For the moment, just avoid transforming this case.  I plan to return to this case in a follow up patch and see if we can do better.

Original commit message follows...

The basic idea is that if SCEV can prove the backedge isn't taken, we can go ahead and get rid of the backedge (and thus the loop) while leaving the rest of the control in place. This nicely handles cases with dispatch between multiple exits and internal side effects.

Differential Revision: https://reviews.llvm.org/D93906
2021-01-10 16:02:33 -08:00
..
2007-07-23-InfiniteLoop.ll
2008-05-06-Phi.ll [SimplifyCFG] Teach simplifyUnreachable() to preserve DomTree 2020-12-18 00:37:22 +03:00
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 [LoopDeletion] Allows deletion of possibly infinite side-effect free loops 2021-01-05 09:56:16 -05:00
no-exit-blocks.ll [LoopDeletion] Allows deletion of possibly infinite side-effect free loops 2021-01-05 09:56:16 -05:00
noop-loops-with-subloops.ll [LoopDeletion] Also consider loops with subloops for deletion. 2021-01-06 14:49:00 +00:00
simplify-then-delete.ll [SimplifyCFG] Teach SimplifyCondBranchToTwoReturns() to preserve DomTree, part 1 2020-12-20 00:18:35 +03:00
unreachable-loops.ll [LoopDeletion] Also consider loops with subloops for deletion. 2021-01-06 14:49:00 +00:00
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] Break backedge of outermost loops when known not taken 2021-01-10 16:02:33 -08:00