aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c54
1 files changed, 17 insertions, 37 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 11315d9..f9e86d0 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -7106,69 +7106,49 @@ finish_omp_structured_block (tree block)
return do_poplevel (block);
}
-/* Generate OACC_DATA, with CLAUSES and BLOCK as its compound
- statement. LOC is the location of the OACC_DATA. */
+/* Similarly, except force the retention of the BLOCK. */
tree
-finish_oacc_data (tree clauses, tree block)
+begin_omp_parallel (void)
{
- tree stmt;
-
- block = finish_omp_structured_block (block);
-
- stmt = make_node (OACC_DATA);
- TREE_TYPE (stmt) = void_type_node;
- OACC_DATA_CLAUSES (stmt) = clauses;
- OACC_DATA_BODY (stmt) = block;
-
- return add_stmt (stmt);
+ keep_next_level (true);
+ return begin_omp_structured_block ();
}
-/* Generate OACC_KERNELS, with CLAUSES and BLOCK as its compound
- statement. LOC is the location of the OACC_KERNELS. */
+/* Generate OACC_DATA, with CLAUSES and BLOCK as its compound
+ statement. */
tree
-finish_oacc_kernels (tree clauses, tree block)
+finish_oacc_data (tree clauses, tree block)
{
tree stmt;
block = finish_omp_structured_block (block);
- stmt = make_node (OACC_KERNELS);
+ stmt = make_node (OACC_DATA);
TREE_TYPE (stmt) = void_type_node;
- OACC_KERNELS_CLAUSES (stmt) = clauses;
- OACC_KERNELS_BODY (stmt) = block;
+ OACC_DATA_CLAUSES (stmt) = clauses;
+ OACC_DATA_BODY (stmt) = block;
return add_stmt (stmt);
}
-/* Generate OACC_PARALLEL, with CLAUSES and BLOCK as its compound
- statement. LOC is the location of the OACC_PARALLEL. */
+/* Generate OMP construct CODE, with BODY and CLAUSES as its compound
+ statement. */
tree
-finish_oacc_parallel (tree clauses, tree block)
+finish_omp_construct (enum tree_code code, tree body, tree clauses)
{
- tree stmt;
-
- block = finish_omp_structured_block (block);
+ body = finish_omp_structured_block (body);
- stmt = make_node (OACC_PARALLEL);
+ tree stmt = make_node (code);
TREE_TYPE (stmt) = void_type_node;
- OACC_PARALLEL_CLAUSES (stmt) = clauses;
- OACC_PARALLEL_BODY (stmt) = block;
+ OMP_BODY (stmt) = body;
+ OMP_CLAUSES (stmt) = clauses;
return add_stmt (stmt);
}
-/* Similarly, except force the retention of the BLOCK. */
-
-tree
-begin_omp_parallel (void)
-{
- keep_next_level (true);
- return begin_omp_structured_block ();
-}
-
tree
finish_omp_parallel (tree clauses, tree body)
{