diff options
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/gcc/tree.c b/gcc/tree.c index 24779a6ba95..b469b97c867 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -236,6 +236,8 @@ unsigned const char omp_clause_num_ops[] = 4, /* OMP_CLAUSE_REDUCTION */ 1, /* OMP_CLAUSE_COPYIN */ 1, /* OMP_CLAUSE_COPYPRIVATE */ + 2, /* OMP_CLAUSE_LINEAR */ + 1, /* OMP_CLAUSE_UNIFORM */ 1, /* OMP_CLAUSE_IF */ 1, /* OMP_CLAUSE_NUM_THREADS */ 1, /* OMP_CLAUSE_SCHEDULE */ @@ -245,7 +247,9 @@ unsigned const char omp_clause_num_ops[] = 3, /* OMP_CLAUSE_COLLAPSE */ 0, /* OMP_CLAUSE_UNTIED */ 1, /* OMP_CLAUSE_FINAL */ - 0 /* OMP_CLAUSE_MERGEABLE */ + 0, /* OMP_CLAUSE_MERGEABLE */ + 1, /* OMP_CLAUSE_SAFELEN */ + 1, /* OMP_CLAUSE__SIMDUID_ */ }; const char * const omp_clause_code_name[] = @@ -258,6 +262,8 @@ const char * const omp_clause_code_name[] = "reduction", "copyin", "copyprivate", + "linear", + "uniform", "if", "num_threads", "schedule", @@ -267,7 +273,9 @@ const char * const omp_clause_code_name[] = "collapse", "untied", "final", - "mergeable" + "mergeable", + "safelen", + "_simduid_" }; @@ -9788,7 +9796,10 @@ build_common_tree_nodes (bool signed_char, bool short_double) } } -/* Modify DECL for given flags. */ +/* Modify DECL for given flags. + TM_PURE attribute is set only on types, so the function will modify + DECL's type when ECF_TM_PURE is used. */ + void set_call_expr_flags (tree decl, int flags) { @@ -9812,8 +9823,7 @@ set_call_expr_flags (tree decl, int flags) DECL_ATTRIBUTES (decl) = tree_cons (get_identifier ("leaf"), NULL, DECL_ATTRIBUTES (decl)); if ((flags & ECF_TM_PURE) && flag_tm) - DECL_ATTRIBUTES (decl) = tree_cons (get_identifier ("transaction_pure"), - NULL, DECL_ATTRIBUTES (decl)); + apply_tm_attr (decl, get_identifier ("transaction_pure")); /* Looping const or pure is implied by noreturn. There is currently no way to declare looping const or looping pure alone. */ gcc_assert (!(flags & ECF_LOOPING_CONST_OR_PURE) @@ -11066,6 +11076,9 @@ 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_CLAUSE_UNIFORM: + case OMP_CLAUSE_SAFELEN: + case OMP_CLAUSE__SIMDUID_: WALK_SUBTREE (OMP_CLAUSE_OPERAND (*tp, 0)); /* FALLTHRU */ @@ -11089,6 +11102,11 @@ walk_tree_1 (tree *tp, walk_tree_fn func, void *data, WALK_SUBTREE_TAIL (OMP_CLAUSE_CHAIN (*tp)); } + case OMP_CLAUSE_LINEAR: + WALK_SUBTREE (OMP_CLAUSE_DECL (*tp)); + WALK_SUBTREE (OMP_CLAUSE_OPERAND (*tp, 1)); + WALK_SUBTREE_TAIL (OMP_CLAUSE_CHAIN (*tp)); + case OMP_CLAUSE_REDUCTION: { int i; |