static int
estimate_shadow_tick (struct delay_pair *p)
{
- bitmap_head processed;
+ auto_bitmap processed;
int t;
bool cutoff;
- bitmap_initialize (&processed, 0);
- cutoff = !estimate_insn_tick (&processed, p->i2,
+ cutoff = !estimate_insn_tick (processed, p->i2,
max_insn_queue_index + pair_delay (p));
- bitmap_clear (&processed);
if (cutoff)
return max_insn_queue_index;
t = INSN_TICK_ESTIMATE (p->i2) - (clock_var + pair_delay (p) + 1);
fix_inter_tick (rtx_insn *head, rtx_insn *tail)
{
/* Set of instructions with corrected INSN_TICK. */
- bitmap_head processed;
+ auto_bitmap processed;
/* ??? It is doubtful if we should assume that cycle advance happens on
basic block boundaries. Basically insns that are unconditionally ready
on the start of the block are more preferable then those which have
a one cycle dependency over insn from the previous block. */
int next_clock = clock_var + 1;
- bitmap_initialize (&processed, 0);
-
/* Iterates over scheduled instructions and fix their INSN_TICKs and
INSN_TICKs of dependent instructions, so that INSN_TICKs are consistent
across different blocks. */
gcc_assert (tick >= MIN_TICK);
/* Fix INSN_TICK of instruction from just scheduled block. */
- if (bitmap_set_bit (&processed, INSN_LUID (head)))
+ if (bitmap_set_bit (processed, INSN_LUID (head)))
{
tick -= next_clock;
/* If NEXT has its INSN_TICK calculated, fix it.
If not - it will be properly calculated from
scratch later in fix_tick_ready. */
- && bitmap_set_bit (&processed, INSN_LUID (next)))
+ && bitmap_set_bit (processed, INSN_LUID (next)))
{
tick -= next_clock;
}
}
}
- bitmap_clear (&processed);
}
/* Check if NEXT is ready to be added to the ready or queue list.
{
rtx_insn *note, *insn, *jump;
auto_vec<rtx_insn *, 10> ready_list;
- bitmap_head in_ready;
-
- bitmap_initialize (&in_ready, 0);
+ auto_bitmap in_ready;
/* NOTE - a basic block note. */
note = NEXT_INSN (BB_HEAD (rec));
{
sd_delete_dep (sd_it);
- if (bitmap_set_bit (&in_ready, INSN_LUID (consumer)))
+ if (bitmap_set_bit (in_ready, INSN_LUID (consumer)))
ready_list.safe_push (consumer);
}
else
}
while (insn != note);
- bitmap_clear (&in_ready);
-
/* Try to add instructions to the ready or queue list. */
unsigned int i;
rtx_insn *temp;
static void
add_store_equivs (void)
{
- bitmap_head seen_insns;
+ auto_bitmap seen_insns;
- bitmap_initialize (&seen_insns, NULL);
for (rtx_insn *insn = get_insns (); insn; insn = NEXT_INSN (insn))
{
rtx set, src, dest;
unsigned regno;
rtx_insn *init_insn;
- bitmap_set_bit (&seen_insns, INSN_UID (insn));
+ bitmap_set_bit (seen_insns, INSN_UID (insn));
if (! INSN_P (insn))
continue;
&& ! reg_equiv[regno].pdx_subregs
&& reg_equiv[regno].init_insns != NULL
&& (init_insn = reg_equiv[regno].init_insns->insn ()) != 0
- && bitmap_bit_p (&seen_insns, INSN_UID (init_insn))
+ && bitmap_bit_p (seen_insns, INSN_UID (init_insn))
&& ! find_reg_note (init_insn, REG_EQUIV, NULL_RTX)
&& validate_equiv_mem (init_insn, src, dest) == valid_reload
&& ! memref_used_between_p (dest, init_insn, insn)
INSN_UID (insn));
}
}
- bitmap_clear (&seen_insns);
}
/* Scan all regs killed in an insn to see if any of them are registers
moved freely downwards, but are otherwise transparent to a block. */
bitmap_head *bb_moveable_reg_sets = XNEWVEC (bitmap_head,
last_basic_block_for_fn (cfun));
- bitmap_head live, used, set, interesting, unusable_as_input;
+ auto_bitmap live, used, set, interesting, unusable_as_input;
bitmap_iterator bi;
- bitmap_initialize (&interesting, 0);
first_moveable_pseudo = max_regs;
pseudo_replaced_reg.release ();
calculate_dominance_info (CDI_DOMINATORS);
i = 0;
- bitmap_initialize (&live, 0);
- bitmap_initialize (&used, 0);
- bitmap_initialize (&set, 0);
- bitmap_initialize (&unusable_as_input, 0);
FOR_EACH_BB_FN (bb, cfun)
{
rtx_insn *insn;
bitmap_initialize (local, 0);
bitmap_initialize (transp, 0);
bitmap_initialize (moveable, 0);
- bitmap_copy (&live, df_get_live_out (bb));
- bitmap_and_into (&live, df_get_live_in (bb));
- bitmap_copy (transp, &live);
+ bitmap_copy (live, df_get_live_out (bb));
+ bitmap_and_into (live, df_get_live_in (bb));
+ bitmap_copy (transp, live);
bitmap_clear (moveable);
- bitmap_clear (&live);
- bitmap_clear (&used);
- bitmap_clear (&set);
+ bitmap_clear (live);
+ bitmap_clear (used);
+ bitmap_clear (set);
FOR_BB_INSNS (bb, insn)
if (NONDEBUG_INSN_P (insn))
{
if (use
&& def
&& DF_REF_REGNO (use) == DF_REF_REGNO (def)
- && !bitmap_bit_p (&set, DF_REF_REGNO (use))
+ && !bitmap_bit_p (set, DF_REF_REGNO (use))
&& rtx_moveable_p (&PATTERN (insn), OP_IN))
{
unsigned regno = DF_REF_REGNO (use);
bitmap_set_bit (moveable, regno);
- bitmap_set_bit (&set, regno);
- bitmap_set_bit (&used, regno);
+ bitmap_set_bit (set, regno);
+ bitmap_set_bit (used, regno);
bitmap_clear_bit (transp, regno);
continue;
}
FOR_EACH_INSN_INFO_USE (use, insn_info)
{
unsigned regno = DF_REF_REGNO (use);
- bitmap_set_bit (&used, regno);
+ bitmap_set_bit (used, regno);
if (bitmap_clear_bit (moveable, regno))
bitmap_clear_bit (transp, regno);
}
FOR_EACH_INSN_INFO_DEF (def, insn_info)
{
unsigned regno = DF_REF_REGNO (def);
- bitmap_set_bit (&set, regno);
+ bitmap_set_bit (set, regno);
bitmap_clear_bit (transp, regno);
bitmap_clear_bit (moveable, regno);
}
}
}
- bitmap_clear (&live);
- bitmap_clear (&used);
- bitmap_clear (&set);
-
FOR_EACH_BB_FN (bb, cfun)
{
bitmap local = bb_local + bb->index;
if (dump_file)
fprintf (dump_file, "Ignoring reg %d, has equiv memory\n",
regno);
- bitmap_set_bit (&unusable_as_input, regno);
+ bitmap_set_bit (unusable_as_input, regno);
continue;
}
continue;
}
- bitmap_set_bit (&interesting, regno);
+ bitmap_set_bit (interesting, regno);
/* If we get here, we know closest_use is a non-NULL insn
(as opposed to const_0_rtx). */
closest_uses[regno] = as_a <rtx_insn *> (closest_use);
}
}
- EXECUTE_IF_SET_IN_BITMAP (&interesting, 0, i, bi)
+ EXECUTE_IF_SET_IN_BITMAP (interesting, 0, i, bi)
{
df_ref def = DF_REG_DEF_CHAIN (i);
rtx_insn *def_insn = DF_REF_INSN (def);
FOR_EACH_INSN_USE (use, def_insn)
{
unsigned regno = DF_REF_REGNO (use);
- if (bitmap_bit_p (&unusable_as_input, regno))
+ if (bitmap_bit_p (unusable_as_input, regno))
{
all_ok = false;
if (dump_file)
bitmap_clear (bb_transp_live + bb->index);
bitmap_clear (bb_moveable_reg_sets + bb->index);
}
- bitmap_clear (&interesting);
- bitmap_clear (&unusable_as_input);
free (uid_luid);
free (closest_uses);
free (bb_local);
basic_block bb, call_dom = NULL;
basic_block first = single_succ (ENTRY_BLOCK_PTR_FOR_FN (cfun));
rtx_insn *insn, *last_interesting_insn = NULL;
- bitmap_head need_new, reachable;
+ auto_bitmap need_new, reachable;
vec<basic_block> queue;
if (!SHRINK_WRAPPING_ENABLED)
return false;
- bitmap_initialize (&need_new, 0);
- bitmap_initialize (&reachable, 0);
queue.create (n_basic_blocks_for_fn (cfun));
FOR_EACH_BB_FN (bb, cfun)
{
if (bb == first)
{
- bitmap_clear (&need_new);
- bitmap_clear (&reachable);
queue.release ();
return false;
}
- bitmap_set_bit (&need_new, bb->index);
- bitmap_set_bit (&reachable, bb->index);
+ bitmap_set_bit (need_new, bb->index);
+ bitmap_set_bit (reachable, bb->index);
queue.quick_push (bb);
break;
}
if (queue.is_empty ())
{
- bitmap_clear (&need_new);
- bitmap_clear (&reachable);
queue.release ();
return false;
}
bb = queue.pop ();
FOR_EACH_EDGE (e, ei, bb->succs)
if (e->dest != EXIT_BLOCK_PTR_FOR_FN (cfun)
- && bitmap_set_bit (&reachable, e->dest->index))
+ && bitmap_set_bit (reachable, e->dest->index))
queue.quick_push (e->dest);
}
queue.release ();
continue;
if (DF_REG_DEF_COUNT (REGNO (dest)) > 1)
- {
- bitmap_clear (&need_new);
- bitmap_clear (&reachable);
- return false;
- }
+ return false;
for (df_ref use = DF_REG_USE_CHAIN (REGNO(dest));
use;
use = DF_REF_NEXT_REG (use))
{
int ubbi = DF_REF_BB (use)->index;
- if (bitmap_bit_p (&reachable, ubbi))
- bitmap_set_bit (&need_new, ubbi);
+ if (bitmap_bit_p (reachable, ubbi))
+ bitmap_set_bit (need_new, ubbi);
}
last_interesting_insn = insn;
}
- bitmap_clear (&reachable);
if (!last_interesting_insn)
- {
- bitmap_clear (&need_new);
- return false;
- }
+ return false;
- call_dom = nearest_common_dominator_for_set (CDI_DOMINATORS, &need_new);
- bitmap_clear (&need_new);
+ call_dom = nearest_common_dominator_for_set (CDI_DOMINATORS, need_new);
if (call_dom == first)
return false;