/* The loop tree currently optimized. */
-struct loops *current_loops;
+struct loops *current_loops = NULL;
/* Initializes the loop structures. DUMP is the file to that the details
about the analysis should be dumped. */
if (!loops)
return NULL;
- update_ssa (TODO_update_ssa);
- rewrite_into_loop_closed_ssa (NULL);
+ rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa);
return loops;
}
0 /* letter */
};
+/* Propagation of constants using scev. */
+
+static bool
+gate_scev_const_prop (void)
+{
+ return true;
+}
+
+struct tree_opt_pass pass_scev_cprop =
+{
+ "sccp", /* name */
+ gate_scev_const_prop, /* gate */
+ scev_const_prop, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ TV_SCEV_CONST, /* tv_id */
+ PROP_cfg | PROP_ssa, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ TODO_dump_func, /* todo_flags_finish */
+ 0 /* letter */
+};
+
/* Record bounds on numbers of iterations of loops. */
static void
if (!current_loops)
return;
- tree_unroll_loops_completely (current_loops);
+ tree_unroll_loops_completely (current_loops,
+ flag_unroll_loops
+ || flag_peel_loops
+ || optimize >= 3);
}
static bool
gate_tree_complete_unroll (void)
{
- return flag_peel_loops || flag_unroll_loops;
+ return true;
}
struct tree_opt_pass pass_complete_unroll =