aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 7c92c94..cb00758 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -3372,13 +3372,12 @@ maybe_lookup_decl_in_outer_ctx (tree decl, omp_context *ctx)
}
-/* Construct the initialization value for reduction CLAUSE. */
+/* Construct the initialization value for reduction operation OP. */
tree
-omp_reduction_init (tree clause, tree type)
+omp_reduction_init_op (location_t loc, enum tree_code op, tree type)
{
- location_t loc = OMP_CLAUSE_LOCATION (clause);
- switch (OMP_CLAUSE_REDUCTION_CODE (clause))
+ switch (op)
{
case PLUS_EXPR:
case MINUS_EXPR:
@@ -3451,6 +3450,15 @@ omp_reduction_init (tree clause, tree type)
}
}
+/* Construct the initialization value for reduction CLAUSE. */
+
+tree
+omp_reduction_init (tree clause, tree type)
+{
+ return omp_reduction_init_op (OMP_CLAUSE_LOCATION (clause),
+ OMP_CLAUSE_REDUCTION_CODE (clause), type);
+}
+
/* Return alignment to be assumed for var in CLAUSE, which should be
OMP_CLAUSE_ALIGNED. */