aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-parser.c
diff options
context:
space:
mode:
authorCesar Philippidis <cesar@codesourcery.com>2016-05-02 11:49:15 -0700
committerCesar Philippidis <cesar@gcc.gnu.org>2016-05-02 11:49:15 -0700
commit778864283e64809939a20aa70ee50c3d80fe10cf (patch)
tree8fa1fd05fa3252d1c4fa5970e67bc5debade2f19 /gcc/c/c-parser.c
parent474e0129ac2e906caa667eb7a9a7682afeec41aa (diff)
downloadgcc-778864283e64809939a20aa70ee50c3d80fe10cf.zip
gcc-778864283e64809939a20aa70ee50c3d80fe10cf.tar.gz
gcc-778864283e64809939a20aa70ee50c3d80fe10cf.tar.bz2
c-common.h (enum c_omp_region_type): Define.
gcc/c-family/ * c-common.h (enum c_omp_region_type): Define. gcc/c/ * c-parser.c (c_parser_oacc_all_clauses): Update call to c_finish_omp_clauses. (c_parser_omp_all_clauses): Likewise. (c_parser_oacc_cache): Likewise. (c_parser_oacc_loop): Likewise. (omp_split_clauses): Likewise. (c_parser_omp_declare_target): Likewise. (c_parser_cilk_all_clauses): Likewise. (c_parser_cilk_for): Likewise. * c-typeck.c (c_finish_omp_clauses): Replace bool arguments is_omp, declare_simd, and is_cilk with enum c_omp_region_type ort. gcc/cp/ * cp-tree.h (finish_omp_clauses): Update prototype. * parser.c (cp_parser_oacc_all_clauses): Update call to finish_omp_clauses. (cp_parser_omp_all_clauses): Likewise. (cp_parser_omp_for_loop): Likewise. (cp_omp_split_clauses): Likewise. (cp_parser_oacc_cache): Likewise. (cp_parser_oacc_loop): Likewise. (cp_parser_omp_declare_target): (cp_parser_cilk_simd_all_clauses): Likewise. (cp_parser_cilk_for): Likewise. * pt.c (tsubst_omp_clauses): Replace allow_fields and declare_simd arguments with enum c_omp_region_type ort. (tsubst_omp_clauses): Update calls to finish_omp_clauses. (tsubst_omp_attribute): Update calls to tsubst_omp_clauses. (tsubst_omp_for_iterator): Update calls to finish_omp_clauses. (tsubst_expr): Update calls to tsubst_omp_clauses. * semantics.c (finish_omp_clauses): Replace bool arguments allow_fields, declare_simd, and is_cilk with bitmask ort. (finish_omp_for): Update call to finish_omp_clauses. From-SVN: r235780
Diffstat (limited to 'gcc/c/c-parser.c')
-rw-r--r--gcc/c/c-parser.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 832b8dd..701ab45 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -13183,7 +13183,7 @@ c_parser_oacc_all_clauses (c_parser *parser, omp_clause_mask mask,
c_parser_skip_to_pragma_eol (parser);
if (finish_p)
- return c_finish_omp_clauses (clauses, false);
+ return c_finish_omp_clauses (clauses, C_ORT_ACC);
return clauses;
}
@@ -13468,8 +13468,8 @@ c_parser_omp_all_clauses (c_parser *parser, omp_clause_mask mask,
if (finish_p)
{
if ((mask & (OMP_CLAUSE_MASK_1 << PRAGMA_OMP_CLAUSE_UNIFORM)) != 0)
- return c_finish_omp_clauses (clauses, true, true);
- return c_finish_omp_clauses (clauses, true);
+ return c_finish_omp_clauses (clauses, C_ORT_OMP_DECLARE_SIMD);
+ return c_finish_omp_clauses (clauses, C_ORT_OMP);
}
return clauses;
@@ -13503,7 +13503,7 @@ c_parser_oacc_cache (location_t loc, c_parser *parser)
tree stmt, clauses;
clauses = c_parser_omp_var_list_parens (parser, OMP_CLAUSE__CACHE_, NULL);
- clauses = c_finish_omp_clauses (clauses, false);
+ clauses = c_finish_omp_clauses (clauses, C_ORT_ACC);
c_parser_skip_to_pragma_eol (parser);
@@ -13839,9 +13839,9 @@ c_parser_oacc_loop (location_t loc, c_parser *parser, char *p_name,
{
clauses = c_oacc_split_loop_clauses (clauses, cclauses, is_parallel);
if (*cclauses)
- *cclauses = c_finish_omp_clauses (*cclauses, false);
+ *cclauses = c_finish_omp_clauses (*cclauses, C_ORT_ACC);
if (clauses)
- clauses = c_finish_omp_clauses (clauses, false);
+ clauses = c_finish_omp_clauses (clauses, C_ORT_ACC);
}
tree block = c_begin_compound_stmt (true);
@@ -15015,7 +15015,7 @@ omp_split_clauses (location_t loc, enum tree_code code,
c_omp_split_clauses (loc, code, mask, clauses, cclauses);
for (i = 0; i < C_OMP_CLAUSE_SPLIT_COUNT; i++)
if (cclauses[i])
- cclauses[i] = c_finish_omp_clauses (cclauses[i], true);
+ cclauses[i] = c_finish_omp_clauses (cclauses[i], C_ORT_OMP);
}
/* OpenMP 4.0:
@@ -16546,7 +16546,7 @@ c_parser_omp_declare_target (c_parser *parser)
{
clauses = c_parser_omp_var_list_parens (parser, OMP_CLAUSE_TO_DECLARE,
clauses);
- clauses = c_finish_omp_clauses (clauses, true);
+ clauses = c_finish_omp_clauses (clauses, C_ORT_OMP);
c_parser_skip_to_pragma_eol (parser);
}
else
@@ -17515,7 +17515,7 @@ c_parser_cilk_all_clauses (c_parser *parser)
saw_error:
c_parser_skip_to_pragma_eol (parser);
- return c_finish_omp_clauses (clauses, false, false, true);
+ return c_finish_omp_clauses (clauses, C_ORT_CILK);
}
/* This function helps parse the grainsize pragma for a _Cilk_for statement.
@@ -17597,7 +17597,7 @@ c_parser_cilk_for (c_parser *parser, tree grain, bool *if_p)
tree clauses = build_omp_clause (EXPR_LOCATION (grain), OMP_CLAUSE_SCHEDULE);
OMP_CLAUSE_SCHEDULE_KIND (clauses) = OMP_CLAUSE_SCHEDULE_CILKFOR;
OMP_CLAUSE_SCHEDULE_CHUNK_EXPR (clauses) = grain;
- clauses = c_finish_omp_clauses (clauses, false);
+ clauses = c_finish_omp_clauses (clauses, C_ORT_CILK);
tree block = c_begin_compound_stmt (true);
tree sb = push_stmt_list ();
@@ -17663,7 +17663,7 @@ c_parser_cilk_for (c_parser *parser, tree grain, bool *if_p)
OMP_CLAUSE_OPERAND (c, 0)
= cilk_for_number_of_iterations (omp_for);
OMP_CLAUSE_CHAIN (c) = clauses;
- OMP_PARALLEL_CLAUSES (omp_par) = c_finish_omp_clauses (c, true);
+ OMP_PARALLEL_CLAUSES (omp_par) = c_finish_omp_clauses (c, C_ORT_CILK);
add_stmt (omp_par);
}