diff options
author | Richard Henderson <rth@redhat.com> | 2002-05-13 16:00:35 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-05-13 16:00:35 -0700 |
commit | 546c093ec5f84f1659723329061c47070a9956ef (patch) | |
tree | 5f32b69c8a701e1b7a8f5a41ad0369d83f86c15c /gcc/cfgrtl.c | |
parent | bde5348670f9371fb8eff9ae1b4c91a1903074a6 (diff) | |
download | gcc-546c093ec5f84f1659723329061c47070a9956ef.zip gcc-546c093ec5f84f1659723329061c47070a9956ef.tar.gz gcc-546c093ec5f84f1659723329061c47070a9956ef.tar.bz2 |
cfgrtl.c (purge_dead_edges): Handle abnormal call edges created by non-local gotos.
* cfgrtl.c (purge_dead_edges): Handle abnormal call edges created
by non-local gotos.
* recog.c (peephole2_optimize): Likewise.
From-SVN: r53438
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r-- | gcc/cfgrtl.c | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index cd3369c..9a6661d 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -2131,19 +2131,29 @@ purge_dead_edges (bb) remove_note (insn, note); } - /* Cleanup abnormal edges caused by throwing insns that have been - eliminated. */ - if (! can_throw_internal (bb->end)) - for (e = bb->succ; e; e = next) - { - next = e->succ_next; - if (e->flags & EDGE_EH) - { - remove_edge (e); - bb->flags |= BB_DIRTY; - purged = true; - } - } + /* Cleanup abnormal edges caused by exceptions or non-local gotos. */ + for (e = bb->succ; e; e = next) + { + next = e->succ_next; + if (e->flags & EDGE_EH) + { + if (can_throw_internal (bb->end)) + continue; + } + else if (e->flags & EDGE_ABNORMAL_CALL) + { + if (GET_CODE (bb->end) == CALL_INSN + && (! (note = find_reg_note (insn, REG_EH_REGION, NULL)) + || INTVAL (XEXP (note, 0)) >= 0)) + continue; + } + else + continue; + + remove_edge (e); + bb->flags |= BB_DIRTY; + purged = true; + } if (GET_CODE (insn) == JUMP_INSN) { |