diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-16 00:25:30 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-16 00:25:30 +0000 |
commit | 4b4ab846d45c218ef2185b324ddb24133fe2337a (patch) | |
tree | 5428421105c29c278a57087c665dc954fb95d826 /gcc/cfgloop.h | |
parent | 8e52e16855a7e53136e9ba8b92968b83890656a9 (diff) | |
download | gcc-4b4ab846d45c218ef2185b324ddb24133fe2337a.tar.gz |
* tree-ssa-loop-niter.c (record_estimate): Add "upper" argument.
Update constant estimates of number of iterations.
(record_nonwrapping_iv): Add "upper" argument. "data_size_bounds_p"
argument renamed to "realistic".
(compute_estimated_nb_iterations): Removed.
(record_niter_bound): New function.
(idx_infer_loop_bounds): For possible but unlikely tail arrays,
call record_nonwrapping_iv with upper = false.
(infer_loop_bounds_from_signedness): Pass upper argument to
record_nonwrapping_iv.
(estimate_numbers_of_iterations_loop): Do not call
compute_estimated_nb_iterations. Record estimate based on profile
information. Initialize the constant estimates of number of
iterations.
* tree-data-ref.c (estimated_loop_iterations): Return the recorded
estimates.
* tree-ssa-loop-prefetch.c (loop_prefetch_arrays): Add dump when
number of iterations is too small.
* cfgloop.h (struct nb_iter_bound): Remove "realistic" field.
(EST_NOT_AVAILABLE): Removed.
(struct loop): Replace estimated_nb_iterations by any_upper_bound,
nb_iterations_upper_bound, any_estimate and nb_iterations_estimate
fields.
* gcc.dg/tree-ssa/prefetch-5.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122969 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfgloop.h')
-rw-r--r-- | gcc/cfgloop.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index c6cd7221aa7..c5c1cf25b42 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -65,12 +65,6 @@ struct nb_iter_bound are executed at most BOUND times. */ bool is_exit; - /* True if the bound is "realistic" -- i.e., most likely the loop really has - number of iterations close to the bound. Exact bounds (if the number of - iterations of a loop is a constant) and bounds derived from the size of - data accessed in the loop are considered realistic. */ - bool realistic; - /* The next bound in the list. */ struct nb_iter_bound *next; }; @@ -148,12 +142,18 @@ struct loop { /* Estimate was not computed yet. */ EST_NOT_COMPUTED, - /* Estimate was computed, but we could derive no useful bound. */ - EST_NOT_AVAILABLE, /* Estimate is ready. */ EST_AVAILABLE } estimate_state; - double_int estimated_nb_iterations; + + /* An integer guaranteed to bound the number of iterations of the loop + from above. */ + bool any_upper_bound; + double_int nb_iterations_upper_bound; + + /* An integer giving the expected number of iterations of the loop. */ + bool any_estimate; + double_int nb_iterations_estimate; /* Upper bound on number of iterations of a loop. */ struct nb_iter_bound *bounds; |