tree-optimize.c (init_tree_optimization_passes): Add pass_record_bounds.
* 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. From-SVN: r88097
This commit is contained in:
parent
2c85539856
commit
f3cd574f6b
4 changed files with 39 additions and 0 deletions
|
@ -1,3 +1,11 @@
|
|||
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
|
||||
|
|
|
@ -393,6 +393,7 @@ init_tree_optimization_passes (void)
|
|||
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);
|
||||
|
|
|
@ -127,6 +127,7 @@ extern struct tree_opt_pass pass_loop_init;
|
|||
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;
|
||||
|
|
|
@ -297,6 +297,35 @@ struct tree_opt_pass pass_iv_canon =
|
|||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue