aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@redhat.com>2006-01-26 02:53:01 +0000
committerDiego Novillo <dnovillo@gcc.gnu.org>2006-01-25 21:53:01 -0500
commitaaf46ef9792bbc562175b606bd1c3f225ea56924 (patch)
tree6b35ae8b0d86fdf04a2e7d85a967d4e8e0d276fd /gcc/omp-low.c
parentd89b36e1a2179df76edf089cc2a11f5f3409cb72 (diff)
downloadgcc-aaf46ef9792bbc562175b606bd1c3f225ea56924.zip
gcc-aaf46ef9792bbc562175b606bd1c3f225ea56924.tar.gz
gcc-aaf46ef9792bbc562175b606bd1c3f225ea56924.tar.bz2
re PR middle-end/25886 (up to 256 tree codes for Objective-C++)
* 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. From-SVN: r110243
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 44f1b7e..93ceb8e 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -154,7 +154,7 @@ static tree
find_omp_clause (tree clauses, enum tree_code kind)
{
for (; clauses ; clauses = OMP_CLAUSE_CHAIN (clauses))
- if (TREE_CODE (clauses) == kind)
+ if (OMP_CLAUSE_CODE (clauses) == kind)
return clauses;
return NULL_TREE;
@@ -242,7 +242,7 @@ extract_omp_for_data (tree for_stmt, struct omp_for_data *fd)
fd->chunk_size = NULL_TREE;
for (t = OMP_FOR_CLAUSES (for_stmt); t ; t = OMP_CLAUSE_CHAIN (t))
- switch (TREE_CODE (t))
+ switch (OMP_CLAUSE_CODE (t))
{
case OMP_CLAUSE_NOWAIT:
fd->have_nowait = true;
@@ -943,7 +943,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx)
{
bool by_ref;
- switch (TREE_CODE (c))
+ switch (OMP_CLAUSE_CODE (c))
{
case OMP_CLAUSE_PRIVATE:
decl = OMP_CLAUSE_DECL (c);
@@ -966,7 +966,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx)
break;
}
/* We don't need to copy const scalar vars back. */
- TREE_SET_CODE (c, OMP_CLAUSE_FIRSTPRIVATE);
+ OMP_CLAUSE_SET_CODE (c, OMP_CLAUSE_FIRSTPRIVATE);
goto do_private;
case OMP_CLAUSE_LASTPRIVATE:
@@ -1009,7 +1009,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx)
case OMP_CLAUSE_NUM_THREADS:
case OMP_CLAUSE_SCHEDULE:
if (ctx->outer)
- scan_omp (&TREE_OPERAND (c, 0), ctx->outer);
+ scan_omp (&OMP_CLAUSE_OPERAND (c, 0), ctx->outer);
break;
case OMP_CLAUSE_NOWAIT:
@@ -1023,7 +1023,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx)
for (c = clauses; c; c = OMP_CLAUSE_CHAIN (c))
{
- switch (TREE_CODE (c))
+ switch (OMP_CLAUSE_CODE (c))
{
case OMP_CLAUSE_LASTPRIVATE:
/* Let the corresponding firstprivate clause create
@@ -1039,9 +1039,9 @@ scan_sharing_clauses (tree clauses, omp_context *ctx)
if (is_variable_sized (decl))
install_var_local (decl, ctx);
fixup_remapped_decl (decl, ctx,
- TREE_CODE (c) == OMP_CLAUSE_PRIVATE
+ OMP_CLAUSE_CODE (c) == OMP_CLAUSE_PRIVATE
&& OMP_CLAUSE_PRIVATE_DEBUG (c));
- if (TREE_CODE (c) == OMP_CLAUSE_REDUCTION
+ if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_REDUCTION
&& OMP_CLAUSE_REDUCTION_PLACEHOLDER (c))
scan_array_reductions = true;
break;
@@ -1068,7 +1068,7 @@ scan_sharing_clauses (tree clauses, omp_context *ctx)
if (scan_array_reductions)
for (c = clauses; c; c = OMP_CLAUSE_CHAIN (c))
- if (TREE_CODE (c) == OMP_CLAUSE_REDUCTION
+ if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_REDUCTION
&& OMP_CLAUSE_REDUCTION_PLACEHOLDER (c))
{
scan_omp (&OMP_CLAUSE_REDUCTION_INIT (c), ctx);
@@ -1525,7 +1525,7 @@ lower_rec_input_clauses (tree clauses, tree *ilist, tree *dlist,
{
for (c = clauses; c ; c = OMP_CLAUSE_CHAIN (c))
{
- enum tree_code c_kind = TREE_CODE (c);
+ enum omp_clause_code c_kind = OMP_CLAUSE_CODE (c);
tree var, new_var;
bool by_ref;
@@ -1619,7 +1619,7 @@ lower_rec_input_clauses (tree clauses, tree *ilist, tree *dlist,
else if (pass != 0)
continue;
- switch (TREE_CODE (c))
+ switch (OMP_CLAUSE_CODE (c))
{
case OMP_CLAUSE_SHARED:
/* Set up the DECL_VALUE_EXPR for shared variables now. This
@@ -1753,7 +1753,7 @@ lower_lastprivate_clauses (tree clauses, tree predicate, tree *stmt_list,
{
tree var, new_var;
- if (TREE_CODE (c) != OMP_CLAUSE_LASTPRIVATE)
+ if (OMP_CLAUSE_CODE (c) != OMP_CLAUSE_LASTPRIVATE)
continue;
var = OMP_CLAUSE_DECL (c);
@@ -1786,7 +1786,7 @@ lower_reduction_clauses (tree clauses, tree *stmt_list, omp_context *ctx)
/* First see if there is exactly one reduction clause. Use OMP_ATOMIC
update in that case, otherwise use a lock. */
for (c = clauses; c && count < 2; c = OMP_CLAUSE_CHAIN (c))
- if (TREE_CODE (c) == OMP_CLAUSE_REDUCTION)
+ if (OMP_CLAUSE_CODE (c) == OMP_CLAUSE_REDUCTION)
{
if (OMP_CLAUSE_REDUCTION_PLACEHOLDER (c))
{
@@ -1805,7 +1805,7 @@ lower_reduction_clauses (tree clauses, tree *stmt_list, omp_context *ctx)
tree var, ref, new_var;
enum tree_code code;
- if (TREE_CODE (c) != OMP_CLAUSE_REDUCTION)
+ if (OMP_CLAUSE_CODE (c) != OMP_CLAUSE_REDUCTION)
continue;
var = OMP_CLAUSE_DECL (c);
@@ -1878,7 +1878,7 @@ lower_copyprivate_clauses (tree clauses, tree *slist, tree *rlist,
tree var, ref, x;
bool by_ref;
- if (TREE_CODE (c) != OMP_CLAUSE_COPYPRIVATE)
+ if (OMP_CLAUSE_CODE (c) != OMP_CLAUSE_COPYPRIVATE)
continue;
var = OMP_CLAUSE_DECL (c);
@@ -1915,7 +1915,7 @@ lower_send_clauses (tree clauses, tree *ilist, tree *olist, omp_context *ctx)
tree val, ref, x, var;
bool by_ref, do_in = false, do_out = false;
- switch (TREE_CODE (c))
+ switch (OMP_CLAUSE_CODE (c))
{
case OMP_CLAUSE_FIRSTPRIVATE:
case OMP_CLAUSE_COPYIN:
@@ -1934,7 +1934,7 @@ lower_send_clauses (tree clauses, tree *ilist, tree *olist, omp_context *ctx)
continue;
by_ref = use_pointer_for_field (val, false);
- switch (TREE_CODE (c))
+ switch (OMP_CLAUSE_CODE (c))
{
case OMP_CLAUSE_FIRSTPRIVATE:
case OMP_CLAUSE_COPYIN: