+2013-12-09 David Malcolm <dmalcolm@redhat.com>
+
+ * basic-block.h (FOR_EACH_BB_REVERSE): Eliminate macro.
+
+ * cfghooks.c (verify_flow_info): Replace uses of FOR_EACH_BB_REVERSE
+ with FOR_EACH_BB_REVERSE_FN, making uses of cfun explicit.
+ * cfgrtl.c (print_rtl_with_bb, rtl_verify_edges,
+ rtl_verify_bb_insns, rtl_verify_bb_pointers,
+ rtl_verify_bb_insn_chain, rtl_verify_fallthru): Likewise.
+ * config/ia64/ia64.c (emit_predicate_relation_info): Likewise.
+ * config/sh/sh.c (sh_md_init_global): Likewise.
+ * config/sh/sh_optimize_sett_clrt.cc
+ (sh_optimize_sett_clrt::execute): Likewise.
+ * dce.c (reset_unmarked_insns_debug_uses, delete_unmarked_insns):
+ Likewise.
+ * dominance.c (calc_dfs_tree): Likewise.
+ * final.c (final): Likewise.
+ * function.c (thread_prologue_and_epilogue_insns): Likewise.
+ * gcse.c (compute_code_hoist_vbeinout): Likewise.
+ * ira.c (update_equiv_regs, build_insn_chain): Likewise.
+ * lcm.c (compute_antinout_edge): Likewise.
+ * mode-switching.c (optimize_mode_switching): Likewise.
+ * postreload.c (reload_combine): Likewise.
+ * recog.c (split_all_insns, peephole2_optimize): Likewise.
+ * tree-ssa-live.c (live_worklist): Likewise.
+
2013-12-09 David Malcolm <dmalcolm@redhat.com>
* basic-block.h (FOR_EACH_BB): Eliminate macro.
#define FOR_EACH_BB_REVERSE_FN(BB, FN) \
FOR_BB_BETWEEN (BB, (FN)->cfg->x_exit_block_ptr->prev_bb, (FN)->cfg->x_entry_block_ptr, prev_bb)
-#define FOR_EACH_BB_REVERSE(BB) FOR_EACH_BB_REVERSE_FN (BB, cfun)
-
/* For iterating over insns in basic block. */
#define FOR_BB_INSNS(BB, INSN) \
for ((INSN) = BB_HEAD (BB); \
}
/* Now check the basic blocks (boundaries etc.) */
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
int n_fallthru = 0;
edge e;
if (flags & TDF_BLOCKS)
{
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
rtx x;
int err = 0;
basic_block bb;
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
int n_fallthru = 0, n_branch = 0, n_abnormal_call = 0, n_sibcall = 0;
int n_eh = 0, n_abnormal = 0;
int err = 0;
basic_block bb;
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
/* Now check the header of basic
block. It ought to contain optional CODE_LABEL followed
basic_block bb;
/* Check the general integrity of the basic blocks. */
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
rtx insn;
bb_info = XCNEWVEC (basic_block, max_uid);
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
rtx head = BB_HEAD (bb);
rtx end = BB_END (bb);
basic_block bb;
int err = 0;
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
edge e;
{
basic_block bb;
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
int r;
rtx head = BB_HEAD (bb);
relations around them. Otherwise the assembler will assume the call
returns, and complain about uses of call-clobbered predicates after
the call. */
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
rtx insn = BB_HEAD (bb);
regmode_weight[1] = (short *) xcalloc (old_max_uid, sizeof (short));
r0_life_regions = 0;
- FOR_EACH_BB_REVERSE (b)
+ FOR_EACH_BB_REVERSE_FN (b, cfun)
{
find_regmode_weight (b, SImode);
find_regmode_weight (b, SFmode);
// Look for insns that set the ccreg to a constant value and see if it can
// be optimized.
basic_block bb;
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
for (rtx next_i, i = NEXT_INSN (BB_HEAD (bb));
i != NULL_RTX && i != BB_END (bb); i = next_i)
{
basic_block bb;
rtx insn, next;
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
FOR_BB_INSNS_REVERSE_SAFE (bb, insn, next)
if (DEBUG_INSN_P (insn))
{
rtx insn, next;
bool must_clean = false;
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
FOR_BB_INSNS_REVERSE_SAFE (bb, insn, next)
if (NONDEBUG_INSN_P (insn))
{
basic_block b;
bool saw_unconnected = false;
- FOR_EACH_BB_REVERSE (b)
+ FOR_EACH_BB_REVERSE_FN (b, cfun)
{
if (EDGE_COUNT (b->succs) > 0)
{
if (saw_unconnected)
{
- FOR_EACH_BB_REVERSE (b)
+ FOR_EACH_BB_REVERSE_FN (b, cfun)
{
basic_block b2;
if (di->dfs_order[b->index])
/* There is no cfg for a thunk. */
if (!cfun->is_thunk)
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
start_to_bb[INSN_UID (BB_HEAD (bb))] = bb;
end_to_bb[INSN_UID (BB_END (bb))] = bb;
}
/* Now duplicate the tails. */
if (!bitmap_empty_p (&bb_tail))
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
basic_block copy_bb, tbb;
rtx insert_point;
/* We scan the blocks in the reverse order to speed up
the convergence. */
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
if (bb->next_bb != EXIT_BLOCK_PTR_FOR_FN (cfun))
{
within the same loop (or in an inner loop), then move the register
initialization just before the use, so that they are in the same
basic block. */
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
loop_depth = bb_loop_depth (bb);
for (insn = BB_END (bb);
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (TEST_HARD_REG_BIT (eliminable_regset, i))
bitmap_set_bit (elim_regset, i);
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
bitmap_iterator bi;
rtx insn;
/* Put every block on the worklist; this is necessary because of the
optimistic initialization of ANTIN above. */
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
*qin++ = bb;
bb->aux = bb;
insert_insn_on_edge (mode_set, eg);
}
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
if (bitmap_bit_p (del[bb->index], j))
{
make_preds_opaque (bb, j);
{
int no_mode = num_modes[entity_map[j]];
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
struct seginfo *ptr, *next;
for (ptr = bb_info[j][bb->index].seginfo; ptr; ptr = next)
label_live = XNEWVEC (HARD_REG_SET, n_labels);
CLEAR_HARD_REG_SET (ever_live_at_start);
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
insn = BB_HEAD (bb);
if (LABEL_P (insn))
bitmap_clear (blocks);
changed = false;
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
rtx insn, next;
bool finish = false;
search_ofs = 0;
live = BITMAP_ALLOC (®_obstack);
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
{
bool past_end = false;
int pos;
/* Visit all the blocks in reverse order and propagate live on entry values
into the predecessors blocks. */
- FOR_EACH_BB_REVERSE (bb)
+ FOR_EACH_BB_REVERSE_FN (bb, cfun)
loe_visit_block (live, bb, visited, tmp);
/* Process any blocks which require further iteration. */