+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>
PR tree-optimization/59164
void
flow_loops_dump (FILE *file, void (*loop_dump_aux) (const struct loop *, FILE *, int), int verbose)
{
- loop_iterator li;
struct loop *loop;
if (!current_loops || ! file)
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);
}
void
disambiguate_loops_with_multiple_latches (void)
{
- loop_iterator li;
struct loop *loop;
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
if (!loop->latch)
disambiguate_multiple_latches (loop);
int err = 0;
edge e;
unsigned num = number_of_loops (cfun);
- loop_iterator li;
struct loop_exit *exit, *mexit;
bool dom_available = dom_info_available_p (CDI_DOMINATORS);
sbitmap visited;
visited = sbitmap_alloc (last_basic_block);
bitmap_clear (visited);
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;
sbitmap_free (visited);
/* Check headers and latches. */
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
i = loop->num;
if (loop->header == NULL)
}
/* Check the recorded loop exits. */
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
if (!loop->exits || loop->exits->e != NULL)
{
err = 1;
}
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
eloops = 0;
for (exit = loop->exits->next; exit->e; exit = exit->next)
/* 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. */
vec<int> to_visit;
/* The index of the actual loop. */
unsigned idx;
-} loop_iterator;
+};
-static inline void
-fel_next (loop_iterator *li, loop_p *loop)
+inline loop_p
+loop_iterator::next ()
{
int anum;
- while (li->to_visit.iterate (li->idx, &anum))
+ while (this->to_visit.iterate (this->idx, &anum))
{
- li->idx++;
- *loop = get_loop (cfun, anum);
- if (*loop)
- return;
+ this->idx++;
+ loop_p loop = get_loop (cfun, anum);
+ if (loop)
+ return loop;
}
- li->to_visit.release ();
- *loop = NULL;
+ return NULL;
}
-static inline void
-fel_init (loop_iterator *li, loop_p *loop, unsigned flags)
+inline
+loop_iterator::loop_iterator (loop_p *loop, unsigned flags)
{
struct loop *aloop;
unsigned i;
int mn;
- li->idx = 0;
+ this->idx = 0;
if (!current_loops)
{
- li->to_visit.create (0);
+ this->to_visit.create (0);
*loop = NULL;
return;
}
- li->to_visit.create (number_of_loops (cfun));
+ this->to_visit.create (number_of_loops (cfun));
mn = (flags & LI_INCLUDE_ROOT) ? 0 : 1;
if (flags & LI_ONLY_INNERMOST)
if (aloop != NULL
&& aloop->inner == NULL
&& aloop->num >= mn)
- li->to_visit.quick_push (aloop->num);
+ this->to_visit.quick_push (aloop->num);
}
else if (flags & LI_FROM_INNERMOST)
{
while (1)
{
if (aloop->num >= mn)
- li->to_visit.quick_push (aloop->num);
+ this->to_visit.quick_push (aloop->num);
if (aloop->next)
{
while (1)
{
if (aloop->num >= mn)
- li->to_visit.quick_push (aloop->num);
+ this->to_visit.quick_push (aloop->num);
if (aloop->inner != NULL)
aloop = aloop->inner;
}
}
- fel_next (li, loop);
+ *loop = this->next ();
}
-#define FOR_EACH_LOOP(LI, LOOP, FLAGS) \
- for (fel_init (&(LI), &(LOOP), FLAGS); \
- (LOOP); \
- fel_next (&(LI), &(LOOP)))
+inline
+loop_iterator::~loop_iterator ()
+{
+ this->to_visit.release ();
+}
-#define FOR_EACH_LOOP_BREAK(LI) \
- { \
- (LI).to_visit.release (); \
- break; \
- }
+#define FOR_EACH_LOOP(LOOP, FLAGS) \
+ for (loop_iterator li(&(LOOP), FLAGS); \
+ (LOOP); \
+ (LOOP) = li.next ())
/* The properties of the target. */
struct target_cfgloop {
void
create_preheaders (int flags)
{
- loop_iterator li;
struct loop *loop;
if (!current_loops)
return;
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
create_preheader (loop, flags);
loops_state_set (LOOPS_HAVE_PREHEADERS);
}
void
force_single_succ_latches (void)
{
- loop_iterator li;
struct loop *loop;
edge e;
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
if (loop->latch != loop->header && single_succ_p (loop->latch))
continue;
static void
mn10300_scan_for_setlb_lcc (void)
{
- loop_iterator liter;
loop_p loop;
DUMP ("Looking for loops that can use the SETLB insn", NULL_RTX);
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
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;
if (dump_file && (dump_flags & TDF_DETAILS))
{
loop_p loop;
- loop_iterator li;
int num_no_dependency = 0;
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
if (loop->can_be_parallel)
num_no_dependency++;
static void
canonicalize_loop_closed_ssa_form (void)
{
- loop_iterator li;
loop_p loop;
#ifdef ENABLE_CHECKING
verify_loop_closed_ssa (true);
#endif
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
canonicalize_loop_closed_ssa (loop);
rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa);
#include "domwalk.h"
#include "sese.h"
#include "tree-ssa-propagate.h"
+#include "expr.h"
#ifdef HAVE_cloog
#include "expr.h"
static void
rewrite_commutative_reductions_out_of_ssa (scop_p scop)
{
- loop_iterator li;
loop_p loop;
bool changed = false;
sese region = SCOP_REGION (scop);
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
if (loop_in_sese_p (loop, region))
changed |= rewrite_commutative_reductions_out_of_ssa_loop (scop, loop);
static bool
scop_ivs_can_be_represented (scop_p scop)
{
- loop_iterator li;
loop_p loop;
gimple_stmt_iterator psi;
bool result = true;
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
if (!loop_in_sese_p (loop, SCOP_REGION (scop)))
continue;
}
}
if (!result)
- FOR_EACH_LOOP_BREAK (li);
+ break;
}
return result;
if (!early && nonconstant_names.exists ())
{
struct loop *loop;
- loop_iterator li;
predicate loop_iterations = true_predicate ();
predicate loop_stride = true_predicate ();
if (dump_file && (dump_flags & TDF_DETAILS))
flow_loops_dump (dump_file, NULL, 0);
scev_initialize ();
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
vec<edge> exits;
edge ex;
}
else
{
- loop_iterator li;
struct loop *loop;
scev_initialize ();
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
if (!finite_loop_p (loop))
{
if (dump_file)
fprintf (dump_file, " can not prove finiteness of "
"loop %i\n", loop->num);
l->looping =true;
- FOR_EACH_LOOP_BREAK (li);
+ break;
}
scev_finalize ();
}
void
loop_optimizer_finalize (void)
{
- loop_iterator li;
struct loop *loop;
basic_block bb;
gcc_assert (current_loops != NULL);
- FOR_EACH_LOOP (li, loop, 0)
- {
- free_simple_loop_desc (loop);
- }
+ FOR_EACH_LOOP (loop, 0)
+ free_simple_loop_desc (loop);
/* Clean up. */
flow_loops_free (current_loops);
{
basic_block bb;
int record_exits = 0;
- loop_iterator li;
struct loop *loop;
unsigned old_nloops, i;
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
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
it wasn't marked for removal.
basic_block bb;
rtx insn, link;
struct loop *loop, *parent;
- loop_iterator li;
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
if (loop->aux == NULL)
{
loop->aux = xcalloc (1, sizeof (struct loop_data));
bitmap_clear (&curr_regs_live);
if (flag_ira_region == IRA_REGION_MIXED
|| 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)
if (! bitmap_bit_p (&LOOP_DATA (loop)->regs_ref, j))
}
if (dump_file == NULL)
return;
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
parent = loop_outer (loop);
fprintf (dump_file, "\n Loop %d (parent %d, header bb%d, depth %d)\n",
move_loop_invariants (void)
{
struct loop *loop;
- loop_iterator li;
if (flag_ira_loop_pressure)
{
}
df_set_flags (DF_EQ_NOTES + DF_DEFER_INSN_RESCAN);
/* Process the loops, innermost first. */
- FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST)
+ FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
{
curr_loop = loop;
/* move_single_loop_invariants for very large loops
move_single_loop_invariants (loop);
}
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
free_loop_data (loop);
}
{
struct loop *loop;
bool changed = false;
- loop_iterator li;
/* First perform complete loop peeling (it is almost surely a win,
and affects parameters for further decision a lot). */
decide_unrolling_and_peeling (flags);
/* 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. */
switch (loop->lpt_decision.decision)
peel_loops_completely (int flags)
{
struct loop *loop;
- loop_iterator li;
bool changed = false;
/* 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;
location_t locus = get_loop_location (loop);
decide_unrolling_and_peeling (int flags)
{
struct loop *loop;
- loop_iterator li;
/* 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;
location_t locus = get_loop_location (loop);
void
unswitch_loops (void)
{
- loop_iterator li;
struct loop *loop;
bool changed = false;
/* 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);
iv_analysis_done ();
ddg_ptr *g_arr, g;
int * node_order;
int maxii, max_asap;
- loop_iterator li;
partial_schedule_ptr ps;
basic_block bb = NULL;
struct loop *loop;
/* Build DDGs for all the relevant loops and hold them in G_ARR
indexed by the loop index. */
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
rtx head, tail;
rtx count_reg;
if (dump_file)
fprintf (dump_file, "SMS reached max limit... \n");
- FOR_EACH_LOOP_BREAK (li);
+ break;
}
if (dump_file)
}
/* 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 count_reg, count_init;
static void
predict_loops (void)
{
- loop_iterator li;
struct loop *loop;
/* Try to predict out blocks in a loop that are not part of a
natural loop. */
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
basic_block bb, *bbs;
unsigned j, n_exits;
/* Free data structures used in pipelining of loops. */
void sel_finish_pipelining (void)
{
- loop_iterator li;
struct loop *loop;
/* 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_optimizer_finalize ();
if (current_loops)
{
loop_p loop;
- loop_iterator li;
- FOR_EACH_LOOP (li, loop, (flag_sel_sched_pipelining_outer_loops
- ? LI_FROM_INNERMOST
- : LI_ONLY_INNERMOST))
+ FOR_EACH_LOOP (loop, (flag_sel_sched_pipelining_outer_loops
+ ? LI_FROM_INNERMOST
+ : LI_ONLY_INNERMOST))
make_regions_from_loop_nest (loop);
}
replace_loop_annotate ()
{
struct loop *loop;
- loop_iterator li;
basic_block bb;
gimple_stmt_iterator gsi;
gimple stmt;
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
gsi = gsi_last_bb (loop->header);
stmt = gsi_stmt (gsi);
if (current_loops)
{
struct loop *loop;
- loop_iterator li;
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
substitute_in_loop_info (loop, name, val);
}
void
tree_check_data_deps (void)
{
- loop_iterator li;
struct loop *loop_nest;
- FOR_EACH_LOOP (li, loop_nest, 0)
+ FOR_EACH_LOOP (loop_nest, 0)
analyze_all_data_dependences (loop_nest);
}
static unsigned int
main_tree_if_conversion (void)
{
- loop_iterator li;
struct loop *loop;
bool changed = false;
unsigned todo = 0;
if (number_of_loops (cfun) <= 1)
return 0;
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
if (flag_tree_loop_if_convert == 1
|| flag_tree_loop_if_convert_stores == 1
|| flag_tree_loop_vectorize
tree_loop_distribution (void)
{
struct loop *loop;
- loop_iterator li;
bool changed = false;
basic_block bb;
control_dependences *cd = NULL;
/* We can at the moment only distribute non-nested loops, thus restrict
walking to innermost loops. */
- FOR_EACH_LOOP (li, loop, LI_ONLY_INNERMOST)
+ FOR_EACH_LOOP (loop, LI_ONLY_INNERMOST)
{
vec<gimple> work_list = vNULL;
basic_block *bbs;
gen_parallel_loop (struct loop *loop, reduction_info_table_type reduction_list,
unsigned n_threads, struct tree_niter_desc *niter)
{
- loop_iterator li;
tree many_iterations_cond, type, nit;
tree arg_struct, new_arg_struct;
gimple_seq stmts;
/* Free loop bound estimations that could contain references to
removed statements. */
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
free_numbers_of_iterations_estimates_loop (loop);
/* Expand the parallel constructs. We do it directly here instead of running
bool changed = false;
struct loop *loop;
struct tree_niter_desc niter_desc;
- loop_iterator li;
reduction_info_table_type reduction_list;
struct obstack parloop_obstack;
HOST_WIDE_INT estimated;
reduction_list.create (10);
init_stmt_vec_info_vec ();
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
reduction_list.empty ();
if (dump_file && (dump_flags & TDF_DETAILS))
{
bool unrolled = false;
struct loop *loop;
- loop_iterator li;
unsigned ret = 0;
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))
{
unrolled |= tree_predictive_commoning_loop (loop);
void
scev_initialize (void)
{
- loop_iterator li;
struct loop *loop;
-
scalar_evolution_info = htab_create_ggc (100, hash_scev_info, eq_scev_info,
del_scev_info);
initialize_scalar_evolutions_analyzer ();
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
loop->nb_iterations = NULL_TREE;
}
void
scev_reset (void)
{
- loop_iterator li;
struct loop *loop;
scev_reset_htab ();
if (!current_loops)
return;
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
loop->nb_iterations = NULL_TREE;
}
struct loop *loop, *ex_loop;
bitmap ssa_names_to_remove = NULL;
unsigned i;
- loop_iterator li;
gimple_stmt_iterator psi;
if (number_of_loops (cfun) <= 1)
}
/* Now the regular final value replacement. */
- FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST)
+ FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
{
edge exit;
tree def, rslt, niter;
/* Prevent the empty possibly infinite loops from being removed. */
if (aggressive)
{
- loop_iterator li;
struct loop *loop;
scev_initialize ();
if (mark_irreducible_loops ())
}
}
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
if (!finite_loop_p (loop))
{
if (dump_file)
static unsigned int
copy_loop_headers (void)
{
- loop_iterator li;
struct loop *loop;
basic_block header;
edge exit, entry;
copied_bbs = XNEWVEC (basic_block, 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. */
int limit = 20;
gimple_stmt_iterator bsi;
basic_block bb, *bbs;
struct loop *loop, *outer;
- loop_iterator li;
unsigned i, n;
/* Initialize bb_loop_postorder with a mapping from loop->num to
its postorder index. */
i = 0;
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++;
/* Collect all basic-blocks in loops and sort them after their
loops postorder. */
/* Propagate the information about accessed memory references up
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). */
bitmap_ior_into (&memory_accesses.all_refs_stored_in_loop[loop->num],
unsigned int
canonicalize_induction_variables (void)
{
- loop_iterator li;
struct loop *loop;
bool changed = false;
bool irred_invalidated = false;
free_numbers_of_iterations_estimates ();
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,
true, UL_SINGLE_ITER,
{
struct loop *loop;
struct ivopts_data data;
- loop_iterator li;
tree_ssa_iv_optimize_init (&data);
/* 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))
flow_loop_dump (loop, dump_file, NULL, 1);
static void
get_loops_exits (bitmap *loop_exits)
{
- loop_iterator li;
struct loop *loop;
unsigned j;
edge e;
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
vec<edge> exit_edges = get_loop_exit_edges (loop);
loop_exits[loop->num] = BITMAP_ALLOC (&loop_renamer_obstack);
void
estimate_numbers_of_iterations (void)
{
- loop_iterator li;
struct loop *loop;
/* We don't want to issue signed overflow warnings while getting
loop iteration estimates. */
fold_defer_overflow_warnings ();
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
estimate_numbers_of_iterations_loop (loop);
}
void
free_numbers_of_iterations_estimates (void)
{
- loop_iterator li;
struct loop *loop;
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
free_numbers_of_iterations_estimates_loop (loop);
}
unsigned int
tree_ssa_prefetch_arrays (void)
{
- loop_iterator li;
struct loop *loop;
bool unrolled = false;
int todo_flags = 0;
here. */
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))
fprintf (dump_file, "Processing loop %d:\n", loop->num);
unsigned int
tree_ssa_unswitch_loops (void)
{
- loop_iterator li;
struct loop *loop;
bool changed = false;
HOST_WIDE_INT iterations;
/* 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))
fprintf (dump_file, ";; Considering loop %d\n", loop->num);
bitmap_iterator bi;
bitmap threaded_blocks;
struct loop *loop;
- loop_iterator li;
/* We must know about loops in order to preserve them. */
gcc_assert (current_loops != NULL);
/* Then perform the threading through loop headers. We start with the
innermost loop, so that the changes in cfg we perform won't affect
further threading. */
- FOR_EACH_LOOP (li, loop, LI_FROM_INNERMOST)
+ FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
{
if (!loop->header
|| !bitmap_bit_p (threaded_blocks, loop->header->index))
unsigned int i;
unsigned int num_vectorized_loops = 0;
unsigned int vect_loops_num;
- loop_iterator li;
struct loop *loop;
hash_table <simduid_to_vf> simduid_to_vf_htab;
hash_table <simd_array_to_simduid> simd_array_to_simduid_htab;
/* If some loop was duplicated, it gets bigger number
than all previously defined loops. This fact allows us to run
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))
|| loop->force_vect)
{
the order we compute liveness and insert asserts we otherwise
fail to insert asserts into the loop latch. */
loop_p loop;
- loop_iterator li;
- FOR_EACH_LOOP (li, loop, 0)
+ FOR_EACH_LOOP (loop, 0)
{
i = loop->latch->index;
unsigned int j = single_succ_edge (loop->latch)->dest_idx;