diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/gimplify.c | 6 | ||||
-rw-r--r-- | gcc/omp-low.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cilk-plus/pragma_simd_tests/compile/for1.c | 2 | ||||
-rw-r--r-- | gcc/tree-pretty-print.c | 21 | ||||
-rw-r--r-- | gcc/tree.c | 9 |
5 files changed, 43 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index e48c91e2cf6..eeaf6fa3e23 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -6345,6 +6345,9 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p, case OMP_CLAUSE_UNTIED: case OMP_CLAUSE_COLLAPSE: case OMP_CLAUSE_MERGEABLE: + case OMP_SIMD_CLAUSE_ASSERT: + case OMP_SIMD_CLAUSE_VECTORLENGTH: + case OMP_SIMD_CLAUSE_LINEAR: break; case OMP_CLAUSE_DEFAULT: @@ -6487,6 +6490,9 @@ gimplify_adjust_omp_clauses (tree *list_p) case OMP_CLAUSE_COLLAPSE: case OMP_CLAUSE_FINAL: case OMP_CLAUSE_MERGEABLE: + case OMP_SIMD_CLAUSE_ASSERT: + case OMP_SIMD_CLAUSE_VECTORLENGTH: + case OMP_SIMD_CLAUSE_LINEAR: break; default: diff --git a/gcc/omp-low.c b/gcc/omp-low.c index ef4ed5e98ac..ef5757d5bc6 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -1471,6 +1471,9 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) case OMP_CLAUSE_COLLAPSE: case OMP_CLAUSE_UNTIED: case OMP_CLAUSE_MERGEABLE: + case OMP_SIMD_CLAUSE_ASSERT: + case OMP_SIMD_CLAUSE_VECTORLENGTH: + case OMP_SIMD_CLAUSE_LINEAR: break; default: @@ -1523,6 +1526,9 @@ scan_sharing_clauses (tree clauses, omp_context *ctx) case OMP_CLAUSE_UNTIED: case OMP_CLAUSE_FINAL: case OMP_CLAUSE_MERGEABLE: + case OMP_SIMD_CLAUSE_ASSERT: + case OMP_SIMD_CLAUSE_VECTORLENGTH: + case OMP_SIMD_CLAUSE_LINEAR: break; default: diff --git a/gcc/testsuite/gcc.dg/cilk-plus/pragma_simd_tests/compile/for1.c b/gcc/testsuite/gcc.dg/cilk-plus/pragma_simd_tests/compile/for1.c index 1dd802440ee..7d85111409f 100644 --- a/gcc/testsuite/gcc.dg/cilk-plus/pragma_simd_tests/compile/for1.c +++ b/gcc/testsuite/gcc.dg/cilk-plus/pragma_simd_tests/compile/for1.c @@ -33,7 +33,7 @@ void foo() a[i] = i*2; #pragma simd - i = 5; /* { dg-error "for statement expected after pragma simd" } */ + i = 5; /* { dg-error "for statement expected" } */ // Initialization variables must be either integral or pointer types. struct S { diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index bad3cbb10d2..07146da14c8 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -431,6 +431,27 @@ dump_omp_clause (pretty_printer *buffer, tree clause, int spc, int flags) pp_string (buffer, "mergeable"); break; + case OMP_SIMD_CLAUSE_ASSERT: + pp_string (buffer, "simd_assert"); + break; + + case OMP_SIMD_CLAUSE_VECTORLENGTH: + pp_string (buffer, "simd_vectorlength("); + dump_generic_node (buffer, OMP_CLAUSE_VECLENGTH_EXPR (clause), + spc, flags, false); + pp_character (buffer, ')'); + break; + + case OMP_SIMD_CLAUSE_LINEAR: + pp_string (buffer, "simd_linear("); + dump_generic_node (buffer, OMP_CLAUSE_LINEAR_VAR (clause), + spc, flags, false); + pp_string (buffer, " : "); + dump_generic_node (buffer, OMP_CLAUSE_LINEAR_STEP (clause), + spc, flags, false); + pp_character (buffer, ')'); + break; + default: /* Should never happen. */ dump_generic_node (buffer, clause, spc, flags, false); diff --git a/gcc/tree.c b/gcc/tree.c index 0e45248b898..375326cf68e 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -10764,6 +10764,14 @@ walk_tree_1 (tree *tp, walk_tree_fn func, void *data, case OMP_CLAUSE: switch (OMP_CLAUSE_CODE (*tp)) { + case OMP_SIMD_CLAUSE_ASSERT: + break; + + case OMP_SIMD_CLAUSE_LINEAR: + WALK_SUBTREE (OMP_CLAUSE_LINEAR_VAR (*tp)); + WALK_SUBTREE (OMP_CLAUSE_LINEAR_STEP (*tp)); + WALK_SUBTREE_TAIL (OMP_CLAUSE_CHAIN (*tp)); + case OMP_CLAUSE_PRIVATE: case OMP_CLAUSE_SHARED: case OMP_CLAUSE_FIRSTPRIVATE: @@ -10773,6 +10781,7 @@ walk_tree_1 (tree *tp, walk_tree_fn func, void *data, case OMP_CLAUSE_IF: case OMP_CLAUSE_NUM_THREADS: case OMP_CLAUSE_SCHEDULE: + case OMP_SIMD_CLAUSE_VECTORLENGTH: WALK_SUBTREE (OMP_CLAUSE_OPERAND (*tp, 0)); /* FALLTHRU */ |