aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-prefetch.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2012-04-12 10:13:22 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2012-04-12 10:13:22 +0000
commite5b332cdb894baa96b7dc83b69140b3106fd5153 (patch)
tree7b63486da345af5d818d56d9b0f89f9a48cbf9d0 /gcc/tree-ssa-loop-prefetch.c
parent652c4c71a1b1f0c92b6a06305d82c354b72e16e0 (diff)
downloadgcc-e5b332cdb894baa96b7dc83b69140b3106fd5153.zip
gcc-e5b332cdb894baa96b7dc83b69140b3106fd5153.tar.gz
gcc-e5b332cdb894baa96b7dc83b69140b3106fd5153.tar.bz2
tree-parloops.c (parallelize_loops): Also consult the upper bound for the number of iterations.
2012-04-12 Richard Guenther <rguenther@suse.de> * tree-parloops.c (parallelize_loops): Also consult the upper bound for the number of iterations. * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise. (loop_prefetch_arrays): Likewise. From-SVN: r186373
Diffstat (limited to 'gcc/tree-ssa-loop-prefetch.c')
-rw-r--r--gcc/tree-ssa-loop-prefetch.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c
index eab1fff..19a6a22 100644
--- a/gcc/tree-ssa-loop-prefetch.c
+++ b/gcc/tree-ssa-loop-prefetch.c
@@ -1549,7 +1549,7 @@ determine_loop_nest_reuse (struct loop *loop, struct mem_ref_group *refs,
aloop = VEC_index (loop_p, vloops, i);
vol = estimated_stmt_executions_int (aloop);
- if (vol < 0)
+ if (vol == -1)
vol = expected_loop_iterations (aloop);
volume *= vol;
}
@@ -1801,6 +1801,8 @@ loop_prefetch_arrays (struct loop *loop)
ahead = (PREFETCH_LATENCY + time - 1) / time;
est_niter = estimated_stmt_executions_int (loop);
+ if (est_niter == -1)
+ est_niter = max_stmt_executions_int (loop);
/* Prefetching is not likely to be profitable if the trip count to ahead
ratio is too small. */