summaryrefslogtreecommitdiffstats
path: root/gcc/tree-parloops.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-12 10:13:22 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-12 10:13:22 +0000
commitb0b097b4dcb8d6b300e8c5f5101741dd1d9a2540 (patch)
tree7b63486da345af5d818d56d9b0f89f9a48cbf9d0 /gcc/tree-parloops.c
parentfee017b3be70565c42f30e18a84e3ae9fc20183b (diff)
downloadppe42-gcc-b0b097b4dcb8d6b300e8c5f5101741dd1d9a2540.tar.gz
ppe42-gcc-b0b097b4dcb8d6b300e8c5f5101741dd1d9a2540.zip
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186373 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-parloops.c')
-rw-r--r--gcc/tree-parloops.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index a7f4f9026b7..af43ed04c66 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -2192,12 +2192,15 @@ parallelize_loops (void)
header-copied loops correctly - see PR46886. */
|| !do_while_loop_p (loop))
continue;
+
estimated = estimated_stmt_executions_int (loop);
+ if (estimated == -1)
+ estimated = max_stmt_executions_int (loop);
/* FIXME: Bypass this check as graphite doesn't update the
- count and frequency correctly now. */
+ count and frequency correctly now. */
if (!flag_loop_parallelize_all
- && ((estimated !=-1
- && estimated <= (HOST_WIDE_INT) n_threads * MIN_PER_THREAD)
+ && ((estimated != -1
+ && estimated <= (HOST_WIDE_INT) n_threads * MIN_PER_THREAD)
/* Do not bother with loops in cold areas. */
|| optimize_loop_nest_for_size_p (loop)))
continue;
OpenPOWER on IntegriCloud