fix infinite simplification loops
commit0900bf5f8b92593877bd41dc1e15705c2bb602f5
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Mon, 31 Jul 2017 12:31:04 +0000 (31 14:31 +0200)
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>
Mon, 31 Jul 2017 20:12:42 +0000 (31 22:12 +0200)
tree078430d78dc2df97cab2a1d3f9c4279dddc5499b
parentd254b816c4b6b8a692507567ad9127ca9991596d
fix infinite simplification loops

Each time a parent is removed from a BB there is
the possibility that the BB become unreachable.
This in turn can create cycles of dead BBs which
can the create inifinite loops during the
simplification process.

Fix this by setting the flag REPEAT_CFG_CLEANUP when
a branch is rewritten, this will in turn trigger
a call to kill_unreachable_bbs() which will break
these loops.

Reported-by: Michael Stefaniuc <mstefani@mykolab.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
flow.c
validation/infinite-loop02.c [new file with mode: 0644]
validation/infinite-loop03.c [new file with mode: 0644]