Further clean-up after commit
e41ba804ba5f5ca433e09238d561b1b4c8b10985
"Use range-based for loops for traversing loops". No functional change.
gcc/
* cfgloop.c (verify_loop_structure): Reduce scope of
'class loop *loop' variable.
* ipa-fnsummary.c (analyze_function_body): Likewise.
* loop-init.c (fix_loop_structure): Likewise.
* loop-invariant.c (calculate_loop_reg_pressure): Likewise.
* predict.c (predict_loops): Likewise.
* tree-loop-distribution.c (loop_distribution::execute): Likewise.
* tree-vectorizer.c (pass_vectorize::execute): Likewise.
{
unsigned *sizes, i, j;
basic_block bb, *bbs;
- class loop *loop;
int err = 0;
edge e;
unsigned num = number_of_loops (cfun);
for (; exit; exit = exit->next_e)
eloops++;
- for (loop = bb->loop_father;
+ for (class loop *loop = bb->loop_father;
loop != e->dest->loop_father
/* When a loop exit is also an entry edge which
can happen when avoiding CFG manipulations
if (nonconstant_names.exists () && !early)
{
ipa_fn_summary *s = ipa_fn_summaries->get (node);
- class loop *loop;
unsigned max_loop_predicates = opt_for_fn (node->decl,
param_ipa_max_loop_predicates);
/* To avoid quadratic behavior we analyze stride predicates only
with respect to the containing loop. Thus we simply iterate
over all defs in the outermost loop body. */
- for (loop = loops_for_fn (cfun)->tree_root->inner;
+ for (class loop *loop = loops_for_fn (cfun)->tree_root->inner;
loop != NULL; loop = loop->next)
{
ipa_predicate loop_stride = true;
{
basic_block bb;
int record_exits = 0;
- class loop *loop;
unsigned old_nloops, i;
timevar_push (TV_LOOP_INIT);
/* Finally free deleted loops. */
bool any_deleted = false;
+ class loop *loop;
FOR_EACH_VEC_ELT (*get_loops (cfun), i, loop)
if (loop && loop->header == NULL)
{
basic_block bb;
rtx_insn *insn;
rtx link;
- class loop *loop, *parent;
+ class loop *parent;
for (auto loop : loops_list (cfun, 0))
if (loop->aux == NULL)
if (curr_loop == current_loops->tree_root)
continue;
- for (loop = curr_loop;
+ for (class loop *loop = curr_loop;
loop != current_loops->tree_root;
loop = loop_outer (loop))
bitmap_ior_into (&LOOP_DATA (loop)->regs_live, DF_LR_IN (bb));
static void
predict_loops (void)
{
- class loop *loop;
basic_block bb;
hash_set <class loop *> with_recursion(10);
&& (decl = gimple_call_fndecl (gsi_stmt (gsi))) != NULL
&& recursive_call_p (current_function_decl, decl))
{
- loop = bb->loop_father;
+ class loop *loop = bb->loop_father;
while (loop && !with_recursion.add (loop))
loop = loop_outer (loop);
}
unsigned int
loop_distribution::execute (function *fun)
{
- class loop *loop;
bool changed = false;
basic_block bb;
control_dependences *cd = NULL;
/* Destroy loop bodies that could not be reused. Do this late as we
otherwise can end up refering to stale data in control dependences. */
unsigned i;
+ class loop *loop;
FOR_EACH_VEC_ELT (loops_to_be_destroyed, i, loop)
destroy_loop (loop);
unsigned int i;
unsigned int num_vectorized_loops = 0;
unsigned int vect_loops_num;
- class loop *loop;
hash_table<simduid_to_vf> *simduid_to_vf_htab = NULL;
hash_table<simd_array_to_simduid> *simd_array_to_simduid_htab = NULL;
bool any_ifcvt_loops = false;
if (any_ifcvt_loops)
for (i = 1; i < number_of_loops (fun); i++)
{
- loop = get_loop (fun, i);
+ class loop *loop = get_loop (fun, i);
if (loop && loop->dont_vectorize)
{
gimple *g = vect_loop_vectorized_call (loop);
loop_vec_info loop_vinfo;
bool has_mask_store;
- loop = get_loop (fun, i);
+ class loop *loop = get_loop (fun, i);
if (!loop || !loop->aux)
continue;
loop_vinfo = (loop_vec_info) loop->aux;