* 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.
From-SVN: r53695
restart:
RBI (prev)->next = bb;
- if (rtl_dump_file && prev->index + 1 != bb->index)
+ if (rtl_dump_file && prev->next_bb != bb)
fprintf (rtl_dump_file, "Reordering block %d after %d\n",
bb->index, prev->index);
}
if (! next)
{
for (e = bb->succ; e ; e = e->succ_next)
- if (e->dest->index == bb->index + 1)
+ if (e->dest == bb->next_bb)
{
if ((e->flags & EDGE_FALLTHRU)
|| (e->dest->succ
rtx insn = src->end;
rtx insn2 = target->head;
- if (src->index + 1 != target->index)
+ if (src->next_bb != target)
return 0;
if (!active_insn_p (insn2))
Handle this by adding a dummy instruction in a new last basic block. */
if (check_last_block)
{
- basic_block bb = BASIC_BLOCK (n_basic_blocks - 1);
+ basic_block bb = EXIT_BLOCK_PTR->prev_bb;
rtx insn = bb->end;
/* Back up past insns that must be kept in the same block as a call. */
walking the tree from right to left. */
i = 0;
- node = &dfst[0];
+ node = &dfst[ENTRY_BLOCK_PTR->next_bb->index];
pot_order[i++] = 0;
while (node)
static int count_basic_blocks PARAMS ((rtx));
static void find_basic_blocks_1 PARAMS ((rtx));
static rtx find_label_refs PARAMS ((rtx, rtx));
-static void make_edges PARAMS ((rtx, int, int, int));
+static void make_edges PARAMS ((rtx, basic_block,
+ basic_block, int));
static void make_label_edge PARAMS ((sbitmap *, basic_block,
rtx, int));
static void make_eh_edge PARAMS ((sbitmap *, basic_block, rtx));
static void
make_edges (label_value_list, min, max, update_p)
rtx label_value_list;
- int min, max, update_p;
+ basic_block min, max;
+ int update_p;
{
int i;
sbitmap *edge_cache = NULL;
sbitmap_vector_zero (edge_cache, n_basic_blocks);
if (update_p)
- for (i = min; i <= max; ++i)
+ for (i = min->index; i <= max->index; ++i)
{
edge e;
}
/* By nature of the way these get numbered, block 0 is always the entry. */
- if (min == 0)
- cached_make_edge (edge_cache, ENTRY_BLOCK_PTR, BASIC_BLOCK (0),
+ if (min == ENTRY_BLOCK_PTR->next_bb)
+ cached_make_edge (edge_cache, ENTRY_BLOCK_PTR, min,
EDGE_FALLTHRU);
- for (i = min; i <= max; ++i)
+ for (i = min->index; i <= max->index; ++i)
{
basic_block bb = BASIC_BLOCK (i);
rtx insn, x;
/* Find out if we can drop through to the next block. */
insn = next_nonnote_insn (insn);
- if (!insn || (i + 1 == n_basic_blocks && force_fallthru))
+ if (!insn || (bb->next_bb == EXIT_BLOCK_PTR && force_fallthru))
cached_make_edge (edge_cache, bb, EXIT_BLOCK_PTR, EDGE_FALLTHRU);
- else if (i + 1 < n_basic_blocks)
+ else if (bb->next_bb != EXIT_BLOCK_PTR)
{
- rtx tmp = BLOCK_HEAD (i + 1);
+ rtx tmp = bb->next_bb->head;
if (GET_CODE (tmp) == NOTE)
tmp = next_nonnote_insn (tmp);
if (force_fallthru || insn == tmp)
- cached_make_edge (edge_cache, bb, BASIC_BLOCK (i + 1),
- EDGE_FALLTHRU);
+ cached_make_edge (edge_cache, bb, bb->next_bb, EDGE_FALLTHRU);
}
}
compute_bb_for_insn (max_uid);
/* Discover the edges of our cfg. */
- make_edges (label_value_list, 0, n_basic_blocks - 1, 0);
+ make_edges (label_value_list, ENTRY_BLOCK_PTR->next_bb, EXIT_BLOCK_PTR->prev_bb, 0);
/* Do very simple cleanup now, for the benefit of code that runs between
here and cleanup_cfg, e.g. thread_prologue_and_epilogue_insns. */
/* Now re-scan and wire in all edges. This expect simple (conditional)
jumps at the end of each new basic blocks. */
- make_edges (NULL, min, max, 1);
+ make_edges (NULL, BASIC_BLOCK (min), BASIC_BLOCK (max), 1);
/* Update branch probabilities. Expect only (un)conditional jumps
to be created with only the forward edges. */
{
int i;
int min, max;
- basic_block next = (bb->index == n_basic_blocks - 1
- ? NULL : BASIC_BLOCK (bb->index + 1));
+ basic_block next = bb->next_bb;
min = bb->index;
find_bb_boundaries (bb);
- max = (next ? next->index : n_basic_blocks) - 1;
+ max = next->prev_bb->index;
/* Now re-scan and wire in all edges. This expect simple (conditional)
jumps at the end of each new basic blocks. */
- make_edges (NULL, min, max, 1);
+ make_edges (NULL, BASIC_BLOCK (min), BASIC_BLOCK (max), 1);
/* Update branch probabilities. Expect only (un)conditional jumps
to be created with only the forward edges. */
unconditional jump. */
jump_block = cbranch_fallthru_edge->dest;
if (jump_block->pred->pred_next
- || jump_block->index == n_basic_blocks - 1
+ || jump_block->next_bb == EXIT_BLOCK_PTR
|| !FORWARDER_BLOCK_P (jump_block))
return false;
jump_dest_block = jump_block->succ->dest;
/* Delete trivially dead basic blocks. */
while (b->pred == NULL)
{
- c = BASIC_BLOCK (b->index - 1);
+ c = b->prev_bb;
if (rtl_dump_file)
fprintf (rtl_dump_file, "Deleting block %i.\n",
b->index);
"Deleting fallthru block %i.\n",
b->index);
- c = BASIC_BLOCK (b->index ? b->index - 1 : 1);
+ c = b->prev_bb == ENTRY_BLOCK_PTR ? b->next_bb : b->prev_bb;
redirect_edge_succ_nodup (b->pred, b->succ->dest);
flow_delete_block (b);
changed = true;
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; )
{
/* 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++)
{
/* 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;
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)
}
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 ++)
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",
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;
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
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. */
for (i = 1; i < n_basic_blocks; i++)
{
- basic_block b = BASIC_BLOCK (i - 1);
basic_block c = BASIC_BLOCK (i);
+ basic_block b = c->prev_bb;
edge s;
/* We care about simple conditional or unconditional jumps with
{
rtx insn;
- if (e->src->index + 1 != e->dest->index)
+ if (e->src->next_bb != e->dest)
{
error
("verify_flow_info: Incorrect blocks for fallthru %i->%i",
err = 1;
}
if (n_branch != 1 && any_condjump_p (bb->end)
- && JUMP_LABEL (bb->end) != BASIC_BLOCK (bb->index + 1)->head)
+ && JUMP_LABEL (bb->end) != bb->next_bb->head)
{
error ("Wrong amount of branch edges after conditional jump %i", bb->index);
err = 1;
static rtx added_links_insn;
-/* Basic block number of the block in which we are performing combines. */
-static int this_basic_block;
+/* Basic block in which we are performing combines. */
+static basic_block this_basic_block;
/* A bitmap indicating which blocks had registers go dead at entry.
After combine, we'll need to re-do global life analysis with
/* Now scan all the insns in forward order. */
- this_basic_block = -1;
+ this_basic_block = ENTRY_BLOCK_PTR;
label_tick = 1;
last_call_cuid = 0;
mem_last_set = 0;
next = 0;
/* If INSN starts a new basic block, update our basic block number. */
- if (this_basic_block + 1 < n_basic_blocks
- && BLOCK_HEAD (this_basic_block + 1) == insn)
- this_basic_block++;
+ if (this_basic_block->next_bb != EXIT_BLOCK_PTR
+ && this_basic_block->next_bb->head == insn)
+ this_basic_block = this_basic_block->next_bb;
if (GET_CODE (insn) == CODE_LABEL)
label_tick++;
}
clear_bb_flags ();
- EXECUTE_IF_SET_IN_SBITMAP (refresh_blocks, 0, this_basic_block,
- BASIC_BLOCK (this_basic_block)->flags |= BB_DIRTY);
+ EXECUTE_IF_SET_IN_SBITMAP (refresh_blocks, 0, i,
+ BASIC_BLOCK (i)->flags |= BB_DIRTY);
new_direct_jump_p |= purge_all_dead_edges (0);
delete_noop_moves (f);
&& REGNO (x) >= FIRST_PSEUDO_REGISTER
/* If this register is undefined at the start of the file, we can't
say what its contents were. */
- && ! REGNO_REG_SET_P (BASIC_BLOCK (0)->global_live_at_start, REGNO (x))
+ && ! REGNO_REG_SET_P (ENTRY_BLOCK_PTR->next_bb->global_live_at_start, REGNO (x))
&& GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT)
{
if (set == 0 || GET_CODE (set) == CLOBBER)
which we know will be a NOTE. */
for (insn = NEXT_INSN (i3);
- insn && (this_basic_block == n_basic_blocks - 1
- || insn != BLOCK_HEAD (this_basic_block + 1));
+ insn && (this_basic_block->next_bb == EXIT_BLOCK_PTR
+ || insn != this_basic_block->next_bb->head);
insn = NEXT_INSN (insn))
{
if (INSN_P (insn) && reg_referenced_p (ni2dest, PATTERN (insn)))
&& ! find_reg_note (i2, REG_UNUSED,
SET_DEST (XVECEXP (PATTERN (i2), 0, i))))
for (temp = NEXT_INSN (i2);
- temp && (this_basic_block == n_basic_blocks - 1
- || BLOCK_HEAD (this_basic_block) != temp);
+ temp && (this_basic_block->next_bb == EXIT_BLOCK_PTR
+ || this_basic_block->head != temp);
temp = NEXT_INSN (temp))
if (temp != i3 && INSN_P (temp))
for (link = LOG_LINKS (temp); link; link = XEXP (link, 1))
&& (reg_last_set_label[REGNO (x)] == label_tick
|| (REGNO (x) >= FIRST_PSEUDO_REGISTER
&& REG_N_SETS (REGNO (x)) == 1
- && ! REGNO_REG_SET_P (BASIC_BLOCK (0)->global_live_at_start,
+ && ! REGNO_REG_SET_P (ENTRY_BLOCK_PTR->next_bb->global_live_at_start,
REGNO (x))))
&& INSN_CUID (reg_last_set[REGNO (x)]) < subst_low_cuid)
return reg_last_set_nonzero_bits[REGNO (x)] & nonzero;
&& (reg_last_set_label[REGNO (x)] == label_tick
|| (REGNO (x) >= FIRST_PSEUDO_REGISTER
&& REG_N_SETS (REGNO (x)) == 1
- && ! REGNO_REG_SET_P (BASIC_BLOCK (0)->global_live_at_start,
+ && ! REGNO_REG_SET_P (ENTRY_BLOCK_PTR->next_bb->global_live_at_start,
REGNO (x))))
&& INSN_CUID (reg_last_set[REGNO (x)]) < subst_low_cuid)
return reg_last_set_sign_bit_copies[REGNO (x)];
|| (! (regno >= FIRST_PSEUDO_REGISTER
&& REG_N_SETS (regno) == 1
&& (! REGNO_REG_SET_P
- (BASIC_BLOCK (0)->global_live_at_start, regno)))
+ (ENTRY_BLOCK_PTR->next_bb->global_live_at_start, regno)))
&& reg_last_set_label[j] > tick))
{
if (replace)
&& (regno < FIRST_PSEUDO_REGISTER
|| REG_N_SETS (regno) != 1
|| (REGNO_REG_SET_P
- (BASIC_BLOCK (0)->global_live_at_start, regno)))))
+ (ENTRY_BLOCK_PTR->next_bb->global_live_at_start, regno)))))
return 0;
/* If the value was set in a later insn than the ones we are processing,
if (place == 0)
{
- basic_block bb = BASIC_BLOCK (this_basic_block);
+ basic_block bb = this_basic_block;
for (tem = PREV_INSN (i3); place == 0; tem = PREV_INSN (tem))
{
&& REGNO_REG_SET_P (bb->global_live_at_start,
REGNO (XEXP (note, 0))))
{
- SET_BIT (refresh_blocks, this_basic_block);
+ SET_BIT (refresh_blocks, this_basic_block->index);
need_refresh = 1;
}
}
after we remove them in delete_noop_moves. */
if (noop_move_p (place))
{
- SET_BIT (refresh_blocks, this_basic_block);
+ SET_BIT (refresh_blocks, this_basic_block->index);
need_refresh = 1;
}
i += HARD_REGNO_NREGS (i, reg_raw_mode[i]))
{
rtx piece = gen_rtx_REG (reg_raw_mode[i], i);
- basic_block bb = BASIC_BLOCK (this_basic_block);
+ basic_block bb = this_basic_block;
if (! dead_or_set_p (place, piece)
&& ! reg_bitfield_target_p (piece,
if (tem == bb->head)
{
SET_BIT (refresh_blocks,
- this_basic_block);
+ this_basic_block->index);
need_refresh = 1;
break;
}
since most links don't point very far away. */
for (insn = NEXT_INSN (XEXP (link, 0));
- (insn && (this_basic_block == n_basic_blocks - 1
- || BLOCK_HEAD (this_basic_block + 1) != insn));
+ (insn && (this_basic_block->next_bb == EXIT_BLOCK_PTR
+ || this_basic_block->next_bb->head != insn));
insn = NEXT_INSN (insn))
if (INSN_P (insn) && reg_overlap_mentioned_p (reg, PATTERN (insn)))
{
if (!has_fallthru
&& (branch_frequency > BB_FREQ_MAX / 10
- || (bb->frequency > BASIC_BLOCK (i - 1)->frequency * 10
- && (BASIC_BLOCK (i - 1)->frequency
+ || (bb->frequency > bb->prev_bb->frequency * 10
+ && (bb->prev_bb->frequency
<= ENTRY_BLOCK_PTR->frequency / 2))))
{
log = JUMP_ALIGN (label);
|| FUNCTION_ARG_REGNO_P (regno))))
return 0;
- return REGNO_REG_SET_P (BASIC_BLOCK (0)->global_live_at_start, regno);
+ return REGNO_REG_SET_P (ENTRY_BLOCK_PTR->next_bb->global_live_at_start, regno);
}
/* 1 if register REGNO was alive at a place where `setjmp' was called
return 0;
return ((REG_N_SETS (regno) > 1
- || REGNO_REG_SET_P (BASIC_BLOCK (0)->global_live_at_start, regno))
+ || REGNO_REG_SET_P (ENTRY_BLOCK_PTR->next_bb->global_live_at_start, regno))
&& REGNO_REG_SET_P (regs_live_at_setjmp, regno));
}
\f
}
/* Find the last line number note in the first block. */
- for (insn = BASIC_BLOCK (0)->end;
+ for (insn = ENTRY_BLOCK_PTR->next_bb->end;
insn != prologue_end && insn;
insn = PREV_INSN (insn))
if (GET_CODE (insn) == NOTE && NOTE_LINE_NUMBER (insn) > 0)
{
changed |= sbitmap_a_or_b_and_c_cg (hoist_vbein[bb], antloc[bb],
hoist_vbeout[bb], transp[bb]);
- if (bb != n_basic_blocks - 1)
+ if (BASIC_BLOCK (bb)->next_bb != EXIT_BLOCK_PTR)
sbitmap_intersection_of_succs (hoist_vbeout[bb], hoist_vbein, bb);
}
{
struct insn_chain **p = &reload_insn_chain;
struct insn_chain *prev = 0;
- int b = 0;
+ basic_block b = ENTRY_BLOCK_PTR->next_bb;
regset_head live_relevant_regs_head;
live_relevant_regs = INITIALIZE_REG_SET (live_relevant_regs_head);
{
struct insn_chain *c;
- if (first == BLOCK_HEAD (b))
+ if (first == b->head)
{
int i;
CLEAR_REG_SET (live_relevant_regs);
EXECUTE_IF_SET_IN_BITMAP
- (BASIC_BLOCK (b)->global_live_at_start, 0, i,
+ (b->global_live_at_start, 0, i,
{
if (i < FIRST_PSEUDO_REGISTER
? ! TEST_HARD_REG_BIT (eliminable_regset, i)
*p = c;
p = &c->next;
c->insn = first;
- c->block = b;
+ c->block = b->index;
if (INSN_P (first))
{
}
}
- if (first == BLOCK_END (b))
- b++;
+ if (first == b->end)
+ b = b->next_bb;
/* Stop after we pass the end of the last basic block. Verify that
no real insns are after the end of the last basic block.
We may want to reorganize the loop somewhat since this test should
always be the right exit test. Allow an ADDR_VEC or ADDR_DIF_VEC if
the previous real insn is a JUMP_INSN. */
- if (b == n_basic_blocks)
+ if (b == EXIT_BLOCK_PTR)
{
for (first = NEXT_INSN (first) ; first; first = NEXT_INSN (first))
if (INSN_P (first)
basic_block join_bb = NULL_BLOCK;
edge then_succ = then_bb->succ;
edge else_succ = else_bb->succ;
- int next_index;
+ basic_block next;
/* The THEN block of an IF-THEN combo must have exactly one predecessor. */
if (then_bb->pred->pred_next != NULL_EDGE)
/* ??? As an enhancement, move the ELSE block. Have to deal with
BLOCK notes, if by no other means than aborting the merge if they
exist. Sticky enough I don't want to think about it now. */
- next_index = then_bb->index;
- if (else_bb && ++next_index != else_bb->index)
+ next = then_bb;
+ if (else_bb && (next = next->next_bb) != else_bb)
return FALSE;
- if (++next_index != join_bb->index && join_bb->index != EXIT_BLOCK)
+ if ((next = next->next_bb) != join_bb && join_bb != EXIT_BLOCK_PTR)
{
if (else_bb)
join_bb = NULL;
/* If the non-trap block and the test are now adjacent, merge them.
Otherwise we must insert a direct branch. */
- if (test_bb->index + 1 == other_bb->index)
+ if (test_bb->next_bb == other_bb)
{
delete_insn (jump);
merge_if_block (test_bb, NULL, NULL, other_bb);
last_basic_block_p (bb)
basic_block bb;
{
- return (bb->index == n_basic_blocks - 1
- || (bb->index == n_basic_blocks - 2
+ if (bb == EXIT_BLOCK_PTR)
+ return false;
+
+ return (bb->next_bb == EXIT_BLOCK_PTR
+ || (bb->next_bb->next_bb == EXIT_BLOCK_PTR
&& bb->succ && !bb->succ->succ_next
- && bb->succ->dest->index == n_basic_blocks - 1));
+ && bb->succ->dest->next_bb == EXIT_BLOCK_PTR));
}
/* Sets branch probabilities according to PREDiction and FLAGS. HEADS[bb->index]
heads = xmalloc (sizeof (int) * n_basic_blocks);
memset (heads, -1, sizeof (int) * n_basic_blocks);
- heads[0] = n_basic_blocks;
+ heads[ENTRY_BLOCK_PTR->next_bb->index] = n_basic_blocks;
/* Process all prediction notes. */
ends. Fix that here. */
for (i = 0; i < n_basic_blocks; i++)
{
- rtx end = BLOCK_END (i);
+ basic_block bb = BASIC_BLOCK (i);
+ rtx end = bb->end;
rtx new = end;
rtx next = NEXT_INSN (new);
while (next != 0 && INSN_UID (next) >= old_max_uid
- && (i == n_basic_blocks - 1 || BLOCK_HEAD (i + 1) != next))
+ && (bb->next_bb == EXIT_BLOCK_PTR || bb->next_bb->head != next))
new = next, next = NEXT_INSN (new);
- BLOCK_END (i) = new;
+ bb->end = new;
}
done:
if (search_limit == 0)
return -1;
- /* The start of the function is basic block zero. */
+ /* The start of the function. */
else if (insn == 0)
- return 0;
+ return ENTRY_BLOCK_PTR->next_bb->index;
/* See if any of the upcoming CODE_LABELs start a basic block. If we reach
anything other than a CODE_LABEL or note, we can't find this code. */
basic_block b = BASIC_BLOCK (i);
edge e;
tail = b->end;
- if (i + 1 == n_basic_blocks
- || GET_CODE (BLOCK_HEAD (i + 1)) == CODE_LABEL)
+ if (b->next_bb == EXIT_BLOCK_PTR
+ || GET_CODE (b->next_bb->head) == CODE_LABEL)
break;
for (e = b->succ; e; e = e->succ_next)
if ((e->flags & EDGE_FALLTHRU) != 0)
abort ();
ending_block =
(INDEX_EDGE_PRED_BB (el, edge_index) == ENTRY_BLOCK_PTR)
- ? BASIC_BLOCK (0)
+ ? ENTRY_BLOCK_PTR->next_bb
: find_pdom (pdom, INDEX_EDGE_PRED_BB (el, edge_index));
for (current_block = INDEX_EDGE_SUCC_BB (el, edge_index);
abort ();
if (block == ENTRY_BLOCK_PTR)
- return BASIC_BLOCK (0);
+ return ENTRY_BLOCK_PTR->next_bb;
else if (block == EXIT_BLOCK_PTR || pdom[block->index] == EXIT_BLOCK)
return EXIT_BLOCK_PTR;
else