+2004-09-25 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
+
+ * tree-optimize.c (init_tree_optimization_passes): Add
+ pass_record_bounds.
+ * tree-pass.h (pass_record_bounds): Declare.
+ * tree-ssa-loop.c (tree_ssa_loop_bounds, pass_record_bounds):
+ New pass.
+
2004-09-25 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
PR tree-optimization/17474
NEXT_PASS (pass_lim);
NEXT_PASS (pass_unswitch);
NEXT_PASS (pass_iv_canon);
+ NEXT_PASS (pass_record_bounds);
NEXT_PASS (pass_if_conversion);
NEXT_PASS (pass_vectorize);
NEXT_PASS (pass_linear_transform);
extern struct tree_opt_pass pass_lim;
extern struct tree_opt_pass pass_unswitch;
extern struct tree_opt_pass pass_iv_canon;
+extern struct tree_opt_pass pass_record_bounds;
extern struct tree_opt_pass pass_if_conversion;
extern struct tree_opt_pass pass_vectorize;
extern struct tree_opt_pass pass_complete_unroll;
0 /* letter */
};
+/* Record bounds on numbers of iterations of loops. */
+
+static void
+tree_ssa_loop_bounds (void)
+{
+ if (!current_loops)
+ return;
+
+ estimate_numbers_of_iterations (current_loops);
+ scev_reset ();
+}
+
+struct tree_opt_pass pass_record_bounds =
+{
+ "bounds", /* name */
+ NULL, /* gate */
+ tree_ssa_loop_bounds, /* execute */
+ NULL, /* sub */
+ NULL, /* next */
+ 0, /* static_pass_number */
+ 0, /* tv_id */
+ PROP_cfg | PROP_ssa, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ 0, /* todo_flags_finish */
+ 0 /* letter */
+};
+
/* Complete unrolling of loops. */
static void