diff options
author | Zdenek Dvorak <dvorakz@suse.cz> | 2007-03-16 01:25:30 +0100 |
---|---|---|
committer | Zdenek Dvorak <rakdver@gcc.gnu.org> | 2007-03-16 00:25:30 +0000 |
commit | 9bdb685eda8fc13f43450520b257fa1bfe3e464e (patch) | |
tree | 5428421105c29c278a57087c665dc954fb95d826 /gcc/tree-ssa-loop-prefetch.c | |
parent | d4daf0d62328911ad4ba572a3e332a39abfb4096 (diff) | |
download | gcc-9bdb685eda8fc13f43450520b257fa1bfe3e464e.zip gcc-9bdb685eda8fc13f43450520b257fa1bfe3e464e.tar.gz gcc-9bdb685eda8fc13f43450520b257fa1bfe3e464e.tar.bz2 |
tree-ssa-loop-niter.c (record_estimate): Add "upper" argument.
* 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.
From-SVN: r122969
Diffstat (limited to 'gcc/tree-ssa-loop-prefetch.c')
-rw-r--r-- | gcc/tree-ssa-loop-prefetch.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c index 53977d8..a0d70cc 100644 --- a/gcc/tree-ssa-loop-prefetch.c +++ b/gcc/tree-ssa-loop-prefetch.c @@ -968,7 +968,13 @@ loop_prefetch_arrays (struct loop *loop) the loop rolls at least AHEAD times, prefetching the references does not make sense. */ if (est_niter >= 0 && est_niter <= (HOST_WIDE_INT) ahead) - goto fail; + { + if (dump_file && (dump_flags & TDF_DETAILS)) + fprintf (dump_file, + "Not prefetching -- loop estimated to roll only %d times\n", + (int) est_niter); + goto fail; + } ninsns = tree_num_loop_insns (loop, &eni_size_weights); unroll_factor = determine_unroll_factor (loop, refs, ninsns, &desc, |