aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-expand.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2019-05-29 18:59:46 +0200
committerThomas Schwinge <thomas@codesourcery.com>2021-08-31 19:28:31 +0200
commit22e6b3270068faab64778c016f4b04f787120661 (patch)
tree758d284f09fa185333d7594adcaefba5e1886119 /gcc/omp-expand.c
parentb3aa3288a958a75744df256d70e7f8e90ccab724 (diff)
downloadgcc-22e6b3270068faab64778c016f4b04f787120661.zip
gcc-22e6b3270068faab64778c016f4b04f787120661.tar.gz
gcc-22e6b3270068faab64778c016f4b04f787120661.tar.bz2
[OMP] Standardize on 'omp_privatize_by_reference'
... instead of 'omp_is_reference' vs. 'lang_hooks.decls.omp_privatize_by_reference'. gcc/ * omp-general.h (omp_is_reference): Rename to... (omp_privatize_by_reference): ... this. Adjust all users... * omp-general.c: ... here, ... * gimplify.c: ... here, ... * omp-expand.c: ... here, ... * omp-low.c: ... here.
Diffstat (limited to 'gcc/omp-expand.c')
-rw-r--r--gcc/omp-expand.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/omp-expand.c b/gcc/omp-expand.c
index ecb8ee5..a0e9e61 100644
--- a/gcc/omp-expand.c
+++ b/gcc/omp-expand.c
@@ -4232,9 +4232,8 @@ expand_omp_for_generic (struct omp_region *region,
&& !OMP_CLAUSE_LINEAR_NO_COPYIN (c))
{
tree d = OMP_CLAUSE_DECL (c);
- bool is_ref = omp_is_reference (d);
tree t = d, a, dest;
- if (is_ref)
+ if (omp_privatize_by_reference (t))
t = build_simple_mem_ref_loc (OMP_CLAUSE_LOCATION (c), t);
tree type = TREE_TYPE (t);
if (POINTER_TYPE_P (type))
@@ -5236,9 +5235,8 @@ expand_omp_for_static_nochunk (struct omp_region *region,
&& !OMP_CLAUSE_LINEAR_NO_COPYIN (c))
{
tree d = OMP_CLAUSE_DECL (c);
- bool is_ref = omp_is_reference (d);
tree t = d, a, dest;
- if (is_ref)
+ if (omp_privatize_by_reference (t))
t = build_simple_mem_ref_loc (OMP_CLAUSE_LOCATION (c), t);
if (itercnt == NULL_TREE)
{
@@ -5952,9 +5950,8 @@ expand_omp_for_static_chunk (struct omp_region *region,
&& !OMP_CLAUSE_LINEAR_NO_COPYIN (c))
{
tree d = OMP_CLAUSE_DECL (c);
- bool is_ref = omp_is_reference (d);
tree t = d, a, dest;
- if (is_ref)
+ if (omp_privatize_by_reference (t))
t = build_simple_mem_ref_loc (OMP_CLAUSE_LOCATION (c), t);
tree type = TREE_TYPE (t);
if (POINTER_TYPE_P (type))