diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-12-04 14:21:58 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-12-04 14:21:58 +0000 |
commit | 498d173d50082c410a5af22abf40c62f85bf93a1 (patch) | |
tree | 27eb37067662ddfbcb09ebb5d889660914bb553c /gcc/cfgrtl.c | |
parent | dcc587fc534df98e126c3c231144a6ed1b01f909 (diff) | |
download | gcc-498d173d50082c410a5af22abf40c62f85bf93a1.tar.gz |
* cfgrtl.c (force_nonfallthru_and_redirect): Allow abnormal edge
to be forced into nonfallthru.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59816 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r-- | gcc/cfgrtl.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index a72123911f9..84e62c6850e 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -933,12 +933,23 @@ force_nonfallthru_and_redirect (e, target) edge e; basic_block target; { - basic_block jump_block, new_bb = NULL; + basic_block jump_block, new_bb = NULL, src = e->src; rtx note; edge new_edge; + int abnormal_edge_flags = 0; if (e->flags & EDGE_ABNORMAL) - abort (); + { + /* Irritating special case - fallthru edge to the same block as abnormal + edge. + We can't redirect abnormal edge, but we still can split the fallthru + one and create separate abnormal edge to original destination. + This allows bb-reorder to make such edge non-fallthru. */ + if (e->dest != target) + abort (); + abnormal_edge_flags = e->flags & ~(EDGE_FALLTHRU | EDGE_CAN_FALLTHRU); + e->flags &= EDGE_FALLTHRU | EDGE_CAN_FALLTHRU; + } else if (!(e->flags & EDGE_FALLTHRU)) abort (); else if (e->src == ENTRY_BLOCK_PTR) @@ -962,7 +973,7 @@ force_nonfallthru_and_redirect (e, target) make_single_succ_edge (ENTRY_BLOCK_PTR, bb, EDGE_FALLTHRU); } - if (e->src->succ->succ_next) + if (e->src->succ->succ_next || abnormal_edge_flags) { /* Create the new structures. */ @@ -1029,6 +1040,9 @@ force_nonfallthru_and_redirect (e, target) emit_barrier_after (jump_block->end); redirect_edge_succ_nodup (e, target); + if (abnormal_edge_flags) + make_edge (src, target, abnormal_edge_flags); + return new_bb; } |