aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-general.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-05-30 23:19:39 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2019-05-30 23:19:39 +0200
commit8221c30b09f406fdab07df228e4bad4d3da7b1fe (patch)
tree74b2d1d914fc19d40c61df14f7444e8e4b9c8550 /gcc/omp-general.c
parent00a0e1f5a3bd62519e4742477e11a32c7df2db98 (diff)
downloadgcc-8221c30b09f406fdab07df228e4bad4d3da7b1fe.zip
gcc-8221c30b09f406fdab07df228e4bad4d3da7b1fe.tar.gz
gcc-8221c30b09f406fdab07df228e4bad4d3da7b1fe.tar.bz2
gimplify.c (enum gimplify_omp_var_data): Add GOVD_CONDTEMP.
* gimplify.c (enum gimplify_omp_var_data): Add GOVD_CONDTEMP. (gimplify_adjust_omp_clauses_1): Handle GOVD_CONDTEMP. (gimplify_omp_for): If worksharing loop with lastprivate conditional is nested inside of parallel region, add _condtemp_ clause to both. * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Ignore OMP_CLAUSE__CONDTEMP_ instead of assertion failure. * omp-general.h (struct omp_for_data): Add have_pointer_condtemp member. * omp-general.c (omp_extract_for_data): Compute it. * omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE__CONDTEMP_. (lower_rec_input_clauses): Likewise. (lower_lastprivate_conditional_clauses): If OMP_CLAUSE__CONDTEMP_ clause is already present, just add one further one after it. (lower_lastprivate_clauses): Handle cond_ptr with array type. (lower_send_shared_vars): Clear _condtemp_ vars. (lower_omp_1) <case GIMPLE_ASSIGN>: Handle target data like critical or section or taskgroup. * omp-expand.c (determine_parallel_type): Disallow combining only if first OMP_CLAUSE__CONDTEMP_ has pointer type. Disallow combining of parallel sections if OMP_CLAUSE__CONDTEMP_ is present. (expand_omp_for_generic, expand_omp_for_static_nochunk, expand_omp_for_static_chunk, expand_omp_for): Use fd->have_pointer_condtemp instead of fd->lastprivate_conditional to determine if a special set of API routines are needed and if condtemp needs to be initialized, while always initialize cond_var if fd->lastprivate_conditional is non-zero. From-SVN: r271791
Diffstat (limited to 'gcc/omp-general.c')
-rw-r--r--gcc/omp-general.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/omp-general.c b/gcc/omp-general.c
index baab761..c737666 100644
--- a/gcc/omp-general.c
+++ b/gcc/omp-general.c
@@ -168,6 +168,7 @@ omp_extract_for_data (gomp_for *for_stmt, struct omp_for_data *fd,
fd->have_nowait = distribute || simd;
fd->have_ordered = false;
fd->have_reductemp = false;
+ fd->have_pointer_condtemp = false;
fd->lastprivate_conditional = 0;
fd->tiling = NULL_TREE;
fd->collapse = 1;
@@ -226,6 +227,10 @@ omp_extract_for_data (gomp_for *for_stmt, struct omp_for_data *fd,
if (OMP_CLAUSE_LASTPRIVATE_CONDITIONAL (t))
fd->lastprivate_conditional++;
break;
+ case OMP_CLAUSE__CONDTEMP_:
+ if (POINTER_TYPE_P (TREE_TYPE (OMP_CLAUSE_DECL (t))))
+ fd->have_pointer_condtemp = true;
+ break;
default:
break;
}