diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-26 02:53:01 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-01-26 02:53:01 +0000 |
commit | 55d6e7cdb772110d47094c1ffd1a4a2e7c55b3ea (patch) | |
tree | 6b35ae8b0d86fdf04a2e7d85a967d4e8e0d276fd /gcc/tree-nested.c | |
parent | e20e49db580a259576a778c70d0360c2fdfe0a1c (diff) | |
download | gcc-55d6e7cdb772110d47094c1ffd1a4a2e7c55b3ea.tar.gz |
* tree.h (TREE_RANGE_CHECK): Fix range predicate.
(TREE_BLOCK): Add call to EXPR_CHECK.
PR 25886
* tree-dump.c (dequeue_and_dump): Handle OMP_CLAUSE.
* tree-pretty-print.c (dump_omp_clause): Extract from ...
(dump_omp_clauses): ... here.
(dump_generic_node): Handle OMP_CLAUSE.
* tree.c (omp_clause_num_ops): New.
(omp_clause_code_name): New.
(tree_code_size): Handle OMP_CLAUSE.
(tree_size): Likewise.
(make_node): Document handling of OMP_CLAUSE.
(tree_node_structure): Handle OMP_CLAUSE.
(omp_clause_check_failed): New.
(omp_clause_range_check_failed): New.
(omp_clause_operand_check_failed): New.
(build_omp_clause): New.
(walk_tree): Adjust handling of OMP_CLAUSE_* nodes.
* tree.h (enum omp_clause_code): Declare.
(OMP_CLAUSE_SUBCODE): Define.
(OMP_CLAUSE_RANGE_CHECK): Define.
(OMP_CLAUSE_ELT_CHECK): Define.
(omp_clause_check_failed): Declare.
(omp_clause_operand_check_failed): Declare.
(omp_clause_range_check_failed): Declare.
(OMP_CLAUSE_CHAIN): Do not use TREE_RANGE_CHECK.
(OMP_CLAUSE_OPERAND): Use OMP_CLAUSE_RANGE_CHECK.
(OMP_CLAUSE_PRIVATE_DEBUG): Use OMP_CLAUSE_SUBCODE_CHECK.
(OMP_CLAUSE_LASTPRIVATE): Likewise.
(OMP_CLAUSE_IF_EXPR): Likewise.
(OMP_CLAUSE_NUM_THREADS_EXPR): Likewise.
(OMP_CLAUSE_SCHEDULE_CHUNK_EXPR): Likewise.
(OMP_CLAUSE_REDUCTION_CODE): Likewise.
(OMP_CLAUSE_REDUCTION_INIT): Likewise.
(OMP_CLAUSE_REDUCTION_MERGE): Likewise.
(OMP_CLAUSE_REDUCTION_PLACEHOLDER): Likewise.
Use tree_node.omp_clause.subcode instead of TREE_COMPLEXITY.
(OMP_CLAUSE_SCHEDULE_KIND): Likewise.
(OMP_CLAUSE_DEFAULT_KIND): Likewise.
(OMP_CLAUSE_CODE): Define.
(OMP_CLAUSE_SET_CODE): Define.
(OMP_CLAUSE_CODE): Define.
(OMP_CLAUSE_OPERAND): Define.
(struct tree_omp_clause): Declare.
(union tree_node): Add field 'omp_clause'.
* treestruct.def (TS_OMP_CLAUSE): Define.
* tree.def (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_SHARED
OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_LASTPRIVATE,
OMP_CLAUSE_REDUCTION, OMP_CLAUSE_COPYIN,
OMP_CLAUSE_COPYPRIVATE, OMP_CLAUSE_IF,
OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE,
OMP_CLAUSE_NOWAIT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_DEFAULT): Remove.
(OMP_CLAUSE): Define.
* print-tree.c (print_node): Handle OMP_CLAUSE.
* omp-low.c: Adapt all uses of OMP_CLAUSE_* nodes.
* c-typeck.c: Likewise.
* gimplify.c: Likewise.
* c-omp.c: Likewise.
* tree-nested.c: Likewise.
* tree-inline.c: Likewise.
* c-parser.c: Likewise.
* gimple-low.c (lower_omp_directive): Do not set TREE_BLOCK on
clauses.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110243 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-nested.c')
-rw-r--r-- | gcc/tree-nested.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c index 4c65a1dc227..886681983ee 100644 --- a/gcc/tree-nested.c +++ b/gcc/tree-nested.c @@ -1034,9 +1034,10 @@ convert_nonlocal_reference (tree *tp, int *walk_subtrees, void *data) save_suppress = info->suppress_expansion; if (convert_nonlocal_omp_clauses (&OMP_PARALLEL_CLAUSES (t), wi)) { - tree c; - c = get_chain_decl (info); - c = build1 (OMP_CLAUSE_FIRSTPRIVATE, void_type_node, c); + tree c, decl; + decl = get_chain_decl (info); + c = build_omp_clause (OMP_CLAUSE_FIRSTPRIVATE); + OMP_CLAUSE_DECL (c) = decl; OMP_CLAUSE_CHAIN (c) = OMP_PARALLEL_CLAUSES (t); OMP_PARALLEL_CLAUSES (t) = c; } @@ -1094,7 +1095,7 @@ convert_nonlocal_omp_clauses (tree *pclauses, struct walk_stmt_info *wi) for (clause = *pclauses; clause ; clause = OMP_CLAUSE_CHAIN (clause)) { - switch (TREE_CODE (clause)) + switch (OMP_CLAUSE_CODE (clause)) { case OMP_CLAUSE_PRIVATE: case OMP_CLAUSE_FIRSTPRIVATE: @@ -1119,7 +1120,8 @@ convert_nonlocal_omp_clauses (tree *pclauses, struct walk_stmt_info *wi) case OMP_CLAUSE_NUM_THREADS: wi->val_only = true; wi->is_lhs = false; - convert_nonlocal_reference (&TREE_OPERAND (clause, 0), &dummy, wi); + convert_nonlocal_reference (&OMP_CLAUSE_OPERAND (clause, 0), &dummy, + wi); break; case OMP_CLAUSE_NOWAIT: @@ -1317,7 +1319,8 @@ convert_local_reference (tree *tp, int *walk_subtrees, void *data) { tree c; (void) get_frame_type (info); - c = build1 (OMP_CLAUSE_SHARED, void_type_node, info->frame_decl); + c = build_omp_clause (OMP_CLAUSE_SHARED); + OMP_CLAUSE_DECL (c) = info->frame_decl; OMP_CLAUSE_CHAIN (c) = OMP_PARALLEL_CLAUSES (t); OMP_PARALLEL_CLAUSES (t) = c; } @@ -1375,7 +1378,7 @@ convert_local_omp_clauses (tree *pclauses, struct walk_stmt_info *wi) for (clause = *pclauses; clause ; clause = OMP_CLAUSE_CHAIN (clause)) { - switch (TREE_CODE (clause)) + switch (OMP_CLAUSE_CODE (clause)) { case OMP_CLAUSE_PRIVATE: case OMP_CLAUSE_FIRSTPRIVATE: @@ -1406,7 +1409,7 @@ convert_local_omp_clauses (tree *pclauses, struct walk_stmt_info *wi) case OMP_CLAUSE_NUM_THREADS: wi->val_only = true; wi->is_lhs = false; - convert_local_reference (&TREE_OPERAND (clause, 0), &dummy, wi); + convert_local_reference (&OMP_CLAUSE_OPERAND (clause, 0), &dummy, wi); break; case OMP_CLAUSE_NOWAIT: |