aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-04-24 23:17:32 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2014-04-24 23:17:32 +0200
commitf7468577f88cbfe33e0a5e9a2104a32f7e45c44f (patch)
tree58c72224fbdd8cfd29b26acb0ed228ad9bf56b58 /gcc/tree.h
parent2f7ac5ce576962dc7610d8cb3e0b107b05d77bbf (diff)
downloadgcc-f7468577f88cbfe33e0a5e9a2104a32f7e45c44f.zip
gcc-f7468577f88cbfe33e0a5e9a2104a32f7e45c44f.tar.gz
gcc-f7468577f88cbfe33e0a5e9a2104a32f7e45c44f.tar.bz2
tree.h (OMP_CLAUSE_LINEAR_GIMPLE_SEQ): Define.
* tree.h (OMP_CLAUSE_LINEAR_GIMPLE_SEQ): Define. * gimplify.c (omp_is_private): Change last argument's type to int. Only diagnose lastprivate if the simd argument is 1, only diagnose linear if the simd argument is 2. (gimplify_omp_for): Adjust omp_is_private callers. When adding lastprivate or private, add the clause to OMP_FOR_CLAUSES. Pass GOVD_EXPLICIT to omp_add_variable. For simd with collapse == 1 create OMP_CLAUSE_LINEAR rather than OMP_CLAUSE_PRIVATE for var. If var != decl and decl is in OMP_CLAUSE_LINEAR, gimplify decl increment to OMP_CLAUSE_LINEAR_GIMPLE_SEQ. * omp-low.c (scan_sharing_clauses, lower_lastprivate_clauses): Handle OMP_CLAUSE_LINEAR_GIMPLE_SEQ. * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Handle OMP_CLAUSE_LINEAR. * testsuite/libgomp.c/simd-7.c: New test. * testsuite/libgomp.c/simd-8.c: New test. * testsuite/libgomp.c/simd-9.c: New test. * testsuite/libgomp.c/loop-16.c: New test. From-SVN: r209760
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 9ad0b6f..ae4876d 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1330,6 +1330,9 @@ extern void protected_set_expr_location (tree, location_t);
#define OMP_CLAUSE_LINEAR_STEP(NODE) \
OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_LINEAR), 1)
+#define OMP_CLAUSE_LINEAR_GIMPLE_SEQ(NODE) \
+ (OMP_CLAUSE_CHECK (NODE))->omp_clause.gimple_reduction_init
+
#define OMP_CLAUSE_ALIGNED_ALIGNMENT(NODE) \
OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_ALIGNED), 1)