llvm-project/llvm/test/Transforms/LoopDeletion
Anna Thomas 53c8d95c85 [Loop Deletion] Delete loops that are never executed
Summary:
Currently, loop deletion deletes loop where the only values
that are used outside the loop are loop-invariant.
This patch adds logic to delete loops where the loop is proven to be
never executed (i.e. the only predecessor of the loop preheader has a
constant conditional branch as terminator, and the preheader is not the
taken target). This will remove loops that become dead after
loop-unswitching generates constant conditional branches.

The next steps are:
1. moving the loop deletion implementation to LoopUtils.
2. Add logic in loop-simplifyCFG which will support changing conditional
constant branches to unconditional branches. If loops become unreachable in this
process, they can be removed using `deleteDeadLoop` function.

Reviewers: chandlerc, efriedma, sanjoy, reames

Reviewed by: sanjoy

Subscribers: mzolotukhin, llvm-commits

Differential Revision: https://reviews.llvm.org/D32494

llvm-svn: 302015
2017-05-03 11:47:11 +00:00
..
2007-07-23-InfiniteLoop.ll
2008-05-06-Phi.ll
2011-06-21-phioperands.ll
dcetest.ll
invalidation.ll [PM] Teach LoopDeletion to correctly update the LPM when loops are 2017-01-18 02:41:26 +00:00
multiple-exit-conditions.ll [PM] Teach LoopDeletion to correctly update the LPM when loops are 2017-01-18 02:41:26 +00:00
multiple-exits.ll [PM] Teach LoopDeletion to correctly update the LPM when loops are 2017-01-18 02:41:26 +00:00
simplify-then-delete.ll
unreachable-loops.ll [Loop Deletion] Delete loops that are never executed 2017-05-03 11:47:11 +00:00
update-scev.ll