summaryrefslogtreecommitdiff
path: root/libgomp/env.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-22 20:39:25 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-22 20:39:25 +0000
commit31712e83a5cbef7bb3af1ad1a7ab271de5c9c4b4 (patch)
treec2cc34ab7a462c76b41fcd457b365ba285e84685 /libgomp/env.c
parent777e67996082e503858a25af4fb4c9d6b6b3d546 (diff)
downloadgcc-31712e83a5cbef7bb3af1ad1a7ab271de5c9c4b4.tar.gz
PR libgomp/49490
* omp-low.c (expand_omp_for_static_nochunk): Only use n ceil/ nthreads size for the first n % nthreads threads in the team instead of all threads except for the last few ones which get less work or none at all. * iter.c (gomp_iter_static_next): For chunk size 0 only use n ceil/ nthreads size for the first n % nthreads threads in the team instead of all threads except for the last few ones which get less work or none at all. * iter_ull.c (gomp_iter_ull_static_next): Likewise. * env.c (parse_schedule): If OMP_SCHEDULE doesn't have chunk argument, set run_sched_modifier to 0 for static resp. 1 for other kinds. If chunk argument is 0 and not static, set value to 1. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175315 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/env.c')
-rw-r--r--libgomp/env.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libgomp/env.c b/libgomp/env.c
index 92fa8c37497..0ca9a1c9e00 100644
--- a/libgomp/env.c
+++ b/libgomp/env.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
+/* Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@redhat.com>.
@@ -108,7 +108,11 @@ parse_schedule (void)
while (isspace ((unsigned char) *env))
++env;
if (*env == '\0')
- return;
+ {
+ gomp_global_icv.run_sched_modifier
+ = gomp_global_icv.run_sched_var != GFS_STATIC;
+ return;
+ }
if (*env++ != ',')
goto unknown;
while (isspace ((unsigned char) *env))
@@ -129,6 +133,8 @@ parse_schedule (void)
if ((int)value != value)
goto invalid;
+ if (value == 0 && gomp_global_icv.run_sched_var != GFS_STATIC)
+ value = 1;
gomp_global_icv.run_sched_modifier = value;
return;