diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-19 06:49:58 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-19 06:49:58 +0000 |
commit | 8f869004286e3c9ebca939700517ff6b0b222445 (patch) | |
tree | 17c4d542445096d484b3cb4f6aa83da151b3ee6b /gcc/bb-reorder.c | |
parent | 718d002121c011f7b09e0fbcf82291e8082c8ce7 (diff) | |
download | gcc-8f869004286e3c9ebca939700517ff6b0b222445.tar.gz |
gcc/
* reg-notes.def (CROSSING_JUMP): Likewise.
* rtl.h (rtx_def): Update comment for jump flag.
(CROSSING_JUMP_P): Define.
* cfgcleanup.c (try_forward_edges, try_optimize_cfg): Use it instead
of a REG_CROSSING_JUMP note.
* cfghooks.c (tidy_fallthru_edges): Likewise.
* cfgrtl.c (fixup_partition_crossing, rtl_verify_edges): Likewise.
* emit-rtl.c (try_split): Likewise.
* haifa-sched.c (sched_create_recovery_edges): Likewise.
* ifcvt.c (find_if_case_1, find_if_case_2): Likewise.
* jump.c (redirect_jump_2): Likewise.
* reorg.c (follow_jumps, fill_slots_from_thread): Likewise.
(relax_delay_slots): Likewise.
* config/arc/arc.md (jump_i, cbranchsi4_scratch, *bbit): Likewise.
(bbit_di): Likewise.
* config/arc/arc.c (arc_reorg, arc_can_follow_jump): Likewise.
* config/sh/sh.md (jump_compact): Likewise.
* bb-reorder.c (rotate_loop): Likewise.
(pass_duplicate_computed_gotos::execute): Likewise.
(add_reg_crossing_jump_notes): Rename to...
(update_crossing_jump_flags): ...this.
(pass_partition_blocks::execute): Update accordingly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210603 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bb-reorder.c')
-rw-r--r-- | gcc/bb-reorder.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index 9581c71dedc..3d7fad59339 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -425,8 +425,7 @@ rotate_loop (edge back_edge, struct trace *trace, int trace_n) /* Duplicate HEADER if it is a small block containing cond jump in the end. */ if (any_condjump_p (BB_END (header)) && copy_bb_p (header, 0) - && !find_reg_note (BB_END (header), REG_CROSSING_JUMP, - NULL_RTX)) + && !CROSSING_JUMP_P (BB_END (header))) copy_bb (header, single_succ_edge (prev_bb), prev_bb, trace_n); } } @@ -2194,10 +2193,10 @@ fix_crossing_unconditional_branches (void) } } -/* Add REG_CROSSING_JUMP note to all crossing jump insns. */ +/* Update CROSSING_JUMP_P flags on all jump insns. */ static void -add_reg_crossing_jump_notes (void) +update_crossing_jump_flags (void) { basic_block bb; edge e; @@ -2205,12 +2204,15 @@ add_reg_crossing_jump_notes (void) FOR_EACH_BB_FN (bb, cfun) FOR_EACH_EDGE (e, ei, bb->succs) - if ((e->flags & EDGE_CROSSING) - && JUMP_P (BB_END (e->src)) - /* Some notes were added during fix_up_fall_thru_edges, via - force_nonfallthru_and_redirect. */ - && !find_reg_note (BB_END (e->src), REG_CROSSING_JUMP, NULL_RTX)) - add_reg_note (BB_END (e->src), REG_CROSSING_JUMP, NULL_RTX); + if (e->flags & EDGE_CROSSING) + { + if (JUMP_P (BB_END (bb)) + /* Some flags were added during fix_up_fall_thru_edges, via + force_nonfallthru_and_redirect. */ + && !CROSSING_JUMP_P (BB_END (bb))) + CROSSING_JUMP_P (BB_END (bb)) = 1; + break; + } } /* Reorder basic blocks. The main entry point to this file. FLAGS is @@ -2454,7 +2456,7 @@ pass_duplicate_computed_gotos::execute (function *fun) continue; /* Only consider blocks that can be duplicated. */ - if (find_reg_note (BB_END (bb), REG_CROSSING_JUMP, NULL_RTX) + if (CROSSING_JUMP_P (BB_END (bb)) || !can_duplicate_block_p (bb)) continue; @@ -2507,7 +2509,7 @@ pass_duplicate_computed_gotos::execute (function *fun) /* Don't duplicate a partition crossing edge, which requires difficult fixup. */ - if (find_reg_note (BB_END (bb), REG_CROSSING_JUMP, NULL_RTX)) + if (JUMP_P (BB_END (bb)) && CROSSING_JUMP_P (BB_END (bb))) continue; new_bb = duplicate_block (single_succ (bb), single_succ_edge (bb), bb); @@ -2710,7 +2712,7 @@ pass_partition_blocks::execute (function *fun) if (!HAS_LONG_UNCOND_BRANCH) fix_crossing_unconditional_branches (); - add_reg_crossing_jump_notes (); + update_crossing_jump_flags (); /* Clear bb->aux fields that the above routines were using. */ clear_aux_for_blocks (); |