diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-21 20:37:43 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-21 20:37:43 +0000 |
commit | 345ac34a19ee8fefc1d767f4eb9103a781c641d3 (patch) | |
tree | bde29689b04a7cf4ca9eeef9eb9614fd3dc8cede /gcc/cfglayout.c | |
parent | e4ab85e6b73b30e4f533bfeb365f5a82f912df15 (diff) | |
download | gcc-345ac34a19ee8fefc1d767f4eb9103a781c641d3.tar.gz |
* bb-reorder.c (make_reorder_chain_1): Modified.
* cfganal.c (can_fallthru, flow_call_edges_add,
flow_preorder_transversal_compute): Modified.
* cfgbuild.c (make_edges, find_basic_blocks, find_many_sub_basic_blocks,
find_sub_basic_blocks): Modified.
* cfgcleanup.c (try_simplify_condjump, try_optimize_cfg): Modified.
* cfglayout.c (skip_insns_after_block, fixup_reorder_chain,
fixup_fallthru_exit_predecessor, cfg_layout_redirect_edge): Modified.
* cfgrtl.c (tidy_fallthru_edges, verify_flow_info): Modified.
* combine.c (this_basic_block): Type changed to basic_block.
(combine_instructions, set_nonzero_bits_and_sign_copies, try_combine,
nonzero_bits, num_sign_bit_copies, get_last_value_validate,
get_last_value, distribute_notes, distribute_links): Modified.
* final.c (compute_alignments): Modified.
* flow.c (regno_uninitialized, regno_clobbered_at_setjmp): Modified.
* function.c (thread_prologue_and_epilogue_insns): Modified.
* gcse.c (compute_code_hoist_vbeinout): Modified.
* global.c (build_insn_chain): Modified.
* ifcvt.c (find_if_block, find_cond_trap): Modified.
* predict.c (last_basic_block_p, note_prediction_to_br_prob): Modified.
* regmove.c (regmove_optimize): Modified.
* resource.c (find_basic_block): Modified.
* sched-ebb.c (schedule_ebbs): Modified.
* ssa-dce.c (find_control_dependence, find_pdom): Modified.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53695 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfglayout.c')
-rw-r--r-- | gcc/cfglayout.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c index b3cdf84b66a..05eb97e9a39 100644 --- a/gcc/cfglayout.c +++ b/gcc/cfglayout.c @@ -86,8 +86,8 @@ skip_insns_after_block (bb) rtx insn, last_insn, next_head, prev; next_head = NULL_RTX; - if (bb->index + 1 != n_basic_blocks) - next_head = BASIC_BLOCK (bb->index + 1)->head; + if (bb->next_bb != EXIT_BLOCK_PTR) + next_head = bb->next_bb->head; for (last_insn = insn = bb->end; (insn = NEXT_INSN (insn)) != 0; ) { @@ -364,7 +364,7 @@ fixup_reorder_chain () /* First do the bulk reordering -- rechain the blocks without regard to the needed changes to jumps and labels. */ - for (bb = BASIC_BLOCK (0), index = 0; + for (bb = ENTRY_BLOCK_PTR->next_bb, index = 0; bb != 0; bb = RBI (bb)->next, index++) { @@ -412,7 +412,7 @@ fixup_reorder_chain () /* Now add jumps and labels as needed to match the blocks new outgoing edges. */ - for (bb = BASIC_BLOCK (0); bb ; bb = RBI (bb)->next) + for (bb = ENTRY_BLOCK_PTR->next_bb; bb ; bb = RBI (bb)->next) { edge e_fall, e_taken, e; rtx bb_end_insn; @@ -527,7 +527,7 @@ fixup_reorder_chain () if (rtl_dump_file) { fprintf (rtl_dump_file, "Reordered sequence:\n"); - for (bb = BASIC_BLOCK (0), index = 0; bb; bb = RBI (bb)->next, index ++) + for (bb = ENTRY_BLOCK_PTR->next_bb, index = 0; bb; bb = RBI (bb)->next, index ++) { fprintf (rtl_dump_file, " %i ", index); if (RBI (bb)->original) @@ -542,7 +542,7 @@ fixup_reorder_chain () } prev_bb = ENTRY_BLOCK_PTR; - bb = BASIC_BLOCK (0); + bb = ENTRY_BLOCK_PTR->next_bb; index = 0; for (; bb; prev_bb = bb, bb = RBI (bb)->next, index ++) @@ -611,7 +611,9 @@ cleanup_unconditional_jumps () rtx insn; if (GET_CODE (bb->head) != CODE_LABEL && forwarder_block_p (bb) && i) { - basic_block prev = BASIC_BLOCK (--i); + basic_block prev = bb->prev_bb; + + i--; if (rtl_dump_file) fprintf (rtl_dump_file, "Removing forwarder BB %i\n", @@ -672,7 +674,7 @@ fixup_fallthru_exit_predecessor () if (bb && RBI (bb)->next) { - basic_block c = BASIC_BLOCK (0); + basic_block c = ENTRY_BLOCK_PTR->next_bb; while (RBI (c)->next != bb) c = RBI (c)->next; @@ -822,14 +824,14 @@ cfg_layout_redirect_edge (e, dest) edge e; basic_block dest; { - int old_index = dest->index; basic_block src = e->src; + basic_block old_next_bb = src->next_bb; /* Redirect_edge_and_branch may decide to turn branch into fallthru edge in the case the basic block appears to be in sequence. Avoid this transformation. */ - dest->index = n_basic_blocks + 1; + src->next_bb = NULL; if (e->flags & EDGE_FALLTHRU) { /* In case we are redirecting fallthru edge to the branch edge @@ -855,7 +857,7 @@ cfg_layout_redirect_edge (e, dest) delete_barrier (NEXT_INSN (src->end)); src->succ->flags |= EDGE_FALLTHRU; } - dest->index = old_index; + src->next_bb = old_next_bb; } /* Create an duplicate of the basic block BB and redirect edge E into it. */ |