1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/Transforms/LoopSimplifyCFG
Max Kazantsev dafa7c4e1d [LoopSimplifyCFG] Do not deal with loops with irreducible CFG inside
The current algorithm that collects live/dead/inloop blocks relies on some invariants
related to RPO and PO traversals. In particular, the important fact it requires is that
the only loop's latch is the first block in PO traversal. It also relies on fact that during
RPO we visit all prececessors of a block before we visit this block (backedges ignored).

If a loop has irreducible non-loop cycle inside, both these assumptions may break.
This patch adds detection for this situation and prohibits the terminator folding
for loops with irreducible CFG.

We can in theory support this later, for this some algorithmic changes are needed.
Besides, irreducible CFG is not a frequent situation and we can just don't bother.

Thanks @uabelho for finding this!

Differential Revision: https://reviews.llvm.org/D55357
Reviewed By: skatkov

llvm-svn: 348567
2018-12-07 05:44:45 +00:00
..
constant-fold-branch.ll Revert "[LoopSimplifyCFG] Delete dead in-loop blocks" 2018-12-06 13:21:01 +00:00
irreducible_cfg.ll [LoopSimplifyCFG] Do not deal with loops with irreducible CFG inside 2018-12-07 05:44:45 +00:00
lcssa.ll Disable LoopSimplifyCFG terminator folding by default 2018-11-23 09:14:53 +00:00
merge-header.ll Update MemorySSA in LoopSimplifyCFG. 2018-08-22 20:10:21 +00:00
phi_with_duplicating_inputs.ll Add missing REQUIRES: asserts 2018-11-27 07:51:18 +00:00
pr39783.ll [NFC] Verify memoryssa in test for PR39783 2018-12-05 05:20:08 +00:00
scev.ll Update MemorySSA in LoopSimplifyCFG. 2018-08-22 20:10:21 +00:00