1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 13:02:52 +02:00
llvm-mirror/test/Transforms/LoopUnswitch
Balaram Makam 58953554d4 [SimplifyCFG] Defer folding unconditional branches to LateSimplifyCFG if it can destroy canonical loop structure.
Summary:
When simplifying unconditional branches from empty blocks, we pre-test if the
BB belongs to a set of loop headers and keep the block to prevent passes from
destroying canonical loop structure. However, the current algorithm fails if
the destination of the branch is a loop header. Especially when such a loop's
latch block is folded into loop header it results in additional backedges and
LoopSimplify turns it into a nested loop which prevent later optimizations
from being applied (e.g., loop  unrolling and loop interleaving).

This patch augments the existing algorithm by further checking if the
destination of the branch belongs to a set of loop headers and defer
eliminating it if yes to LateSimplifyCFG.

Fixes PR33605: https://bugs.llvm.org/show_bug.cgi?id=33605

Reviewers: efriedma, mcrosier, pacxx, hsung, davidxl

Reviewed By: efriedma

Subscribers: ashutosh.nema, gberry, javed.absar, llvm-commits

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

llvm-svn: 308422
2017-07-19 08:53:34 +00:00
..
AMDGPU AMDGPU: Mark all unspecified CC functions in tests as amdgpu_kernel 2017-03-21 21:39:51 +00:00
2006-06-13-SingleEntryPHI.ll
2006-06-27-DeadSwitchCase.ll
2007-05-09-tl.ll
2007-05-09-Unreachable.ll
2007-07-12-ExitDomInfo.ll
2007-07-13-DomInfo.ll
2007-07-18-DomInfo.ll
2007-08-01-Dom.ll
2007-08-01-LCSSA.ll
2007-10-04-DomFrontier.ll
2008-06-02-DomInfo.ll
2008-06-17-DomFrontier.ll
2008-11-03-Invariant.ll Revert "[SCEV] Enable SCEV verification by default in EXPENSIVE_CHECKS builds" 2017-04-24 02:35:19 +00:00
2010-11-18-LCSSA.ll
2011-06-02-CritSwitch.ll
2011-09-26-EHCrash.ll
2011-11-18-SimpleSwitch.ll [LoopSimplify] Re-instate r306081 with a bug fix w.r.t. indirectbr. 2017-06-25 22:45:31 +00:00
2011-11-18-TwoSwitches-Threshold.ll [LoopSimplify] Re-instate r306081 with a bug fix w.r.t. indirectbr. 2017-06-25 22:45:31 +00:00
2011-11-18-TwoSwitches.ll [LoopSimplify] Re-instate r306081 with a bug fix w.r.t. indirectbr. 2017-06-25 22:45:31 +00:00
2012-04-02-IndirectBr.ll
2012-04-30-LoopUnswitch-LPad-Crash.ll
2012-05-20-Phi.ll
2015-06-17-Metadata.ll [SimplifyCFG] Defer folding unconditional branches to LateSimplifyCFG if it can destroy canonical loop structure. 2017-07-19 08:53:34 +00:00
2015-09-18-Addrspace.ll
basictest.ll
cleanuppad.ll
copy-metadata.ll [LoopUnswitch] Fix a test case 2017-04-11 04:11:47 +00:00
crash.ll
elseif-non-exponential-behavior.ll
exponential-behavior.ll
guards.ll
infinite-loop.ll [SimplifyCFG] Defer folding unconditional branches to LateSimplifyCFG if it can destroy canonical loop structure. 2017-07-19 08:53:34 +00:00
LIV-loop-condtion.ll
msan.ll
pr32818.ll [LoopUnswitch] Don't remove instructions with side effects. 2017-04-29 00:12:18 +00:00
preserve-analyses.ll
simplify-with-nonvalness.ll
trivial-unswitch.ll