1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/lib/Transforms
Anna Thomas 186ef38175 [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
..
Coroutines Re-land r301697 "[IR] Make add/remove Attributes use AttrBuilder instead of AttributeList" 2017-05-02 22:07:37 +00:00
Hello Add auto-exporting of symbols from tools so that plugins work on Windows 2016-05-26 11:16:43 +00:00
InstCombine [InstCombine] don't use DeMorgan's Law on integer constants (2nd try) 2017-05-02 15:31:40 +00:00
Instrumentation Re-land r301697 "[IR] Make add/remove Attributes use AttrBuilder instead of AttributeList" 2017-05-02 22:07:37 +00:00
IPO [PartialInlining] Add more early filtering 2017-05-02 18:43:21 +00:00
ObjCARC [ObjCARC] Do not move a release between a call and a 2017-04-29 00:23:11 +00:00
Scalar [Loop Deletion] Delete loops that are never executed 2017-05-03 11:47:11 +00:00
Utils Replace hardcoded intrinsic list with speculatable attribute. 2017-05-03 02:26:10 +00:00
Vectorize Rename WeakVH to WeakTrackingVH; NFC 2017-05-01 17:07:49 +00:00
CMakeLists.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00
LLVMBuild.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00