summaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2013-08-30 10:24:49 +0200
committerMarek Polacek <polacek@redhat.com>2013-08-30 10:24:49 +0200
commit1a986fd51aa96fbd0d66f4d52739356374912563 (patch)
treef5310553e69c8a35180556d9af7e66bdecac7f92 /gcc/tree.c
parent61fb959b676db6ca9ef0da335dfef0d8ec08e113 (diff)
parentf85c9de6ba5165bc1b941ceb09e4e8ffb1c7eb0f (diff)
downloadgcc-1a986fd51aa96fbd0d66f4d52739356374912563.tar.gz
Merge branch 'master' of git+ssh://gcc.gnu.org/git/gcc into ubsanubsan
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c28
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;