aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivcanon.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r--gcc/tree-ssa-loop-ivcanon.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index 7dcb0da..6326801 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -332,18 +332,15 @@ canonicalize_loop_induction_variables (struct loop *loop,
unsigned int
canonicalize_induction_variables (void)
{
- unsigned i;
+ loop_iterator li;
struct loop *loop;
bool changed = false;
- for (i = 1; i < current_loops->num; i++)
+ FOR_EACH_LOOP (li, loop, 0)
{
- loop = current_loops->parray[i];
-
- if (loop)
- changed |= canonicalize_loop_induction_variables (loop,
- true, UL_SINGLE_ITER,
- true);
+ changed |= canonicalize_loop_induction_variables (loop,
+ true, UL_SINGLE_ITER,
+ true);
}
/* Clean up the information about numbers of iterations, since brute force
@@ -362,18 +359,13 @@ canonicalize_induction_variables (void)
unsigned int
tree_unroll_loops_completely (bool may_increase_size)
{
- unsigned i;
+ loop_iterator li;
struct loop *loop;
bool changed = false;
enum unroll_level ul;
- for (i = 1; i < current_loops->num; i++)
+ FOR_EACH_LOOP (li, loop, 0)
{
- loop = current_loops->parray[i];
-
- if (!loop)
- continue;
-
if (may_increase_size && maybe_hot_bb_p (loop->header))
ul = UL_ALL;
else