diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-03-13 10:02:13 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2008-03-13 10:02:13 +0000 |
commit | 4c2cf12b7979cbb67187b58146005c0e6e41dcbe (patch) | |
tree | d75a4bdd42cba6ddf49cbfc62ab7dfd84facbf46 | |
parent | 40dd425bfddf918e4dbd35828af68d1c2846347e (diff) |
* omp-low.c (use_pointer_for_field): Change first argument's type
from const_tree to tree. Clarify comment.
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gomp-3_0-branch@133166 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog.gomp | 5 | ||||
-rw-r--r-- | gcc/omp-low.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog.gomp b/gcc/ChangeLog.gomp index 65b99089ef1..7adbcc079c8 100644 --- a/gcc/ChangeLog.gomp +++ b/gcc/ChangeLog.gomp @@ -1,3 +1,8 @@ +2008-03-13 Jakub Jelinek <jakub@redhat.com> + + * omp-low.c (use_pointer_for_field): Change first argument's type + from const_tree to tree. Clarify comment. + 2008-03-12 Jakub Jelinek <jakub@redhat.com> * tree.h (OMP_TASK_EXPLICIT_START): Define. diff --git a/gcc/omp-low.c b/gcc/omp-low.c index fe65ca68267..f55b0f9b723 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -587,7 +587,7 @@ maybe_lookup_field (tree var, omp_context *ctx) the parallel context if DECL is to be shared. */ static bool -use_pointer_for_field (const_tree decl, omp_context *shared_ctx) +use_pointer_for_field (tree decl, omp_context *shared_ctx) { if (AGGREGATE_TYPE_P (TREE_TYPE (decl))) return true; @@ -643,7 +643,10 @@ use_pointer_for_field (const_tree decl, omp_context *shared_ctx) } } - /* For tasks copy-out is not possible, so force by_ref. */ + /* For tasks avoid using copy-in/out, unless they are readonly + (in which case just copy-in is used). As tasks can be + deferred or executed in different thread, when GOMP_task + returns, the task hasn't necessarily terminated. */ if (!TREE_READONLY (decl) && TREE_CODE (shared_ctx->stmt) == OMP_TASK) { |