aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgloop.h
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2016-05-27 14:10:34 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2016-05-27 12:10:34 +0000
commit105e29c5cf8729021614b152328bcfe054bed64d (patch)
tree9c8ce8178d2d6e5fb92b3271a8afae4b5b62e6c0 /gcc/cfgloop.h
parent3cee7e4e2badde2374fc77bb8f3a072e1698d1fe (diff)
downloadgcc-105e29c5cf8729021614b152328bcfe054bed64d.zip
gcc-105e29c5cf8729021614b152328bcfe054bed64d.tar.gz
gcc-105e29c5cf8729021614b152328bcfe054bed64d.tar.bz2
cfgloop.c (record_niter_bound): Record likely upper bounds.
* cfgloop.c (record_niter_bound): Record likely upper bounds. (likely_max_stmt_executions_int, get_likely_max_loop_iterations, get_likely_max_loop_iterations_int): New. * cfgloop.h (struct loop): Add nb_iterations_likely_upper_bound, any_likely_upper_bound. (get_likely_max_loop_iterations_int, get_likely_max_loop_iterations): Declare. * cfgloopmanip.c (copy_loop_info): Copy likely upper bounds. * loop-unroll.c (unroll_loop_constant_iterations): Update likely upper bound. (unroll_loop_constant_iterations): Likewise. (unroll_loop_runtime_iterations): Likewise. * lto-streamer-in.c (input_cfg): Stream likely upper bounds. * lto-streamer-out.c (output_cfg): Likewise. * tree-ssa-loop-ivcanon.c (try_peel_loop): Update likely upper bounds. (canonicalize_loop_induction_variables): Dump likely upper bounds. * tree-ssa-loop-niter.c (record_estimate): Record likely upper bounds. (likely_max_loop_iterations): New. (likely_max_loop_iterations_int): New. (likely_max_stmt_executions): New. * tree-ssa-loop-niter.h (likely_max_loop_iterations, likely_max_loop_iterations_int, likely_max_stmt_executions_int, likely_max_stmt_executions): Declare. From-SVN: r236816
Diffstat (limited to 'gcc/cfgloop.h')
-rw-r--r--gcc/cfgloop.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h
index 173fda8..aba2988 100644
--- a/gcc/cfgloop.h
+++ b/gcc/cfgloop.h
@@ -160,6 +160,8 @@ struct GTY ((chain_next ("%h.next"))) loop {
valid if any_upper_bound is true. */
widest_int nb_iterations_upper_bound;
+ widest_int nb_iterations_likely_upper_bound;
+
/* An integer giving an estimate on nb_iterations. Unlike
nb_iterations_upper_bound, there is no guarantee that it is at least
nb_iterations. */
@@ -167,6 +169,7 @@ struct GTY ((chain_next ("%h.next"))) loop {
bool any_upper_bound;
bool any_estimate;
+ bool any_likely_upper_bound;
/* True if the loop can be parallel. */
bool can_be_parallel;
@@ -776,8 +779,10 @@ loop_outermost (struct loop *loop)
extern void record_niter_bound (struct loop *, const widest_int &, bool, bool);
extern HOST_WIDE_INT get_estimated_loop_iterations_int (struct loop *);
extern HOST_WIDE_INT get_max_loop_iterations_int (struct loop *);
+extern HOST_WIDE_INT get_likely_max_loop_iterations_int (struct loop *);
extern bool get_estimated_loop_iterations (struct loop *loop, widest_int *nit);
extern bool get_max_loop_iterations (struct loop *loop, widest_int *nit);
+extern bool get_likely_max_loop_iterations (struct loop *loop, widest_int *nit);
extern int bb_loop_depth (const_basic_block);
/* Converts VAL to widest_int. */