+2014-08-26 David Malcolm <dmalcolm@redhat.com>
+
+ * rtx-classes-status.txt (TODO): SET_BB_HEAD, SET_BB_END,
+ SET_BB_HEADER are done.
+
2014-08-26 David Malcolm <dmalcolm@redhat.com>
* rtx-classes-status.txt (TODO): SET_DEP_PRO and SET_DEP_CON are
+2014-08-26 David Malcolm <dmalcolm@redhat.com>
+
+ * 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.
+
2014-08-26 David Malcolm <dmalcolm@redhat.com>
* basic-block.h (create_basic_block_structure): Strengthen params
struct GTY(()) rtl_bb_info {
/* The first insn of the block is embedded into bb->il.x. */
/* The last insn of the block. */
- rtx end_;
+ rtx_insn *end_;
/* In CFGlayout mode points to insn notes/jumptables to be placed just before
and after the block. */
- rtx header_;
+ rtx_insn *header_;
rtx_insn *footer_;
};
union basic_block_il_dependent {
struct gimple_bb_info GTY ((tag ("0"))) gimple;
struct {
- rtx head_;
+ rtx_insn *head_;
struct rtl_bb_info * rtl;
} GTY ((tag ("1"))) x;
} GTY ((desc ("((%1.flags & BB_RTL) != 0)"))) il;
to rtx_insn. Once the underlying fields are converted from rtx
to rtx_insn, these can be converted back to macros. */
-extern rtx_insn *BB_HEAD (const_basic_block bb);
-extern rtx& SET_BB_HEAD (basic_block bb);
-
-extern rtx_insn *BB_END (const_basic_block bb);
-extern rtx& SET_BB_END (basic_block bb);
-
-extern rtx_insn *BB_HEADER (const_basic_block bb);
-extern rtx& SET_BB_HEADER (basic_block bb);
-
+#define BB_HEAD(B) (B)->il.x.head_
+#define BB_END(B) (B)->il.x.rtl->end_
+#define BB_HEADER(B) (B)->il.x.rtl->header_
#define BB_FOOTER(B) (B)->il.x.rtl->footer_
/* Special block numbers [markers] for entry and exit.
gcc_assert (single_succ_p (src));
new_jump = emit_jump_insn_after (gen_jump (label), BB_END (src));
- SET_BB_END (src) = new_jump;
+ BB_END (src) = new_jump;
JUMP_LABEL (new_jump) = label;
LABEL_NUSES (label) += 1;
/* Make BB_END for cur_bb be the jump instruction (NOT the
barrier instruction at the end of the sequence...). */
- SET_BB_END (cur_bb) = jump_insn;
+ BB_END (cur_bb) = jump_insn;
}
}
}
if (NEXT_INSN (ins))
SET_PREV_INSN (NEXT_INSN (ins)) = ins;
if (BB_END (bb) == insn)
- SET_BB_END (bb) = ins;
+ BB_END (bb) = ins;
}
else
gcc_assert (DEBUG_INSN_P (ins));
CLEAR_REG_SET (&new_chain->dead_or_set);
if (chain->insn == BB_HEAD (BASIC_BLOCK_FOR_FN (cfun, chain->block)))
- SET_BB_HEAD (BASIC_BLOCK_FOR_FN (cfun, chain->block)) = new_chain->insn;
+ BB_HEAD (BASIC_BLOCK_FOR_FN (cfun, chain->block)) = new_chain->insn;
}
else
{
&new_chain->live_throughout);
CLEAR_REG_SET (&new_chain->dead_or_set);
if (chain->insn == BB_END (BASIC_BLOCK_FOR_FN (cfun, chain->block)))
- SET_BB_END (BASIC_BLOCK_FOR_FN (cfun, chain->block)) = new_chain->insn;
+ BB_END (BASIC_BLOCK_FOR_FN (cfun, chain->block)) = new_chain->insn;
}
new_chain->block = chain->block;
new_chain->is_caller_save_insn = 1;
fallthru = split_block (bb, PREV_INSN (insn));
if (flow_transfer_insn)
{
- SET_BB_END (bb) = flow_transfer_insn;
+ BB_END (bb) = flow_transfer_insn;
/* Clean up the bb field for the insns between the blocks. */
for (x = NEXT_INSN (flow_transfer_insn);
ordinary jump, we need to take care and move basic block boundary. */
if (flow_transfer_insn)
{
- SET_BB_END (bb) = flow_transfer_insn;
+ BB_END (bb) = flow_transfer_insn;
/* Clean up the bb field for the insns that do not belong to BB. */
x = flow_transfer_insn;
if (tablejump_p (BB_END (b), &label, &table)
&& prev_active_insn (label) == BB_END (b))
{
- SET_BB_END (b) = table;
+ BB_END (b) = table;
}
/* There had better have been a barrier there. Delete it. */
reorder_insns_nobb (BB_HEAD (b), BB_END (b), BB_END (a));
/* Restore the real end of b. */
- SET_BB_END (b) = real_b_end;
+ BB_END (b) = real_b_end;
if (dump_file)
fprintf (dump_file, "Moved block %d after %d and merged.\n",
rr.r1 = label1;
rr.r2 = label2;
rr.update_label_nuses = false;
- for_each_rtx (&SET_BB_END (bb1), replace_label, &rr);
+ for_each_rtx_in_insn (&BB_END (bb1), replace_label, &rr);
match = (old_insns_match_p (mode, BB_END (bb1), BB_END (bb2))
== dir_both);
from the instruction is deleted too. */
rr.r1 = label2;
rr.r2 = label1;
- for_each_rtx (&SET_BB_END (bb1), replace_label, &rr);
+ for_each_rtx_in_insn (&BB_END (bb1), replace_label, &rr);
return match;
}
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);
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);
| 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))
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);
/* 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;
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);
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
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);
}
}
/* Holds the interesting leading and trailing notes for the function.
Only applicable if the CFG is in cfglayout mode. */
-static GTY(()) rtx cfg_layout_function_footer;
+static GTY(()) rtx_insn *cfg_layout_function_footer;
static GTY(()) rtx cfg_layout_function_header;
static rtx_insn *skip_insns_after_block (basic_block);
/* Delete INSN by patching it out. */
void
-delete_insn (rtx insn)
+delete_insn (rtx uncast_insn)
{
+ rtx_insn *insn = as_a <rtx_insn *> (uncast_insn);
rtx note;
bool really_delete = true;
&& bb == BLOCK_FOR_INSN (bb_note))
{
reorder_insns_nobb (insn, insn, bb_note);
- SET_BB_HEAD (bb) = bb_note;
+ BB_HEAD (bb) = bb_note;
if (BB_END (bb) == bb_note)
- SET_BB_END (bb) = insn;
+ BB_END (bb) = insn;
}
}
if (NEXT_INSN (end) == bb_note)
end = bb_note;
- SET_BB_HEAD (bb) = head;
- SET_BB_END (bb) = end;
+ BB_HEAD (bb) = head;
+ BB_END (bb) = end;
bb->index = last_basic_block_for_fn (cfun)++;
bb->flags = BB_NEW | BB_RTL;
link_block (bb, after);
end = get_last_bb_insn (b);
/* Selectively delete the entire chain. */
- SET_BB_HEAD (b) = NULL;
+ BB_HEAD (b) = NULL;
delete_insn_chain (insn, end, true);
/* Create the new basic block. */
new_bb = create_basic_block (NEXT_INSN (insn), BB_END (bb), bb);
BB_COPY_PARTITION (new_bb, bb);
- SET_BB_END (bb) = insn;
+ BB_END (bb) = insn;
/* Redirect the outgoing edges. */
new_bb->succs = bb->succs;
if (!unique_locus_on_edge_between_p (a, b))
return;
- SET_BB_END (a) = emit_insn_after_noloc (gen_nop (), BB_END (a), a);
+ BB_END (a) = emit_insn_after_noloc (gen_nop (), BB_END (a), a);
INSN_LOCATION (BB_END (a)) = EDGE_SUCC (a, 0)->goto_locus;
}
/* Delete everything marked above as well as crap that might be
hanging out between the two blocks. */
- SET_BB_END (a) = a_end;
- SET_BB_HEAD (b) = b_empty ? NULL_RTX : b_head;
+ BB_END (a) = a_end;
+ BB_HEAD (b) = b_empty ? NULL : b_head;
delete_insn_chain (del_first, del_last, true);
/* When not optimizing and the edge is the only place in RTL which holds
{
update_bb_for_insn_chain (a_end, b_debug_end, a);
- SET_BB_END (a) = b_debug_end;
- SET_BB_HEAD (b) = NULL_RTX;
+ BB_END (a) = b_debug_end;
+ BB_HEAD (b) = NULL;
}
else if (b_end != b_debug_end)
{
reorder_insns_nobb (NEXT_INSN (a_end), PREV_INSN (b_debug_start),
b_debug_end);
update_bb_for_insn_chain (b_debug_start, b_debug_end, a);
- SET_BB_END (a) = b_debug_end;
+ BB_END (a) = b_debug_end;
}
df_bb_delete (b->index);
if (!LABEL_P (BB_HEAD (block)))
{
- SET_BB_HEAD (block) = emit_label_before (gen_label_rtx (), BB_HEAD (block));
+ BB_HEAD (block) = emit_label_before (gen_label_rtx (), BB_HEAD (block));
}
return BB_HEAD (block);
e = find_fallthru_edge (bb->succs);
stop = NEXT_INSN (BB_END (bb));
- SET_BB_END (bb) = insn;
+ BB_END (bb) = insn;
for (insn = NEXT_INSN (insn); insn != stop; insn = next)
{
rtx_insn *end;
if (PREV_INSN (BB_HEAD (bb)) && next_insn != BB_HEAD (bb))
- SET_BB_HEADER (bb) = unlink_insn_chain (next_insn,
+ BB_HEADER (bb) = unlink_insn_chain (next_insn,
PREV_INSN (BB_HEAD (bb)));
end = skip_insns_after_block (bb);
if (NEXT_INSN (BB_END (bb)) && BB_END (bb) != end)
{
bb->aux = NULL;
if (!stay_in_cfglayout_mode)
- SET_BB_HEADER (bb) = BB_FOOTER (bb) = NULL;
+ BB_HEADER (bb) = BB_FOOTER (bb) = NULL;
}
/* Maybe reset the original copy tables, they are not valid anymore
}
nb = split_edge (e);
if (!INSN_P (BB_END (nb)))
- SET_BB_END (nb) = emit_insn_after_noloc (gen_nop (), BB_END (nb),
+ BB_END (nb) = emit_insn_after_noloc (gen_nop (), BB_END (nb),
nb);
INSN_LOCATION (BB_END (nb)) = e->goto_locus;
insn = NEXT_INSN (insn);
insn = duplicate_insn_chain (BB_HEADER (bb), insn);
if (insn)
- SET_BB_HEADER (new_bb) = unlink_insn_chain (insn, get_last_insn ());
+ BB_HEADER (new_bb) = unlink_insn_chain (insn, get_last_insn ());
}
if (BB_FOOTER (bb))
cfg_layout_delete_block (basic_block bb)
{
rtx_insn *insn, *next, *prev = PREV_INSN (BB_HEAD (bb)), *remaints;
- rtx *to;
+ rtx_insn **to;
if (BB_HEADER (bb))
{
}
}
if (bb->next_bb != EXIT_BLOCK_PTR_FOR_FN (cfun))
- to = &SET_BB_HEADER (bb->next_bb);
+ to = &BB_HEADER (bb->next_bb);
else
to = &cfg_layout_function_footer;
SET_PREV_INSN (BB_FOOTER (a)) = last;
BB_FOOTER (a) = BB_HEADER (b);
}
- SET_BB_HEADER (b) = NULL;
+ BB_HEADER (b) = NULL;
}
/* In the case basic blocks are not adjacent, move them around. */
else
{
insn = BB_HEAD (b);
- SET_BB_END (a) = BB_END (b);
+ BB_END (a) = BB_END (b);
}
/* emit_insn_after_noloc doesn't call df_insn_change_bb.
if (!NOTE_INSN_BASIC_BLOCK_P (insn))
insn = NEXT_INSN (insn);
gcc_assert (NOTE_INSN_BASIC_BLOCK_P (insn));
- SET_BB_HEAD (b) = SET_BB_END (b) = NULL;
+ BB_HEAD (b) = BB_END (b) = NULL;
delete_insn (insn);
df_bb_delete (b->index);
rtl_account_profile_record,
};
-/* BB_HEAD as an rvalue. */
-
-rtx_insn *BB_HEAD (const_basic_block bb)
-{
- rtx insn = bb->il.x.head_;
- return safe_as_a <rtx_insn *> (insn);
-}
-
-/* BB_HEAD for use as an lvalue. */
-
-rtx& SET_BB_HEAD (basic_block bb)
-{
- return bb->il.x.head_;
-}
-
-/* BB_END as an rvalue. */
-
-rtx_insn *BB_END (const_basic_block bb)
-{
- rtx insn = bb->il.x.rtl->end_;
- return safe_as_a <rtx_insn *> (insn);
-}
-
-/* BB_END as an lvalue. */
-
-rtx& SET_BB_END (basic_block bb)
-{
- return bb->il.x.rtl->end_;
-}
-
-/* BB_HEADER as an rvalue. */
-
-rtx_insn *BB_HEADER (const_basic_block bb)
-{
- rtx insn = bb->il.x.rtl->header_;
- return safe_as_a <rtx_insn *> (insn);
-}
-
-/* BB_HEADER as an lvalue. */
-
-rtx& SET_BB_HEADER (basic_block bb)
-{
- return bb->il.x.rtl->header_;
-}
-
#include "gt-cfgrtl.h"
SET_NEXT_INSN (PREV_INSN (BB_HEAD (bb))) = orig_vec[0];
SET_NEXT_INSN (orig_vec[n_insns - 1]) = NEXT_INSN (BB_END (bb));
SET_PREV_INSN (NEXT_INSN (BB_END (bb))) = orig_vec[n_insns - 1];
- SET_BB_HEAD (bb) = orig_vec[0];
- SET_BB_END (bb) = orig_vec[n_insns - 1];
+ BB_HEAD (bb) = orig_vec[0];
+ BB_END (bb) = orig_vec[n_insns - 1];
undo_splits:
free_delay_pairs ();
FOR_BB_INSNS (bb, insn)
rtx p = gen_rtx_REG (BImode, r);
rtx_insn *n = emit_insn_after (gen_pred_rel_mutex (p), head);
if (head == BB_END (bb))
- SET_BB_END (bb) = n;
+ BB_END (bb) = n;
head = n;
}
}
emit_insn_before (gen_safe_across_calls_all (), insn);
rtx_insn *a = emit_insn_after (gen_safe_across_calls_normal (), insn);
if (BB_HEAD (bb) == insn)
- SET_BB_HEAD (bb) = b;
+ BB_HEAD (bb) = b;
if (BB_END (bb) == insn)
- SET_BB_END (bb) = a;
+ BB_END (bb) = a;
}
if (insn == BB_END (bb))
they know how to update a SEQUENCE. */
void
-add_insn_after (rtx insn, rtx after, basic_block bb)
+add_insn_after (rtx uncast_insn, rtx after, basic_block bb)
{
+ rtx_insn *insn = as_a <rtx_insn *> (uncast_insn);
add_insn_after_nobb (insn, after);
if (!BARRIER_P (after)
&& !BARRIER_P (insn)
/* Avoid clobbering of structure when creating new BB. */
&& !BARRIER_P (insn)
&& !NOTE_INSN_BASIC_BLOCK_P (insn))
- SET_BB_END (bb) = insn;
+ BB_END (bb) = insn;
}
}
void
remove_insn (rtx insn)
{
- rtx next = NEXT_INSN (insn);
- rtx prev = PREV_INSN (insn);
+ rtx_insn *next = NEXT_INSN (insn);
+ rtx_insn *prev = PREV_INSN (insn);
basic_block bb;
if (prev)
/* Never ever delete the basic block note without deleting whole
basic block. */
gcc_assert (!NOTE_P (insn));
- SET_BB_HEAD (bb) = next;
+ BB_HEAD (bb) = next;
}
if (BB_END (bb) == insn)
- SET_BB_END (bb) = prev;
+ BB_END (bb) = prev;
}
}
&& (bb2 = BLOCK_FOR_INSN (from)))
{
if (BB_END (bb2) == to)
- SET_BB_END (bb2) = prev;
+ BB_END (bb2) = prev;
df_set_bb_dirty (bb2);
}
if (BB_END (bb) == after)
- SET_BB_END (bb) = to;
+ BB_END (bb) = to;
for (x = from; x != NEXT_INSN (to); x = NEXT_INSN (x))
if (!BARRIER_P (x))
efficiently. */
static rtx
-emit_insn_after_1 (rtx first, rtx after, basic_block bb)
+emit_insn_after_1 (rtx_insn *first, rtx after, basic_block bb)
{
- rtx last;
- rtx after_after;
+ rtx_insn *last;
+ rtx_insn *after_after;
if (!bb && !BARRIER_P (after))
bb = BLOCK_FOR_INSN (after);
df_insn_rescan (last);
}
if (BB_END (bb) == after)
- SET_BB_END (bb) = last;
+ BB_END (bb) = last;
}
else
for (last = first; NEXT_INSN (last); last = NEXT_INSN (last))
case CODE_LABEL:
case BARRIER:
case NOTE:
- last = emit_insn_after_1 (x, after, bb);
+ last = emit_insn_after_1 (as_a <rtx_insn *> (x), after, bb);
break;
#ifdef ENABLE_RTL_CHECKING
reorder_insns_nobb (note, note, end_tail);
if (end_tail == BB_END (end))
- SET_BB_END (end) = note;
+ BB_END (end) = note;
if (BLOCK_FOR_INSN (note) != end)
df_insn_change_bb (note, end);
SET_NEXT_INSN (note_list) = head;
if (BLOCK_FOR_INSN (head) != head_bb)
- SET_BB_END (head_bb) = note_list;
+ BB_END (head_bb) = note_list;
head = note_head;
}
gcc_assert (BLOCK_FOR_INSN (PREV_INSN (insn)) == bb);
- SET_BB_END (bb) = PREV_INSN (insn);
+ BB_END (bb) = PREV_INSN (insn);
}
gcc_assert (BB_END (bb) != last);
/* Update BB_END, if needed. */
if (BB_END (bb) == last)
- SET_BB_END (bb) = insn;
+ BB_END (bb) = insn;
}
SCHED_GROUP_P (insn) = 0;
rtx_note *note = emit_note_after (NOTE_INSN_DELETED, end);
/* Make note appear outside BB. */
set_block_for_insn (note, NULL);
- SET_BB_END (EXIT_BLOCK_PTR_FOR_FN (cfun)->prev_bb) = end;
+ BB_END (EXIT_BLOCK_PTR_FOR_FN (cfun)->prev_bb) = end;
}
}
if (!NOTE_INSN_BASIC_BLOCK_P (BB_END (jump_bb_next)))
/* if jump_bb_next is not empty. */
- SET_BB_END (jump_bb) = BB_END (jump_bb_next);
+ BB_END (jump_bb) = BB_END (jump_bb_next);
if (BB_END (bb) != PREV_INSN (jump))
/* Then there are instruction after jump that should be placed
to jump_bb_next. */
- SET_BB_END (jump_bb_next) = BB_END (bb);
+ BB_END (jump_bb_next) = BB_END (bb);
else
/* Otherwise jump_bb_next is empty. */
- SET_BB_END (jump_bb_next) = NEXT_INSN (BB_HEAD (jump_bb_next));
+ BB_END (jump_bb_next) = NEXT_INSN (BB_HEAD (jump_bb_next));
/* To make assertion in move_insn happy. */
- SET_BB_END (bb) = PREV_INSN (jump);
+ BB_END (bb) = PREV_INSN (jump);
update_bb_for_insn (jump_bb_next);
}
rtx note;
if (else_bb && insn_b == BB_END (else_bb))
- SET_BB_END (else_bb) = PREV_INSN (insn_b);
+ BB_END (else_bb) = PREV_INSN (insn_b);
reorder_insns (insn_b, insn_b, PREV_INSN (jump));
/* If there was a REG_EQUAL note, delete it since it may have been
rtx_insn *insn;
if (end == BB_END (merge_bb))
- SET_BB_END (merge_bb) = PREV_INSN (head);
+ BB_END (merge_bb) = PREV_INSN (head);
/* PR 21767: when moving insns above a conditional branch, the REG_EQUAL
notes being moved might become invalid. */
REG_LIVE_LENGTH (regno) = 2;
if (insn == BB_HEAD (bb))
- SET_BB_HEAD (bb) = PREV_INSN (insn);
+ BB_HEAD (bb) = PREV_INSN (insn);
ira_reg_equiv[regno].init_insns
= gen_rtx_INSN_LIST (VOIDmode, new_insn, NULL_RTX);
}
if (update_end)
- SET_BB_END (current_block) = PREV_INSN (insn);
+ BB_END (current_block) = PREV_INSN (insn);
}
\f
/* Print stack configuration. */
/* Update links from insn to bb and vice versa. */
df_insn_change_bb (insn, bb);
if (BB_END (bb) == after)
- SET_BB_END (bb) = insn;
+ BB_END (bb) = insn;
prepare_insn_expr (insn, seqno);
return insn;
SET_NEXT_INSN (nop) = note;
SET_PREV_INSN (next_insn) = note;
- SET_BB_END (prev_bb) = nop;
+ BB_END (prev_bb) = nop;
BLOCK_FOR_INSN (nop) = prev_bb;
}
TODO: "Scaffolding" to be removed
=================================
* DF_REF_INSN
-* SET_BB_HEAD, SET_BB_END, SET_BB_HEADER
* SET_NEXT_INSN, SET_PREV_INSN