[SFN] stabilize find_bb_boundaries
commit116cfb8c5abdcd64333be8fa105a4af2dfd13823
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 12 Dec 2017 02:15:44 +0000 (12 02:15 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 12 Dec 2017 02:15:44 +0000 (12 02:15 +0000)
tree95241bed540bcd201bd588ac089b1c96ac706147
parentbce107d7e689174f402f931b34071ab12b0262cb
[SFN] stabilize find_bb_boundaries

If find_bb_boundaries is given a block with zero or one nondebug insn
beside debug insns, it shouldn't purge dead edges, because without
debug insns we wouldn't purge them at that point.  Doing so may change
the order in which edges are processed, and ultimately lead to
different transformations to the CFG and then to different
optimizations.

We shouldn't, however, retain debug insns after control flow insns, so
if we find debug insns after a single insn that happens to be a
control flow insn, do the debug insn cleanups, but still refrain from
purging dead edges at that point.

for  gcc/ChangeLog

* cfgbuild.c (find_bb_boundaries): Don't purge dead edges if,
without debug insns, we wouldn't, but clean up debug insns
after a control flow insn nevertheless.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255567 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/cfgbuild.c