diff options
author | Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> | 2004-09-25 14:53:26 +0200 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2004-09-25 12:53:26 +0000 |
commit | f3cd574f6b2a45b1cd9153636d0ad1aba1cde806 (patch) | |
tree | cba6592637f7c6bfb3cb621ea30411b61bce6227 /gcc/tree-ssa-loop.c | |
parent | 2c855398563d3cf8f27a5c1f67860e6838cc3e96 (diff) | |
download | gcc-f3cd574f6b2a45b1cd9153636d0ad1aba1cde806.zip gcc-f3cd574f6b2a45b1cd9153636d0ad1aba1cde806.tar.gz gcc-f3cd574f6b2a45b1cd9153636d0ad1aba1cde806.tar.bz2 |
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
Diffstat (limited to 'gcc/tree-ssa-loop.c')
-rw-r--r-- | gcc/tree-ssa-loop.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c index 19f784d..b1d854e 100644 --- a/gcc/tree-ssa-loop.c +++ b/gcc/tree-ssa-loop.c @@ -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 |