summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivcanon.c
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-06 06:13:22 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2006-09-06 06:13:22 +0000
commit4c641bf8e55764bc6f1ea1ece9b8fe703475c671 (patch)
tree528bb95b3e49e65e4c30b14572ac1d30ded632cf /gcc/tree-ssa-loop-ivcanon.c
parent4ff650b4cb860c45477d14f3ce9da70d66b2f910 (diff)
downloadgcc-4c641bf8e55764bc6f1ea1ece9b8fe703475c671.tar.gz
2006-09-05 Andrew Pinski <pinskia@physics.uc.edu>
PR tree-opt/28937 * tree-flow.h (tree_ssa_unswitch_loops): Return unsigned int. (canonicalize_induction_variables): Likewise. (tree_unroll_loops_completely): Likewise. (tree_ssa_prefetch_arrays): Likewise. (remove_empty_loops): Likewise. * tree-ssa-loop-unswitch.c (tree_ssa_unswitch_loops): Return TODO_cleanup_cfg instead of directly calling cleanup_tree_cfg_loop. * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Likewise. (tree_unroll_loops_completely): Likewise. (remove_empty_loops): Likewise. * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Likewise. * tree-ssa-loop.c (tree_ssa_loop_unswitch): Use the return value of tree_ssa_unswitch_loops. (tree_ssa_loop_ivcanon): Use the return value of canonicalize_induction_variables. (tree_ssa_empty_loop): Use the return value of remove_empty_loops. (tree_complete_unroll): Use the return value of tree_unroll_loops_completely. (tree_ssa_loop_prefetch): Use the return value of tree_ssa_prefetch_arrays. * passes.c (execute_todo): Before Cleanup CFG, set updating_used_alone and after cleanup CFG, call recalculate_used_alone. 2006-09-05 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/28937 * g++.dg/opt/unroll2.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116717 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r--gcc/tree-ssa-loop-ivcanon.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index 0ad2069983f..a56679d3239 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -330,7 +330,7 @@ canonicalize_loop_induction_variables (struct loops *loops, struct loop *loop,
/* The main entry point of the pass. Adds canonical induction variables
to the suitable LOOPS. */
-void
+unsigned int
canonicalize_induction_variables (struct loops *loops)
{
unsigned i;
@@ -352,14 +352,15 @@ canonicalize_induction_variables (struct loops *loops)
scev_reset ();
if (changed)
- cleanup_tree_cfg_loop ();
+ return TODO_cleanup_cfg;
+ return 0;
}
/* Unroll LOOPS completely if they iterate just few times. Unless
MAY_INCREASE_SIZE is true, perform the unrolling only if the
size of the code does not increase. */
-void
+unsigned int
tree_unroll_loops_completely (struct loops *loops, bool may_increase_size)
{
unsigned i;
@@ -388,7 +389,8 @@ tree_unroll_loops_completely (struct loops *loops, bool may_increase_size)
scev_reset ();
if (changed)
- cleanup_tree_cfg_loop ();
+ return TODO_cleanup_cfg;
+ return 0;
}
/* Checks whether LOOP is empty. */
@@ -562,7 +564,7 @@ try_remove_empty_loop (struct loop *loop, bool *changed)
/* Remove the empty LOOPS. */
-void
+unsigned int
remove_empty_loops (struct loops *loops)
{
bool changed = false;
@@ -574,6 +576,7 @@ remove_empty_loops (struct loops *loops)
if (changed)
{
scev_reset ();
- cleanup_tree_cfg_loop ();
+ return TODO_cleanup_cfg;
}
+ return 0;
}