cfgloop.h (struct loop_iterator): C++-ify, add constructor and destructor and make fel_next a member function.

2013-11-19  Richard Biener  <rguenther@suse.de>

	* cfgloop.h (struct loop_iterator): C++-ify, add constructor
	and destructor and make fel_next a member function.
	(fel_next): Transform into ...
	(loop_iterator::next): ... this.
	(fel_init): Transform into ...
	(loop_iterator::loop_iterator): ... this.
	(loop_iterator::~loop_iterator): New.
	(FOR_EACH_LOOP): Remove loop-iterator argument.
	(FOR_EACH_LOOP_BREAK): Remove no longer necessary macro.
	* cfgloop.c, cfgloopmanip.c, config/mn10300/mn10300.c,
	graphite-clast-to-gimple.c, graphite-scop-detection.c,
	graphite-sese-to-poly.c, ipa-inline-analysis.c, ipa-pure-const.c,
	loop-init.c, loop-invariant.c, loop-unroll.c, loop-unswitch.c,
	modulo-sched.c, predict.c, sel-sched-ir.c, tree-cfg.c, tree-data-ref.c,
	tree-if-conv.c, tree-loop-distribution.c, tree-parloops.c,
	tree-predcom.c, tree-scalar-evolution.c, tree-ssa-dce.c,
	tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c,
	tree-ssa-loop-ivopts.c, tree-ssa-loop-manip.c, tree-ssa-loop-niter.c,
	tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c,
	tree-ssa-threadupdate.c, tree-vectorizer.c, tree-vrp.c: Adjust
	uses of FOR_EACH_LOOP and remove loop_iterator variables.  Replace
	FOR_EACH_LOOP_BREAK with break.

From-SVN: r205032
This commit is contained in:
Richard Biener 2013-11-19 15:19:09 +00:00 committed by Richard Biener
parent 92495ff691
commit f0bd40b1a7
36 changed files with 121 additions and 142 deletions

View file

@ -1,3 +1,28 @@
2013-11-19 Richard Biener <rguenther@suse.de>
* cfgloop.h (struct loop_iterator): C++-ify, add constructor
and destructor and make fel_next a member function.
(fel_next): Transform into ...
(loop_iterator::next): ... this.
(fel_init): Transform into ...
(loop_iterator::loop_iterator): ... this.
(loop_iterator::~loop_iterator): New.
(FOR_EACH_LOOP): Remove loop-iterator argument.
(FOR_EACH_LOOP_BREAK): Remove no longer necessary macro.
* cfgloop.c, cfgloopmanip.c, config/mn10300/mn10300.c,
graphite-clast-to-gimple.c, graphite-scop-detection.c,
graphite-sese-to-poly.c, ipa-inline-analysis.c, ipa-pure-const.c,
loop-init.c, loop-invariant.c, loop-unroll.c, loop-unswitch.c,
modulo-sched.c, predict.c, sel-sched-ir.c, tree-cfg.c, tree-data-ref.c,
tree-if-conv.c, tree-loop-distribution.c, tree-parloops.c,
tree-predcom.c, tree-scalar-evolution.c, tree-ssa-dce.c,
tree-ssa-loop-ch.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c,
tree-ssa-loop-ivopts.c, tree-ssa-loop-manip.c, tree-ssa-loop-niter.c,
tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c,
tree-ssa-threadupdate.c, tree-vectorizer.c, tree-vrp.c: Adjust
uses of FOR_EACH_LOOP and remove loop_iterator variables. Replace
FOR_EACH_LOOP_BREAK with break.
2013-11-19 Richard Biener <rguenther@suse.de> 2013-11-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/59164 PR tree-optimization/59164

View file

@ -156,7 +156,6 @@ flow_loop_dump (const struct loop *loop, FILE *file,
void void
flow_loops_dump (FILE *file, void (*loop_dump_aux) (const struct loop *, FILE *, int), int verbose) flow_loops_dump (FILE *file, void (*loop_dump_aux) (const struct loop *, FILE *, int), int verbose)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
if (!current_loops || ! file) if (!current_loops || ! file)
@ -164,7 +163,7 @@ flow_loops_dump (FILE *file, void (*loop_dump_aux) (const struct loop *, FILE *,
fprintf (file, ";; %d loops found\n", number_of_loops (cfun)); fprintf (file, ";; %d loops found\n", number_of_loops (cfun));
FOR_EACH_LOOP (li, loop, LI_INCLUDE_ROOT) FOR_EACH_LOOP (loop, LI_INCLUDE_ROOT)
{ {
flow_loop_dump (loop, file, loop_dump_aux, verbose); flow_loop_dump (loop, file, loop_dump_aux, verbose);
} }
@ -767,10 +766,9 @@ disambiguate_multiple_latches (struct loop *loop)
void void
disambiguate_loops_with_multiple_latches (void) disambiguate_loops_with_multiple_latches (void)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
if (!loop->latch) if (!loop->latch)
disambiguate_multiple_latches (loop); disambiguate_multiple_latches (loop);
@ -1327,7 +1325,6 @@ verify_loop_structure (void)
int err = 0; int err = 0;
edge e; edge e;
unsigned num = number_of_loops (cfun); unsigned num = number_of_loops (cfun);
loop_iterator li;
struct loop_exit *exit, *mexit; struct loop_exit *exit, *mexit;
bool dom_available = dom_info_available_p (CDI_DOMINATORS); bool dom_available = dom_info_available_p (CDI_DOMINATORS);
sbitmap visited; sbitmap visited;
@ -1369,7 +1366,7 @@ verify_loop_structure (void)
visited = sbitmap_alloc (last_basic_block); visited = sbitmap_alloc (last_basic_block);
bitmap_clear (visited); bitmap_clear (visited);
bbs = XNEWVEC (basic_block, n_basic_blocks_for_fn (cfun)); bbs = XNEWVEC (basic_block, n_basic_blocks_for_fn (cfun));
FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST) FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
{ {
unsigned n; unsigned n;
@ -1416,7 +1413,7 @@ verify_loop_structure (void)
sbitmap_free (visited); sbitmap_free (visited);
/* Check headers and latches. */ /* Check headers and latches. */
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
i = loop->num; i = loop->num;
if (loop->header == NULL) if (loop->header == NULL)
@ -1536,7 +1533,7 @@ verify_loop_structure (void)
} }
/* Check the recorded loop exits. */ /* Check the recorded loop exits. */
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
if (!loop->exits || loop->exits->e != NULL) if (!loop->exits || loop->exits->e != NULL)
{ {
@ -1630,7 +1627,7 @@ verify_loop_structure (void)
err = 1; err = 1;
} }
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
eloops = 0; eloops = 0;
for (exit = loop->exits->next; exit->e; exit = exit->next) for (exit = loop->exits->next; exit->e; exit = exit->next)

View file

@ -542,48 +542,52 @@ enum li_flags
/* The iterator for loops. */ /* The iterator for loops. */
typedef struct struct loop_iterator
{ {
loop_iterator (loop_p *loop, unsigned flags);
~loop_iterator ();
inline loop_p next ();
/* The list of loops to visit. */ /* The list of loops to visit. */
vec<int> to_visit; vec<int> to_visit;
/* The index of the actual loop. */ /* The index of the actual loop. */
unsigned idx; unsigned idx;
} loop_iterator; };
static inline void inline loop_p
fel_next (loop_iterator *li, loop_p *loop) loop_iterator::next ()
{ {
int anum; int anum;
while (li->to_visit.iterate (li->idx, &anum)) while (this->to_visit.iterate (this->idx, &anum))
{ {
li->idx++; this->idx++;
*loop = get_loop (cfun, anum); loop_p loop = get_loop (cfun, anum);
if (*loop) if (loop)
return; return loop;
} }
li->to_visit.release (); return NULL;
*loop = NULL;
} }
static inline void inline
fel_init (loop_iterator *li, loop_p *loop, unsigned flags) loop_iterator::loop_iterator (loop_p *loop, unsigned flags)
{ {
struct loop *aloop; struct loop *aloop;
unsigned i; unsigned i;
int mn; int mn;
li->idx = 0; this->idx = 0;
if (!current_loops) if (!current_loops)
{ {
li->to_visit.create (0); this->to_visit.create (0);
*loop = NULL; *loop = NULL;
return; return;
} }
li->to_visit.create (number_of_loops (cfun)); this->to_visit.create (number_of_loops (cfun));
mn = (flags & LI_INCLUDE_ROOT) ? 0 : 1; mn = (flags & LI_INCLUDE_ROOT) ? 0 : 1;
if (flags & LI_ONLY_INNERMOST) if (flags & LI_ONLY_INNERMOST)
@ -592,7 +596,7 @@ fel_init (loop_iterator *li, loop_p *loop, unsigned flags)
if (aloop != NULL if (aloop != NULL
&& aloop->inner == NULL && aloop->inner == NULL
&& aloop->num >= mn) && aloop->num >= mn)
li->to_visit.quick_push (aloop->num); this->to_visit.quick_push (aloop->num);
} }
else if (flags & LI_FROM_INNERMOST) else if (flags & LI_FROM_INNERMOST)
{ {
@ -605,7 +609,7 @@ fel_init (loop_iterator *li, loop_p *loop, unsigned flags)
while (1) while (1)
{ {
if (aloop->num >= mn) if (aloop->num >= mn)
li->to_visit.quick_push (aloop->num); this->to_visit.quick_push (aloop->num);
if (aloop->next) if (aloop->next)
{ {
@ -627,7 +631,7 @@ fel_init (loop_iterator *li, loop_p *loop, unsigned flags)
while (1) while (1)
{ {
if (aloop->num >= mn) if (aloop->num >= mn)
li->to_visit.quick_push (aloop->num); this->to_visit.quick_push (aloop->num);
if (aloop->inner != NULL) if (aloop->inner != NULL)
aloop = aloop->inner; aloop = aloop->inner;
@ -642,19 +646,19 @@ fel_init (loop_iterator *li, loop_p *loop, unsigned flags)
} }
} }
fel_next (li, loop); *loop = this->next ();
} }
#define FOR_EACH_LOOP(LI, LOOP, FLAGS) \ inline
for (fel_init (&(LI), &(LOOP), FLAGS); \ loop_iterator::~loop_iterator ()
{
this->to_visit.release ();
}
#define FOR_EACH_LOOP(LOOP, FLAGS) \
for (loop_iterator li(&(LOOP), FLAGS); \
(LOOP); \ (LOOP); \
fel_next (&(LI), &(LOOP))) (LOOP) = li.next ())
#define FOR_EACH_LOOP_BREAK(LI) \
{ \
(LI).to_visit.release (); \
break; \
}
/* The properties of the target. */ /* The properties of the target. */
struct target_cfgloop { struct target_cfgloop {

View file

@ -1585,13 +1585,12 @@ create_preheader (struct loop *loop, int flags)
void void
create_preheaders (int flags) create_preheaders (int flags)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
if (!current_loops) if (!current_loops)
return; return;
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
create_preheader (loop, flags); create_preheader (loop, flags);
loops_state_set (LOOPS_HAVE_PREHEADERS); loops_state_set (LOOPS_HAVE_PREHEADERS);
} }
@ -1601,11 +1600,10 @@ create_preheaders (int flags)
void void
force_single_succ_latches (void) force_single_succ_latches (void)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
edge e; edge e;
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
if (loop->latch != loop->header && single_succ_p (loop->latch)) if (loop->latch != loop->header && single_succ_p (loop->latch))
continue; continue;

View file

@ -3229,7 +3229,6 @@ mn10300_loop_contains_call_insn (loop_p loop)
static void static void
mn10300_scan_for_setlb_lcc (void) mn10300_scan_for_setlb_lcc (void)
{ {
loop_iterator liter;
loop_p loop; loop_p loop;
DUMP ("Looking for loops that can use the SETLB insn", NULL_RTX); DUMP ("Looking for loops that can use the SETLB insn", NULL_RTX);
@ -3244,7 +3243,7 @@ mn10300_scan_for_setlb_lcc (void)
if an inner loop is not suitable for use with the SETLB/Lcc insns, it may if an inner loop is not suitable for use with the SETLB/Lcc insns, it may
be the case that its parent loop is suitable. Thus we should check all be the case that its parent loop is suitable. Thus we should check all
loops, but work from the innermost outwards. */ loops, but work from the innermost outwards. */
FOR_EACH_LOOP (liter, loop, LI_ONLY_INNERMOST) FOR_EACH_LOOP (loop, LI_ONLY_INNERMOST)
{ {
const char * reason = NULL; const char * reason = NULL;

View file

@ -1718,10 +1718,9 @@ gloog (scop_p scop, bb_pbb_htab_type bb_pbb_mapping)
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
{ {
loop_p loop; loop_p loop;
loop_iterator li;
int num_no_dependency = 0; int num_no_dependency = 0;
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
if (loop->can_be_parallel) if (loop->can_be_parallel)
num_no_dependency++; num_no_dependency++;

View file

@ -1375,14 +1375,13 @@ canonicalize_loop_closed_ssa (loop_p loop)
static void static void
canonicalize_loop_closed_ssa_form (void) canonicalize_loop_closed_ssa_form (void)
{ {
loop_iterator li;
loop_p loop; loop_p loop;
#ifdef ENABLE_CHECKING #ifdef ENABLE_CHECKING
verify_loop_closed_ssa (true); verify_loop_closed_ssa (true);
#endif #endif
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
canonicalize_loop_closed_ssa (loop); canonicalize_loop_closed_ssa (loop);
rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa); rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa);

View file

@ -56,6 +56,7 @@ along with GCC; see the file COPYING3. If not see
#include "domwalk.h" #include "domwalk.h"
#include "sese.h" #include "sese.h"
#include "tree-ssa-propagate.h" #include "tree-ssa-propagate.h"
#include "expr.h"
#ifdef HAVE_cloog #ifdef HAVE_cloog
#include "expr.h" #include "expr.h"
@ -3064,12 +3065,11 @@ rewrite_commutative_reductions_out_of_ssa_loop (scop_p scop,
static void static void
rewrite_commutative_reductions_out_of_ssa (scop_p scop) rewrite_commutative_reductions_out_of_ssa (scop_p scop)
{ {
loop_iterator li;
loop_p loop; loop_p loop;
bool changed = false; bool changed = false;
sese region = SCOP_REGION (scop); sese region = SCOP_REGION (scop);
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
if (loop_in_sese_p (loop, region)) if (loop_in_sese_p (loop, region))
changed |= rewrite_commutative_reductions_out_of_ssa_loop (scop, loop); changed |= rewrite_commutative_reductions_out_of_ssa_loop (scop, loop);
@ -3091,12 +3091,11 @@ rewrite_commutative_reductions_out_of_ssa (scop_p scop)
static bool static bool
scop_ivs_can_be_represented (scop_p scop) scop_ivs_can_be_represented (scop_p scop)
{ {
loop_iterator li;
loop_p loop; loop_p loop;
gimple_stmt_iterator psi; gimple_stmt_iterator psi;
bool result = true; bool result = true;
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
if (!loop_in_sese_p (loop, SCOP_REGION (scop))) if (!loop_in_sese_p (loop, SCOP_REGION (scop)))
continue; continue;
@ -3116,7 +3115,7 @@ scop_ivs_can_be_represented (scop_p scop)
} }
} }
if (!result) if (!result)
FOR_EACH_LOOP_BREAK (li); break;
} }
return result; return result;

View file

@ -2601,14 +2601,13 @@ estimate_function_body_sizes (struct cgraph_node *node, bool early)
if (!early && nonconstant_names.exists ()) if (!early && nonconstant_names.exists ())
{ {
struct loop *loop; struct loop *loop;
loop_iterator li;
predicate loop_iterations = true_predicate (); predicate loop_iterations = true_predicate ();
predicate loop_stride = true_predicate (); predicate loop_stride = true_predicate ();
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
flow_loops_dump (dump_file, NULL, 0); flow_loops_dump (dump_file, NULL, 0);
scev_initialize (); scev_initialize ();
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
vec<edge> exits; vec<edge> exits;
edge ex; edge ex;

View file

@ -791,17 +791,16 @@ end:
} }
else else
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
scev_initialize (); scev_initialize ();
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
if (!finite_loop_p (loop)) if (!finite_loop_p (loop))
{ {
if (dump_file) if (dump_file)
fprintf (dump_file, " can not prove finiteness of " fprintf (dump_file, " can not prove finiteness of "
"loop %i\n", loop->num); "loop %i\n", loop->num);
l->looping =true; l->looping =true;
FOR_EACH_LOOP_BREAK (li); break;
} }
scev_finalize (); scev_finalize ();
} }

View file

@ -135,7 +135,6 @@ loop_optimizer_init (unsigned flags)
void void
loop_optimizer_finalize (void) loop_optimizer_finalize (void)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
basic_block bb; basic_block bb;
@ -162,10 +161,8 @@ loop_optimizer_finalize (void)
gcc_assert (current_loops != NULL); gcc_assert (current_loops != NULL);
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{
free_simple_loop_desc (loop); free_simple_loop_desc (loop);
}
/* Clean up. */ /* Clean up. */
flow_loops_free (current_loops); flow_loops_free (current_loops);
@ -199,7 +196,6 @@ fix_loop_structure (bitmap changed_bbs)
{ {
basic_block bb; basic_block bb;
int record_exits = 0; int record_exits = 0;
loop_iterator li;
struct loop *loop; struct loop *loop;
unsigned old_nloops, i; unsigned old_nloops, i;
@ -224,7 +220,7 @@ fix_loop_structure (bitmap changed_bbs)
loops, so that when we remove the loops, we know that the loops inside loops, so that when we remove the loops, we know that the loops inside
are preserved, and do not waste time relinking loops that will be are preserved, and do not waste time relinking loops that will be
removed later. */ removed later. */
FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST) FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
{ {
/* Detect the case that the loop is no longer present even though /* Detect the case that the loop is no longer present even though
it wasn't marked for removal. it wasn't marked for removal.

View file

@ -1815,9 +1815,8 @@ calculate_loop_reg_pressure (void)
basic_block bb; basic_block bb;
rtx insn, link; rtx insn, link;
struct loop *loop, *parent; struct loop *loop, *parent;
loop_iterator li;
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
if (loop->aux == NULL) if (loop->aux == NULL)
{ {
loop->aux = xcalloc (1, sizeof (struct loop_data)); loop->aux = xcalloc (1, sizeof (struct loop_data));
@ -1884,7 +1883,7 @@ calculate_loop_reg_pressure (void)
bitmap_clear (&curr_regs_live); bitmap_clear (&curr_regs_live);
if (flag_ira_region == IRA_REGION_MIXED if (flag_ira_region == IRA_REGION_MIXED
|| flag_ira_region == IRA_REGION_ALL) || flag_ira_region == IRA_REGION_ALL)
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
EXECUTE_IF_SET_IN_BITMAP (&LOOP_DATA (loop)->regs_live, 0, j, bi) EXECUTE_IF_SET_IN_BITMAP (&LOOP_DATA (loop)->regs_live, 0, j, bi)
if (! bitmap_bit_p (&LOOP_DATA (loop)->regs_ref, j)) if (! bitmap_bit_p (&LOOP_DATA (loop)->regs_ref, j))
@ -1898,7 +1897,7 @@ calculate_loop_reg_pressure (void)
} }
if (dump_file == NULL) if (dump_file == NULL)
return; return;
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
parent = loop_outer (loop); parent = loop_outer (loop);
fprintf (dump_file, "\n Loop %d (parent %d, header bb%d, depth %d)\n", fprintf (dump_file, "\n Loop %d (parent %d, header bb%d, depth %d)\n",
@ -1933,7 +1932,6 @@ void
move_loop_invariants (void) move_loop_invariants (void)
{ {
struct loop *loop; struct loop *loop;
loop_iterator li;
if (flag_ira_loop_pressure) if (flag_ira_loop_pressure)
{ {
@ -1945,7 +1943,7 @@ move_loop_invariants (void)
} }
df_set_flags (DF_EQ_NOTES + DF_DEFER_INSN_RESCAN); df_set_flags (DF_EQ_NOTES + DF_DEFER_INSN_RESCAN);
/* Process the loops, innermost first. */ /* Process the loops, innermost first. */
FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST) FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
{ {
curr_loop = loop; curr_loop = loop;
/* move_single_loop_invariants for very large loops /* move_single_loop_invariants for very large loops
@ -1954,7 +1952,7 @@ move_loop_invariants (void)
move_single_loop_invariants (loop); move_single_loop_invariants (loop);
} }
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
free_loop_data (loop); free_loop_data (loop);
} }

View file

@ -269,7 +269,6 @@ unroll_and_peel_loops (int flags)
{ {
struct loop *loop; struct loop *loop;
bool changed = false; bool changed = false;
loop_iterator li;
/* First perform complete loop peeling (it is almost surely a win, /* First perform complete loop peeling (it is almost surely a win,
and affects parameters for further decision a lot). */ and affects parameters for further decision a lot). */
@ -279,7 +278,7 @@ unroll_and_peel_loops (int flags)
decide_unrolling_and_peeling (flags); decide_unrolling_and_peeling (flags);
/* Scan the loops, inner ones first. */ /* Scan the loops, inner ones first. */
FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST) FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
{ {
/* And perform the appropriate transformations. */ /* And perform the appropriate transformations. */
switch (loop->lpt_decision.decision) switch (loop->lpt_decision.decision)
@ -345,11 +344,10 @@ static void
peel_loops_completely (int flags) peel_loops_completely (int flags)
{ {
struct loop *loop; struct loop *loop;
loop_iterator li;
bool changed = false; bool changed = false;
/* Scan the loops, the inner ones first. */ /* Scan the loops, the inner ones first. */
FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST) FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
{ {
loop->lpt_decision.decision = LPT_NONE; loop->lpt_decision.decision = LPT_NONE;
location_t locus = get_loop_location (loop); location_t locus = get_loop_location (loop);
@ -386,10 +384,9 @@ static void
decide_unrolling_and_peeling (int flags) decide_unrolling_and_peeling (int flags)
{ {
struct loop *loop; struct loop *loop;
loop_iterator li;
/* Scan the loops, inner ones first. */ /* Scan the loops, inner ones first. */
FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST) FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
{ {
loop->lpt_decision.decision = LPT_NONE; loop->lpt_decision.decision = LPT_NONE;
location_t locus = get_loop_location (loop); location_t locus = get_loop_location (loop);

View file

@ -138,13 +138,12 @@ compare_and_jump_seq (rtx op0, rtx op1, enum rtx_code comp, rtx label, int prob,
void void
unswitch_loops (void) unswitch_loops (void)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
bool changed = false; bool changed = false;
/* Go through inner loops (only original ones). */ /* Go through inner loops (only original ones). */
FOR_EACH_LOOP (li, loop, LI_ONLY_INNERMOST) FOR_EACH_LOOP (loop, LI_ONLY_INNERMOST)
changed |= unswitch_single_loop (loop, NULL_RTX, 0); changed |= unswitch_single_loop (loop, NULL_RTX, 0);
iv_analysis_done (); iv_analysis_done ();

View file

@ -1351,7 +1351,6 @@ sms_schedule (void)
ddg_ptr *g_arr, g; ddg_ptr *g_arr, g;
int * node_order; int * node_order;
int maxii, max_asap; int maxii, max_asap;
loop_iterator li;
partial_schedule_ptr ps; partial_schedule_ptr ps;
basic_block bb = NULL; basic_block bb = NULL;
struct loop *loop; struct loop *loop;
@ -1395,7 +1394,7 @@ sms_schedule (void)
/* Build DDGs for all the relevant loops and hold them in G_ARR /* Build DDGs for all the relevant loops and hold them in G_ARR
indexed by the loop index. */ indexed by the loop index. */
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
rtx head, tail; rtx head, tail;
rtx count_reg; rtx count_reg;
@ -1406,7 +1405,7 @@ sms_schedule (void)
if (dump_file) if (dump_file)
fprintf (dump_file, "SMS reached max limit... \n"); fprintf (dump_file, "SMS reached max limit... \n");
FOR_EACH_LOOP_BREAK (li); break;
} }
if (dump_file) if (dump_file)
@ -1533,7 +1532,7 @@ sms_schedule (void)
} }
/* We don't want to perform SMS on new loops - created by versioning. */ /* We don't want to perform SMS on new loops - created by versioning. */
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
rtx head, tail; rtx head, tail;
rtx count_reg, count_init; rtx count_reg, count_init;

View file

@ -1514,12 +1514,11 @@ predict_extra_loop_exits (edge exit_edge)
static void static void
predict_loops (void) predict_loops (void)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
/* Try to predict out blocks in a loop that are not part of a /* Try to predict out blocks in a loop that are not part of a
natural loop. */ natural loop. */
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
basic_block bb, *bbs; basic_block bb, *bbs;
unsigned j, n_exits; unsigned j, n_exits;

View file

@ -6201,11 +6201,10 @@ make_regions_from_the_rest (void)
/* Free data structures used in pipelining of loops. */ /* Free data structures used in pipelining of loops. */
void sel_finish_pipelining (void) void sel_finish_pipelining (void)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
/* Release aux fields so we don't free them later by mistake. */ /* Release aux fields so we don't free them later by mistake. */
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
loop->aux = NULL; loop->aux = NULL;
loop_optimizer_finalize (); loop_optimizer_finalize ();
@ -6227,9 +6226,8 @@ sel_find_rgns (void)
if (current_loops) if (current_loops)
{ {
loop_p loop; loop_p loop;
loop_iterator li;
FOR_EACH_LOOP (li, loop, (flag_sel_sched_pipelining_outer_loops FOR_EACH_LOOP (loop, (flag_sel_sched_pipelining_outer_loops
? LI_FROM_INNERMOST ? LI_FROM_INNERMOST
: LI_ONLY_INNERMOST)) : LI_ONLY_INNERMOST))
make_regions_from_loop_nest (loop); make_regions_from_loop_nest (loop);

View file

@ -267,12 +267,11 @@ static void
replace_loop_annotate () replace_loop_annotate ()
{ {
struct loop *loop; struct loop *loop;
loop_iterator li;
basic_block bb; basic_block bb;
gimple_stmt_iterator gsi; gimple_stmt_iterator gsi;
gimple stmt; gimple stmt;
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
gsi = gsi_last_bb (loop->header); gsi = gsi_last_bb (loop->header);
stmt = gsi_stmt (gsi); stmt = gsi_stmt (gsi);
@ -1640,9 +1639,8 @@ replace_uses_by (tree name, tree val)
if (current_loops) if (current_loops)
{ {
struct loop *loop; struct loop *loop;
loop_iterator li;
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
substitute_in_loop_info (loop, name, val); substitute_in_loop_info (loop, name, val);
} }

View file

@ -4745,10 +4745,9 @@ analyze_all_data_dependences (struct loop *loop)
void void
tree_check_data_deps (void) tree_check_data_deps (void)
{ {
loop_iterator li;
struct loop *loop_nest; struct loop *loop_nest;
FOR_EACH_LOOP (li, loop_nest, 0) FOR_EACH_LOOP (loop_nest, 0)
analyze_all_data_dependences (loop_nest); analyze_all_data_dependences (loop_nest);
} }

View file

@ -1788,7 +1788,6 @@ tree_if_conversion (struct loop *loop)
static unsigned int static unsigned int
main_tree_if_conversion (void) main_tree_if_conversion (void)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
bool changed = false; bool changed = false;
unsigned todo = 0; unsigned todo = 0;
@ -1796,7 +1795,7 @@ main_tree_if_conversion (void)
if (number_of_loops (cfun) <= 1) if (number_of_loops (cfun) <= 1)
return 0; return 0;
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
if (flag_tree_loop_if_convert == 1 if (flag_tree_loop_if_convert == 1
|| flag_tree_loop_if_convert_stores == 1 || flag_tree_loop_if_convert_stores == 1
|| flag_tree_loop_vectorize || flag_tree_loop_vectorize

View file

@ -1661,7 +1661,6 @@ static unsigned int
tree_loop_distribution (void) tree_loop_distribution (void)
{ {
struct loop *loop; struct loop *loop;
loop_iterator li;
bool changed = false; bool changed = false;
basic_block bb; basic_block bb;
control_dependences *cd = NULL; control_dependences *cd = NULL;
@ -1677,7 +1676,7 @@ tree_loop_distribution (void)
/* We can at the moment only distribute non-nested loops, thus restrict /* We can at the moment only distribute non-nested loops, thus restrict
walking to innermost loops. */ walking to innermost loops. */
FOR_EACH_LOOP (li, loop, LI_ONLY_INNERMOST) FOR_EACH_LOOP (loop, LI_ONLY_INNERMOST)
{ {
vec<gimple> work_list = vNULL; vec<gimple> work_list = vNULL;
basic_block *bbs; basic_block *bbs;

View file

@ -1747,7 +1747,6 @@ static void
gen_parallel_loop (struct loop *loop, reduction_info_table_type reduction_list, gen_parallel_loop (struct loop *loop, reduction_info_table_type reduction_list,
unsigned n_threads, struct tree_niter_desc *niter) unsigned n_threads, struct tree_niter_desc *niter)
{ {
loop_iterator li;
tree many_iterations_cond, type, nit; tree many_iterations_cond, type, nit;
tree arg_struct, new_arg_struct; tree arg_struct, new_arg_struct;
gimple_seq stmts; gimple_seq stmts;
@ -1902,7 +1901,7 @@ gen_parallel_loop (struct loop *loop, reduction_info_table_type reduction_list,
/* Free loop bound estimations that could contain references to /* Free loop bound estimations that could contain references to
removed statements. */ removed statements. */
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
free_numbers_of_iterations_estimates_loop (loop); free_numbers_of_iterations_estimates_loop (loop);
/* Expand the parallel constructs. We do it directly here instead of running /* Expand the parallel constructs. We do it directly here instead of running
@ -2143,7 +2142,6 @@ parallelize_loops (void)
bool changed = false; bool changed = false;
struct loop *loop; struct loop *loop;
struct tree_niter_desc niter_desc; struct tree_niter_desc niter_desc;
loop_iterator li;
reduction_info_table_type reduction_list; reduction_info_table_type reduction_list;
struct obstack parloop_obstack; struct obstack parloop_obstack;
HOST_WIDE_INT estimated; HOST_WIDE_INT estimated;
@ -2159,7 +2157,7 @@ parallelize_loops (void)
reduction_list.create (10); reduction_list.create (10);
init_stmt_vec_info_vec (); init_stmt_vec_info_vec ();
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
reduction_list.empty (); reduction_list.empty ();
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))

View file

@ -2511,11 +2511,10 @@ tree_predictive_commoning (void)
{ {
bool unrolled = false; bool unrolled = false;
struct loop *loop; struct loop *loop;
loop_iterator li;
unsigned ret = 0; unsigned ret = 0;
initialize_original_copy_tables (); initialize_original_copy_tables ();
FOR_EACH_LOOP (li, loop, LI_ONLY_INNERMOST) FOR_EACH_LOOP (loop, LI_ONLY_INNERMOST)
if (optimize_loop_for_speed_p (loop)) if (optimize_loop_for_speed_p (loop))
{ {
unrolled |= tree_predictive_commoning_loop (loop); unrolled |= tree_predictive_commoning_loop (loop);

View file

@ -3103,16 +3103,14 @@ initialize_scalar_evolutions_analyzer (void)
void void
scev_initialize (void) scev_initialize (void)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
scalar_evolution_info = htab_create_ggc (100, hash_scev_info, eq_scev_info, scalar_evolution_info = htab_create_ggc (100, hash_scev_info, eq_scev_info,
del_scev_info); del_scev_info);
initialize_scalar_evolutions_analyzer (); initialize_scalar_evolutions_analyzer ();
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
loop->nb_iterations = NULL_TREE; loop->nb_iterations = NULL_TREE;
} }
@ -3144,7 +3142,6 @@ scev_reset_htab (void)
void void
scev_reset (void) scev_reset (void)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
scev_reset_htab (); scev_reset_htab ();
@ -3152,7 +3149,7 @@ scev_reset (void)
if (!current_loops) if (!current_loops)
return; return;
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
loop->nb_iterations = NULL_TREE; loop->nb_iterations = NULL_TREE;
} }
@ -3298,7 +3295,6 @@ scev_const_prop (void)
struct loop *loop, *ex_loop; struct loop *loop, *ex_loop;
bitmap ssa_names_to_remove = NULL; bitmap ssa_names_to_remove = NULL;
unsigned i; unsigned i;
loop_iterator li;
gimple_stmt_iterator psi; gimple_stmt_iterator psi;
if (number_of_loops (cfun) <= 1) if (number_of_loops (cfun) <= 1)
@ -3360,7 +3356,7 @@ scev_const_prop (void)
} }
/* Now the regular final value replacement. */ /* Now the regular final value replacement. */
FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST) FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
{ {
edge exit; edge exit;
tree def, rslt, niter; tree def, rslt, niter;

View file

@ -396,7 +396,6 @@ find_obviously_necessary_stmts (bool aggressive)
/* Prevent the empty possibly infinite loops from being removed. */ /* Prevent the empty possibly infinite loops from being removed. */
if (aggressive) if (aggressive)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
scev_initialize (); scev_initialize ();
if (mark_irreducible_loops ()) if (mark_irreducible_loops ())
@ -414,7 +413,7 @@ find_obviously_necessary_stmts (bool aggressive)
} }
} }
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
if (!finite_loop_p (loop)) if (!finite_loop_p (loop))
{ {
if (dump_file) if (dump_file)

View file

@ -130,7 +130,6 @@ do_while_loop_p (struct loop *loop)
static unsigned int static unsigned int
copy_loop_headers (void) copy_loop_headers (void)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
basic_block header; basic_block header;
edge exit, entry; edge exit, entry;
@ -150,7 +149,7 @@ copy_loop_headers (void)
copied_bbs = XNEWVEC (basic_block, n_basic_blocks_for_fn (cfun)); copied_bbs = XNEWVEC (basic_block, n_basic_blocks_for_fn (cfun));
bbs_size = n_basic_blocks_for_fn (cfun); bbs_size = n_basic_blocks_for_fn (cfun);
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
/* Copy at most 20 insns. */ /* Copy at most 20 insns. */
int limit = 20; int limit = 20;

View file

@ -1584,14 +1584,13 @@ analyze_memory_references (void)
gimple_stmt_iterator bsi; gimple_stmt_iterator bsi;
basic_block bb, *bbs; basic_block bb, *bbs;
struct loop *loop, *outer; struct loop *loop, *outer;
loop_iterator li;
unsigned i, n; unsigned i, n;
/* Initialize bb_loop_postorder with a mapping from loop->num to /* Initialize bb_loop_postorder with a mapping from loop->num to
its postorder index. */ its postorder index. */
i = 0; i = 0;
bb_loop_postorder = XNEWVEC (unsigned, number_of_loops (cfun)); bb_loop_postorder = XNEWVEC (unsigned, number_of_loops (cfun));
FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST) FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
bb_loop_postorder[loop->num] = i++; bb_loop_postorder[loop->num] = i++;
/* Collect all basic-blocks in loops and sort them after their /* Collect all basic-blocks in loops and sort them after their
loops postorder. */ loops postorder. */
@ -1617,7 +1616,7 @@ analyze_memory_references (void)
/* Propagate the information about accessed memory references up /* Propagate the information about accessed memory references up
the loop hierarchy. */ the loop hierarchy. */
FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST) FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
{ {
/* Finalize the overall touched references (including subloops). */ /* Finalize the overall touched references (including subloops). */
bitmap_ior_into (&memory_accesses.all_refs_stored_in_loop[loop->num], bitmap_ior_into (&memory_accesses.all_refs_stored_in_loop[loop->num],

View file

@ -983,7 +983,6 @@ canonicalize_loop_induction_variables (struct loop *loop,
unsigned int unsigned int
canonicalize_induction_variables (void) canonicalize_induction_variables (void)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
bool changed = false; bool changed = false;
bool irred_invalidated = false; bool irred_invalidated = false;
@ -992,7 +991,7 @@ canonicalize_induction_variables (void)
free_numbers_of_iterations_estimates (); free_numbers_of_iterations_estimates ();
estimate_numbers_of_iterations (); estimate_numbers_of_iterations ();
FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST) FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
{ {
changed |= canonicalize_loop_induction_variables (loop, changed |= canonicalize_loop_induction_variables (loop,
true, UL_SINGLE_ITER, true, UL_SINGLE_ITER,

View file

@ -6875,12 +6875,11 @@ tree_ssa_iv_optimize (void)
{ {
struct loop *loop; struct loop *loop;
struct ivopts_data data; struct ivopts_data data;
loop_iterator li;
tree_ssa_iv_optimize_init (&data); tree_ssa_iv_optimize_init (&data);
/* Optimize the loops starting with the innermost ones. */ /* Optimize the loops starting with the innermost ones. */
FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST) FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
{ {
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
flow_loop_dump (loop, dump_file, NULL, 1); flow_loop_dump (loop, dump_file, NULL, 1);

View file

@ -350,12 +350,11 @@ add_exit_phis (bitmap names_to_rename, bitmap *use_blocks, bitmap *loop_exits)
static void static void
get_loops_exits (bitmap *loop_exits) get_loops_exits (bitmap *loop_exits)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
unsigned j; unsigned j;
edge e; edge e;
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
vec<edge> exit_edges = get_loop_exit_edges (loop); vec<edge> exit_edges = get_loop_exit_edges (loop);
loop_exits[loop->num] = BITMAP_ALLOC (&loop_renamer_obstack); loop_exits[loop->num] = BITMAP_ALLOC (&loop_renamer_obstack);

View file

@ -3586,14 +3586,13 @@ estimated_stmt_executions (struct loop *loop, double_int *nit)
void void
estimate_numbers_of_iterations (void) estimate_numbers_of_iterations (void)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
/* We don't want to issue signed overflow warnings while getting /* We don't want to issue signed overflow warnings while getting
loop iteration estimates. */ loop iteration estimates. */
fold_defer_overflow_warnings (); fold_defer_overflow_warnings ();
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
estimate_numbers_of_iterations_loop (loop); estimate_numbers_of_iterations_loop (loop);
} }
@ -3863,10 +3862,9 @@ free_numbers_of_iterations_estimates_loop (struct loop *loop)
void void
free_numbers_of_iterations_estimates (void) free_numbers_of_iterations_estimates (void)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
{ {
free_numbers_of_iterations_estimates_loop (loop); free_numbers_of_iterations_estimates_loop (loop);
} }

View file

@ -1930,7 +1930,6 @@ fail:
unsigned int unsigned int
tree_ssa_prefetch_arrays (void) tree_ssa_prefetch_arrays (void)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
bool unrolled = false; bool unrolled = false;
int todo_flags = 0; int todo_flags = 0;
@ -1978,7 +1977,7 @@ tree_ssa_prefetch_arrays (void)
here. */ here. */
gcc_assert ((PREFETCH_BLOCK & (PREFETCH_BLOCK - 1)) == 0); gcc_assert ((PREFETCH_BLOCK & (PREFETCH_BLOCK - 1)) == 0);
FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST) FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
{ {
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "Processing loop %d:\n", loop->num); fprintf (dump_file, "Processing loop %d:\n", loop->num);

View file

@ -83,13 +83,12 @@ static tree tree_may_unswitch_on (basic_block, struct loop *);
unsigned int unsigned int
tree_ssa_unswitch_loops (void) tree_ssa_unswitch_loops (void)
{ {
loop_iterator li;
struct loop *loop; struct loop *loop;
bool changed = false; bool changed = false;
HOST_WIDE_INT iterations; HOST_WIDE_INT iterations;
/* Go through inner loops (only original ones). */ /* Go through inner loops (only original ones). */
FOR_EACH_LOOP (li, loop, LI_ONLY_INNERMOST) FOR_EACH_LOOP (loop, LI_ONLY_INNERMOST)
{ {
if (dump_file && (dump_flags & TDF_DETAILS)) if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, ";; Considering loop %d\n", loop->num); fprintf (dump_file, ";; Considering loop %d\n", loop->num);

View file

@ -1554,7 +1554,6 @@ thread_through_all_blocks (bool may_peel_loop_headers)
bitmap_iterator bi; bitmap_iterator bi;
bitmap threaded_blocks; bitmap threaded_blocks;
struct loop *loop; struct loop *loop;
loop_iterator li;
/* We must know about loops in order to preserve them. */ /* We must know about loops in order to preserve them. */
gcc_assert (current_loops != NULL); gcc_assert (current_loops != NULL);
@ -1582,7 +1581,7 @@ thread_through_all_blocks (bool may_peel_loop_headers)
/* Then perform the threading through loop headers. We start with the /* Then perform the threading through loop headers. We start with the
innermost loop, so that the changes in cfg we perform won't affect innermost loop, so that the changes in cfg we perform won't affect
further threading. */ further threading. */
FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST) FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
{ {
if (!loop->header if (!loop->header
|| !bitmap_bit_p (threaded_blocks, loop->header->index)) || !bitmap_bit_p (threaded_blocks, loop->header->index))

View file

@ -324,7 +324,6 @@ vectorize_loops (void)
unsigned int i; unsigned int i;
unsigned int num_vectorized_loops = 0; unsigned int num_vectorized_loops = 0;
unsigned int vect_loops_num; unsigned int vect_loops_num;
loop_iterator li;
struct loop *loop; struct loop *loop;
hash_table <simduid_to_vf> simduid_to_vf_htab; hash_table <simduid_to_vf> simduid_to_vf_htab;
hash_table <simd_array_to_simduid> simd_array_to_simduid_htab; hash_table <simd_array_to_simduid> simd_array_to_simduid_htab;
@ -349,7 +348,7 @@ vectorize_loops (void)
/* If some loop was duplicated, it gets bigger number /* If some loop was duplicated, it gets bigger number
than all previously defined loops. This fact allows us to run than all previously defined loops. This fact allows us to run
only over initial loops skipping newly generated ones. */ only over initial loops skipping newly generated ones. */
FOR_EACH_LOOP (li, loop, 0) FOR_EACH_LOOP (loop, 0)
if ((flag_tree_loop_vectorize && optimize_loop_nest_for_speed_p (loop)) if ((flag_tree_loop_vectorize && optimize_loop_nest_for_speed_p (loop))
|| loop->force_vect) || loop->force_vect)
{ {

View file

@ -5895,8 +5895,7 @@ find_assert_locations (void)
the order we compute liveness and insert asserts we otherwise the order we compute liveness and insert asserts we otherwise
fail to insert asserts into the loop latch. */ fail to insert asserts into the loop latch. */
loop_p loop; loop_p loop;
loop_iterator li; FOR_EACH_LOOP (loop, 0)
FOR_EACH_LOOP (li, loop, 0)
{ {
i = loop->latch->index; i = loop->latch->index;
unsigned int j = single_succ_edge (loop->latch)->dest_idx; unsigned int j = single_succ_edge (loop->latch)->dest_idx;