aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-ivcanon.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2017-06-19 07:26:50 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2017-06-19 07:26:50 +0000
commitadb7eaa2bac31047b37cc8b9cb7b4121ca0a8fea (patch)
tree45140d490b96fcec2f3b954c5e0f7d1496ea0b05 /gcc/tree-ssa-loop-ivcanon.c
parentdb9bbdeca441e21f50b12cbfc2ff34992242b4f3 (diff)
downloadgcc-adb7eaa2bac31047b37cc8b9cb7b4121ca0a8fea.zip
gcc-adb7eaa2bac31047b37cc8b9cb7b4121ca0a8fea.tar.gz
gcc-adb7eaa2bac31047b37cc8b9cb7b4121ca0a8fea.tar.bz2
tree-ssa-loop-niter.h (estimate_numbers_of_iterations): Take struct function as arg.
2017-06-19 Richard Biener <rguenther@suse.de> * tree-ssa-loop-niter.h (estimate_numbers_of_iterations): Take struct function as arg. (estimate_numbers_of_iterations): Export overload with loop arg. (free_numbers_of_iterations_estimates_loop): Use an overload of free_numbers_of_iterations_estimates instead. * tree-cfg.c (remove_bb): Adjust. * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Likewise. * tree-parloops.c (gen_parallel_loop): Likewise. * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Likewise. (tree_unroll_loops_completely): Likewise. * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Use an overload instead and export. (estimated_loop_iterations): Adjust. (max_loop_iterations): Likewise. (likely_max_loop_iterations): Likewise. (estimate_numbers_of_iterations): Take struct function as arg and adjust. (loop_exits_before_overflow): Adjust. (free_numbers_of_iterations_estimates_loop): Use an overload. * tree-vect-loop.c (vect_analyze_loop_form): Adjust. * tree-vectorizer.c (vect_free_loop_info_assumptions): Likewise. From-SVN: r249358
Diffstat (limited to 'gcc/tree-ssa-loop-ivcanon.c')
-rw-r--r--gcc/tree-ssa-loop-ivcanon.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/tree-ssa-loop-ivcanon.c b/gcc/tree-ssa-loop-ivcanon.c
index 82ad59c..b6ac765 100644
--- a/gcc/tree-ssa-loop-ivcanon.c
+++ b/gcc/tree-ssa-loop-ivcanon.c
@@ -1215,7 +1215,7 @@ canonicalize_induction_variables (void)
bool irred_invalidated = false;
bitmap loop_closed_ssa_invalidated = BITMAP_ALLOC (NULL);
- estimate_numbers_of_iterations ();
+ estimate_numbers_of_iterations (cfun);
FOR_EACH_LOOP (loop, LI_FROM_INNERMOST)
{
@@ -1361,6 +1361,8 @@ tree_unroll_loops_completely (bool may_increase_size, bool unroll_outer)
int iteration = 0;
bool irred_invalidated = false;
+ estimate_numbers_of_iterations (cfun);
+
do
{
changed = false;
@@ -1370,7 +1372,7 @@ tree_unroll_loops_completely (bool may_increase_size, bool unroll_outer)
loop_closed_ssa_invalidated = BITMAP_ALLOC (NULL);
free_numbers_of_iterations_estimates (cfun);
- estimate_numbers_of_iterations ();
+ estimate_numbers_of_iterations (cfun);
changed = tree_unroll_loops_completely_1 (may_increase_size,
unroll_outer, father_bbs,
@@ -1588,7 +1590,6 @@ pass_complete_unrolli::execute (function *fun)
{
scev_initialize ();
ret = tree_unroll_loops_completely (optimize >= 3, false);
- free_numbers_of_iterations_estimates (fun);
scev_finalize ();
}
loop_optimizer_finalize ();