summaryrefslogtreecommitdiff
path: root/gcc/cfglayout.c
diff options
context:
space:
mode:
authorfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-21 02:33:33 +0000
committerfroydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4>2010-10-21 02:33:33 +0000
commit7f58c05e4e42df3520eeb59de85577f4b4ee90f8 (patch)
tree46c04a0ca71f226e6c7a15bdb22ae8bb69768800 /gcc/cfglayout.c
parent73d723bfb0b24f5aedcb668c953616a45d75e9f2 (diff)
downloadgcc-7f58c05e4e42df3520eeb59de85577f4b4ee90f8.tar.gz
* basic-block.h (find_fallthru_edge): Define.
* cfgcleanup.c (merge_blocks_move): Use it. (try_crossjump_bb): Likewise. * cfglayout.c (fixup_reorder_chains): Likewise. (fixup_fallthru_exit_predecessor): Likewise. * cfgrtl.c (rtl_split_edge): Likewise. (rtl_verify_flow_info): Likewise. * function.c (thread_prologue_and_epilogue_insns): Likewise. * gimple-pretty-print.c (dump_implicit_edges): Likewise. * ifcvt.c (block_fallthru): Likewise. * reload1.c (fixup_abnormal_edges): Likewise. * sched-ebb.c (being_schedule_ready): Likewise. (schedule_ebb): Likwise. * sched-rgn.c (find_single_block_region): Likewise. * sel-sched-ir.c (bb_ends_ebb_p): Likewise. * tree-complex.c (expand_complex_move): Likewise. * sched-int.h (find_fallthru_edge): Rename to... (find_fallthru_edge_from): ...this. * haifa-sched.c (find_fallthru_edge): Rename to... (find_fallthru_edge_from): ...this. Use new find_fallthru_edge. (init_before_recovery): Call find_fallthru_edge_from. * sel-sched-ir.c (merge_fences): Likewise. * sel-sched.c (in_fallthru_bb_p): Likewise. (move_cond_jump): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165748 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfglayout.c')
-rw-r--r--gcc/cfglayout.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c
index e93e4077088..9fc05fea854 100644
--- a/gcc/cfglayout.c
+++ b/gcc/cfglayout.c
@@ -927,12 +927,7 @@ fixup_reorder_chain (void)
/* Annoying special case - jump around dead jumptables left in the code. */
FOR_EACH_BB (bb)
{
- edge e;
- edge_iterator ei;
-
- FOR_EACH_EDGE (e, ei, bb->succs)
- if (e->flags & EDGE_FALLTHRU)
- break;
+ edge e = find_fallthru_edge (bb->succs);
if (e && !can_fallthru (e->src, e->dest))
force_nonfallthru (e);
@@ -1019,7 +1014,6 @@ static void
fixup_fallthru_exit_predecessor (void)
{
edge e;
- edge_iterator ei;
basic_block bb = NULL;
/* This transformation is not valid before reload, because we might
@@ -1027,9 +1021,9 @@ fixup_fallthru_exit_predecessor (void)
value. */
gcc_assert (reload_completed);
- FOR_EACH_EDGE (e, ei, EXIT_BLOCK_PTR->preds)
- if (e->flags & EDGE_FALLTHRU)
- bb = e->src;
+ e = find_fallthru_edge (EXIT_BLOCK_PTR->preds);
+ if (e)
+ bb = e->src;
if (bb && bb->aux)
{