bitmap may_exit, bitmap has_exit)
{
unsigned i;
+ edge_iterator ei;
edge e;
struct loop *outermost_exit = loop, *aexit;
bool has_call = false;
}
}
- for (e = body[i]->succ; e; e = e->succ_next)
+ FOR_EACH_EDGE (e, ei, body[i]->succs)
{
if (flow_bb_inside_loop_p (loop, e->dest))
continue;
unsigned aregs_needed;
unsigned depno;
struct invariant *dep;
+ bitmap_iterator bi;
*comp_cost = 0;
*regs_needed = 0;
(*regs_needed)++;
(*comp_cost) += inv->cost;
- EXECUTE_IF_SET_IN_BITMAP (inv->depends_on, 0, depno,
+ EXECUTE_IF_SET_IN_BITMAP (inv->depends_on, 0, depno, bi)
{
dep = VARRAY_GENERIC_PTR_NOGC (invariants, depno);
(*regs_needed) += aregs_needed;
(*comp_cost) += acomp_cost;
- });
+ }
}
/* Calculates gain for eliminating invariant INV. REGS_USED is the number
set_move_mark (unsigned invno)
{
struct invariant *inv = VARRAY_GENERIC_PTR_NOGC (invariants, invno);
+ bitmap_iterator bi;
if (inv->move)
return;
if (dump_file)
fprintf (dump_file, "Decided to move invariant %d\n", invno);
- EXECUTE_IF_SET_IN_BITMAP (inv->depends_on, 0, invno, set_move_mark (invno));
+ EXECUTE_IF_SET_IN_BITMAP (inv->depends_on, 0, invno, bi)
+ {
+ set_move_mark (invno);
+ }
}
/* Determines which invariants to move. DF is the dataflow object. */
unsigned i, regs_used, n_inv_uses, regs_needed = 0, new_regs;
struct invariant *inv = NULL;
- if (flag_move_all_movables)
- {
- /* This is easy & stupid. */
- for (i = 0; i < VARRAY_ACTIVE_SIZE (invariants); i++)
- {
- inv = VARRAY_GENERIC_PTR_NOGC (invariants, i);
- inv->move = true;
- }
- return;
- }
-
if (!VARRAY_ACTIVE_SIZE (invariants))
return;
basic_block preheader = loop_preheader_edge (loop)->src;
rtx reg, set;
struct use *use;
+ bitmap_iterator bi;
if (inv->processed)
return;
if (inv->depends_on)
{
- EXECUTE_IF_SET_IN_BITMAP (inv->depends_on, 0, i,
+ EXECUTE_IF_SET_IN_BITMAP (inv->depends_on, 0, i, bi)
{
move_invariant_reg (loop, i, df);
- });
+ }
}
/* Move the set out of the loop. If the set is always executed (we could