Commit f3cd574f by Zdenek Dvorak Committed by Zdenek Dvorak

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
parent 2c855398
2004-09-25 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> 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 PR tree-optimization/17474
* tree-ssa-ccp.c (maybe_fold_offset_to_component_ref): Determine * tree-ssa-ccp.c (maybe_fold_offset_to_component_ref): Determine
offset of the field correctly when DECL_FIELD_BIT_OFFSET != 0. offset of the field correctly when DECL_FIELD_BIT_OFFSET != 0.
......
...@@ -393,6 +393,7 @@ init_tree_optimization_passes (void) ...@@ -393,6 +393,7 @@ init_tree_optimization_passes (void)
NEXT_PASS (pass_lim); NEXT_PASS (pass_lim);
NEXT_PASS (pass_unswitch); NEXT_PASS (pass_unswitch);
NEXT_PASS (pass_iv_canon); NEXT_PASS (pass_iv_canon);
NEXT_PASS (pass_record_bounds);
NEXT_PASS (pass_if_conversion); NEXT_PASS (pass_if_conversion);
NEXT_PASS (pass_vectorize); NEXT_PASS (pass_vectorize);
NEXT_PASS (pass_linear_transform); NEXT_PASS (pass_linear_transform);
......
...@@ -127,6 +127,7 @@ extern struct tree_opt_pass pass_loop_init; ...@@ -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_lim;
extern struct tree_opt_pass pass_unswitch; extern struct tree_opt_pass pass_unswitch;
extern struct tree_opt_pass pass_iv_canon; 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_if_conversion;
extern struct tree_opt_pass pass_vectorize; extern struct tree_opt_pass pass_vectorize;
extern struct tree_opt_pass pass_complete_unroll; extern struct tree_opt_pass pass_complete_unroll;
......
...@@ -297,6 +297,35 @@ struct tree_opt_pass pass_iv_canon = ...@@ -297,6 +297,35 @@ struct tree_opt_pass pass_iv_canon =
0 /* letter */ 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. */ /* Complete unrolling of loops. */
static void static void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment