From f771f501f3d16248566ea0c322eda8e422328352 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Thu, 9 Jan 2014 20:18:22 -0500 Subject: [PATCH 143/159] FIXME: cfgrtl.c --- gcc/cfgrtl.c | 58 ++++++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 1f576a7..a483882 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -528,9 +528,10 @@ emit_insn_at_entry (rtx insn) (i.e. both BEGIN and END will be updated. */ static void -update_bb_for_insn_chain (rtx begin, rtx end, basic_block bb) +update_bb_for_insn_chain (rtx_base_insn begin, rtx_base_insn end, + basic_block bb) { - rtx insn; + rtx_base_insn insn; end = NEXT_INSN (end); for (insn = begin; insn != end; insn = NEXT_INSN (insn)) @@ -552,7 +553,7 @@ update_bb_for_insn (basic_block bb) even after reload. */ static bool -flow_active_insn_p (const_rtx insn) +flow_active_insn_p (const_rtx_base_insn insn) { if (active_insn_p (insn)) return true; @@ -668,7 +669,7 @@ could_fall_through (basic_block src, basic_block target) rtx_note bb_note (basic_block bb) { - rtx note; + rtx_base_insn note; note = BB_HEAD (bb); if (LABEL_P (note)) @@ -767,7 +768,7 @@ static bool unique_locus_on_edge_between_p (basic_block a, basic_block b) { const location_t goto_locus = EDGE_SUCC (a, 0)->goto_locus; - rtx insn, end; + rtx_base_insn insn, end; if (LOCATION_LOCUS (goto_locus) == UNKNOWN_LOCATION) return false; @@ -857,7 +858,7 @@ rtl_merge_blocks (basic_block a, basic_block b) /* If there was a jump out of A, delete it. */ if (JUMP_P (a_end)) { - rtx prev; + rtx_base_insn prev; for (prev = PREV_INSN (a_end); ; prev = PREV_INSN (prev)) if (!NOTE_P (prev) @@ -872,7 +873,7 @@ rtl_merge_blocks (basic_block a, basic_block b) the insn that set cc0. */ if (only_sets_cc0_p (prev)) { - rtx tmp = prev; + rtx_base_insn tmp = prev; prev = prev_nonnote_insn (prev); if (!prev) @@ -1103,7 +1104,7 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout) else { rtx_code_label target_label = block_label (target); - rtx barrier; + rtx_base_insn barrier; rtx_code_label label; rtx_jump_table_data table; @@ -1133,7 +1134,7 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout) /* Move the jump before barrier so that the notes which originally were or were created before jump table are inside the basic block. */ - rtx new_insn = BB_END (src); + rtx_base_insn new_insn = BB_END (src); update_bb_for_insn_chain (NEXT_INSN (BB_END (src)), PREV_INSN (barrier), src); @@ -1176,7 +1177,8 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout) doesn't work. */ static bool -patch_jump_insn (rtx_base_insn insn, rtx old_label, basic_block new_bb) +patch_jump_insn (rtx_base_insn insn, rtx_base_insn old_label, + basic_block new_bb) { rtx tmp; rtx_jump_table_data table; @@ -1743,7 +1745,7 @@ rtl_redirect_edge_and_branch_force (edge e, basic_block target) static void rtl_tidy_fallthru_edge (edge e) { - rtx q; + rtx_base_insn q; basic_block b = e->src, c = b->next_bb; /* ??? In a late-running flow pass, other folks may have deleted basic @@ -1953,7 +1955,7 @@ void commit_one_edge_insertion (edge e) { rtx_base_insn before = NULL_RTX_BASE_INSN, after = NULL_RTX_BASE_INSN; - rtx insns; + rtx_base_insn insns; rtx_base_insn tmp; rtx_base_insn last; basic_block bb; @@ -2099,7 +2101,7 @@ static void rtl_dump_bb (FILE *outf, basic_block bb, int indent, int flags) { rtx_base_insn insn; - rtx last; + rtx_base_insn last; char *s_indent; s_indent = (char *) alloca ((size_t) indent + 1); @@ -2594,7 +2596,7 @@ rtl_verify_edges (void) static int rtl_verify_bb_insns (void) { - rtx x; + rtx_base_insn x; int err = 0; basic_block bb; @@ -2747,8 +2749,8 @@ rtl_verify_bb_insn_chain (void) { basic_block bb; int err = 0; - rtx x; - rtx last_head = get_last_insn (); + rtx_base_insn x; + rtx_base_insn last_head = get_last_insn (); basic_block *bb_info; const int max_uid = get_max_uid (); @@ -2756,8 +2758,8 @@ rtl_verify_bb_insn_chain (void) FOR_EACH_BB_REVERSE (bb) { - rtx head = BB_HEAD (bb); - rtx end = BB_END (bb); + rtx_base_insn head = BB_HEAD (bb); + rtx_base_insn end = BB_END (bb); for (x = last_head; x != NULL_RTX; x = PREV_INSN (x)) { @@ -2895,9 +2897,9 @@ rtl_verify_bb_layout (void) { basic_block bb; int err = 0; - rtx x; + rtx_base_insn x; int num_bb_notes; - const rtx rtx_first = get_insns (); + const rtx_base_insn rtx_first = get_insns (); basic_block last_bb_seen = ENTRY_BLOCK_PTR_FOR_FN (cfun), curr_bb = NULL; num_bb_notes = 0; @@ -3899,7 +3901,7 @@ fixup_reorder_chain (void) edge e2; edge_iterator ei2; basic_block dest, nb; - rtx end; + rtx_base_insn end; insn = BB_END (e->src); end = PREV_INSN (BB_HEAD (e->src)); @@ -3962,7 +3964,7 @@ fixup_reorder_chain (void) DEBUG_FUNCTION void verify_insn_chain (void) { - rtx x, prevx, nextx; + rtx_base_insn x, prevx, nextx; int insn_cnt1, insn_cnt2; for (prevx = NULL, insn_cnt1 = 1, x = get_insns (); @@ -4572,7 +4574,7 @@ static void cfg_layout_merge_blocks (basic_block a, basic_block b) { bool forwarder_p = (b->flags & BB_FORWARDER_BLOCK) != 0; - rtx insn; + rtx_base_insn insn; gcc_checking_assert (cfg_layout_can_merge_blocks_p (a, b)); @@ -4604,7 +4606,7 @@ cfg_layout_merge_blocks (basic_block a, basic_block b) a->set_bb_footer (BB_FOOTER (b)); else { - rtx last = BB_FOOTER (a); + rtx_base_insn last = BB_FOOTER (a); while (NEXT_INSN (last)) last = NEXT_INSN (last); @@ -4623,7 +4625,7 @@ cfg_layout_merge_blocks (basic_block a, basic_block b) a->set_bb_footer (BB_HEADER (b)); else { - rtx last = BB_HEADER (b); + rtx_base_insn last = BB_HEADER (b); while (NEXT_INSN (last)) last = NEXT_INSN (last); @@ -4724,8 +4726,8 @@ static basic_block rtl_split_block_before_cond_jump (basic_block bb) { rtx_base_insn insn; - rtx split_point = NULL; - rtx last = NULL; + rtx_base_insn split_point = NULL; + rtx_base_insn last = NULL; bool found_code = false; FOR_BB_INSNS (bb, insn) @@ -4773,7 +4775,7 @@ rtl_block_ends_with_condjump_p (const_basic_block bb) Helper function for rtl_flow_call_edges_add. */ static bool -need_fake_edge_p (const_rtx insn) +need_fake_edge_p (const_rtx_base_insn insn) { if (!INSN_P (insn)) return false; -- 1.7.11.7