summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop.c
diff options
context:
space:
mode:
authorrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-25 12:53:26 +0000
committerrakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-25 12:53:26 +0000
commit41fc6ce4194416f39ae2907317ac9c5975dac36b (patch)
treecba6592637f7c6bfb3cb621ea30411b61bce6227 /gcc/tree-ssa-loop.c
parent06780ca85d136fa33ff15b7c59bf0365ca1869e3 (diff)
downloadgcc-41fc6ce4194416f39ae2907317ac9c5975dac36b.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@88097 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop.c')
-rw-r--r--gcc/tree-ssa-loop.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c
index 19f784d9bbf..b1d854e9acd 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