diff options
author | David Malcolm <dmalcolm@redhat.com> | 2014-08-26 18:56:58 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2014-08-26 18:56:58 +0000 |
commit | 1130d5e3e31879417a982e3df5a2d8ea59bfa311 (patch) | |
tree | c54ed14919bfd87d09336476cd238800a117c656 /gcc/cfgexpand.c | |
parent | e00022e9711439804cf9aff66613b4e382d7d158 (diff) | |
download | gcc-1130d5e3e31879417a982e3df5a2d8ea59bfa311.zip gcc-1130d5e3e31879417a982e3df5a2d8ea59bfa311.tar.gz gcc-1130d5e3e31879417a982e3df5a2d8ea59bfa311.tar.bz2 |
Remove BB_HEAD, BB_END, BB_HEADER scaffolding
gcc/
* basic-block.h (struct rtl_bb_info): Strengthen fields "end_"
and "header_" from rtx to rtx_insn *.
(struct basic_block_d): Likewise for field "head_" within "x"
field of union basic_block_il_dependent.
(BB_HEAD): Drop function...
(SET_BB_HEAD): ...and this function in favor of...
(BB_HEAD): ...reinstate macro.
(BB_END): Drop function...
(SET_BB_END): ...and this function in favor of...
(BB_END): ...reinstate macro.
(BB_HEADER): Drop function...
(SET_BB_HEADER): ...and this function in favor of...
(BB_HEADER): ...reinstate macro.
* bb-reorder.c (add_labels_and_missing_jumps): Drop use of BB_END.
(fix_crossing_unconditional_branches): Likewise.
* caller-save.c (save_call_clobbered_regs): Likewise.
(insert_one_insn): Drop use of SET_BB_HEAD and SET_BB_END.
* cfgbuild.c (find_bb_boundaries): Drop use of SET_BB_END.
* cfgcleanup.c (merge_blocks_move_successor_nojumps): Likewise.
(merge_blocks_move_successor_nojumps): Likewise.
(outgoing_edges_match): Update use of for_each_rtx to
for_each_rtx_in_insn.
* cfgexpand.c (expand_gimple_cond): Drop use of SET_BB_END.
(expand_gimple_cond): Likewise.
(expand_gimple_tailcall): Likewise.
(expand_gimple_basic_block): Drop use of SET_BB_HEAD and
SET_BB_END.
(construct_exit_block): Drop use of SET_BB_END.
* cfgrtl.c (cfg_layout_function_footer): Strengthen from rtx to
rtx_insn *.
(delete_insn): Rename param "insn" to "uncast_insn", introducing
a new local "insn" with a checked cast to rtx_insn *. Drop use of
SET_BB_HEAD and SET_BB_END.
(create_basic_block_structure): Drop use of SET_BB_HEAD and
SET_BB_END.
(rtl_delete_block): Drop use of SET_BB_HEAD.
(rtl_split_block): Drop use of SET_BB_END.
(emit_nop_for_unique_locus_between): Likewise.
(rtl_merge_blocks): Drop use of SET_BB_END and SET_BB_HEAD.
(block_label): Drop use of SET_BB_HEAD.
(fixup_abnormal_edges): Drop use of SET_BB_END.
(record_effective_endpoints): Drop use of SET_BB_HEADER.
(relink_block_chain): Likewise.
(fixup_reorder_chain): Drop use of SET_BB_END.
(cfg_layout_duplicate_bb): Drop use of SET_BB_HEADER.
(cfg_layout_delete_block): Strengthen local "to" from rtx * to
rtx_insn **. Drop use of SET_BB_HEADER.
(cfg_layout_merge_blocks): Drop use of SET_BB_HEADER, SET_BB_END,
SET_BB_HEAD.
(BB_HEAD): Delete this function.
(SET_BB_HEAD): Likewise.
(BB_END): Likewise.
(SET_BB_END): Likewise.
(BB_HEADER): Likewise.
(SET_BB_HEADER): Likewise.
* emit-rtl.c (add_insn_after): Rename param "insn" to
"uncast_insn", adding a new local "insn" and a checked cast to
rtx_insn *. Drop use of SET_BB_END.
(remove_insn): Strengthen locals "next" and "prev" from rtx to
rtx_insn *. Drop use of SET_BB_HEAD and SET_BB_END.
(reorder_insns): Drop use of SET_BB_END.
(emit_insn_after_1): Strengthen param "first" and locals "last",
"after_after" from rtx to rtx_insn *. Drop use of SET_BB_END.
(emit_pattern_after_noloc): Add checked cast.
* haifa-sched.c (get_ebb_head_tail): Drop use of SET_BB_END.
(restore_other_notes): Likewise.
(move_insn): Likewise.
(sched_extend_bb): Likewise.
(fix_jump_move): Likewise.
* ifcvt.c (noce_process_if_block): Likewise.
(dead_or_predicable): Likewise.
* ira.c (update_equiv_regs): Drop use of SET_BB_HEAD.
* reg-stack.c (change_stack): Drop use of SET_BB_END.
* sel-sched-ir.c (sel_move_insn): Likewise.
* sel-sched.c (move_nop_to_previous_block): Likewise.
* config/c6x/c6x.c (hwloop_optimize): Drop use of SET_BB_HEAD and
SET_BB_END.
* config/ia64/ia64.c (emit_predicate_relation_info): Likewise.
/
* rtx-classes-status.txt (TODO): SET_BB_HEAD, SET_BB_END,
SET_BB_HEADER are done.
From-SVN: r214534
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r-- | gcc/cfgexpand.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 34e57b9..b6e02ef 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -2175,9 +2175,9 @@ expand_gimple_cond (basic_block bb, gimple stmt) set_curr_insn_location (false_edge->goto_locus); emit_jump (label_rtx_for_bb (false_edge->dest)); - SET_BB_END (bb) = last; + BB_END (bb) = last; if (BARRIER_P (BB_END (bb))) - SET_BB_END (bb) = PREV_INSN (BB_END (bb)); + BB_END (bb) = PREV_INSN (BB_END (bb)); update_bb_for_insn (bb); new_bb = create_basic_block (NEXT_INSN (last), get_last_insn (), bb); @@ -2191,7 +2191,7 @@ expand_gimple_cond (basic_block bb, gimple stmt) new_edge->probability = REG_BR_PROB_BASE; new_edge->count = new_bb->count; if (BARRIER_P (BB_END (new_bb))) - SET_BB_END (new_bb) = PREV_INSN (BB_END (new_bb)); + BB_END (new_bb) = PREV_INSN (BB_END (new_bb)); update_bb_for_insn (new_bb); maybe_dump_rtl_for_gimple_stmt (stmt, last2); @@ -3490,7 +3490,7 @@ expand_gimple_tailcall (basic_block bb, gimple stmt, bool *can_fallthru) | EDGE_SIBCALL); e->probability += probability; e->count += count; - SET_BB_END (bb) = last; + BB_END (bb) = last; update_bb_for_insn (bb); if (NEXT_INSN (last)) @@ -3499,7 +3499,7 @@ expand_gimple_tailcall (basic_block bb, gimple stmt, bool *can_fallthru) last = BB_END (bb); if (BARRIER_P (last)) - SET_BB_END (bb) = PREV_INSN (last); + BB_END (bb) = PREV_INSN (last); } maybe_dump_rtl_for_gimple_stmt (stmt, last2); @@ -4962,15 +4962,15 @@ expand_gimple_basic_block (basic_block bb, bool disable_tail_calls) /* Java emits line number notes in the top of labels. ??? Make this go away once line number notes are obsoleted. */ - SET_BB_HEAD (bb) = NEXT_INSN (last); + BB_HEAD (bb) = NEXT_INSN (last); if (NOTE_P (BB_HEAD (bb))) - SET_BB_HEAD (bb) = NEXT_INSN (BB_HEAD (bb)); + BB_HEAD (bb) = NEXT_INSN (BB_HEAD (bb)); note = emit_note_after (NOTE_INSN_BASIC_BLOCK, BB_HEAD (bb)); maybe_dump_rtl_for_gimple_stmt (stmt, last); } else - SET_BB_HEAD (bb) = note = emit_note (NOTE_INSN_BASIC_BLOCK); + BB_HEAD (bb) = note = emit_note (NOTE_INSN_BASIC_BLOCK); NOTE_BASIC_BLOCK (note) = bb; @@ -5253,7 +5253,7 @@ expand_gimple_basic_block (basic_block bb, bool disable_tail_calls) last = PREV_INSN (last); if (JUMP_TABLE_DATA_P (last)) last = PREV_INSN (PREV_INSN (last)); - SET_BB_END (bb) = last; + BB_END (bb) = last; update_bb_for_insn (bb); @@ -5355,7 +5355,7 @@ construct_exit_block (void) return; /* While emitting the function end we could move end of the last basic block. */ - SET_BB_END (prev_bb) = orig_end; + BB_END (prev_bb) = orig_end; while (NEXT_INSN (head) && NOTE_P (NEXT_INSN (head))) head = NEXT_INSN (head); /* But make sure exit_block starts with RETURN_LABEL, otherwise the @@ -5367,7 +5367,7 @@ construct_exit_block (void) while (NEXT_INSN (head) != return_label) { if (!NOTE_P (NEXT_INSN (head))) - SET_BB_END (prev_bb) = NEXT_INSN (head); + BB_END (prev_bb) = NEXT_INSN (head); head = NEXT_INSN (head); } } |