return (int) axis;
}
+/* Build COMPONENT_REF and set TREE_THIS_VOLATILE and TREE_READONLY on it
+ as appropriate. */
+
+tree
+omp_build_component_ref (tree obj, tree field)
+{
+ tree ret = build3 (COMPONENT_REF, TREE_TYPE (field), obj, field, NULL);
+ if (TREE_THIS_VOLATILE (field))
+ TREE_THIS_VOLATILE (ret) |= 1;
+ if (TREE_READONLY (field))
+ TREE_READONLY (ret) |= 1;
+ return ret;
+}
+
#include "gt-omp-general.h"
return omp_copy_decl_2 (var, DECL_NAME (var), TREE_TYPE (var), ctx);
}
-/* Build COMPONENT_REF and set TREE_THIS_VOLATILE and TREE_READONLY on it
- as appropriate. */
-/* See also 'gcc/omp-oacc-neuter-broadcast.cc:oacc_build_component_ref'. */
-
-static tree
-omp_build_component_ref (tree obj, tree field)
-{
- tree ret = build3 (COMPONENT_REF, TREE_TYPE (field), obj, field, NULL);
- if (TREE_THIS_VOLATILE (field))
- TREE_THIS_VOLATILE (ret) |= 1;
- if (TREE_READONLY (field))
- TREE_READONLY (ret) |= 1;
- return ret;
-}
-
/* Build tree nodes to access the field for VAR on the receiver side. */
static tree
}
}
-/* Build COMPONENT_REF and set TREE_THIS_VOLATILE and TREE_READONLY on it
- as appropriate. */
-/* Adapted from 'gcc/omp-low.cc:omp_build_component_ref'. */
-
-static tree
-oacc_build_component_ref (tree obj, tree field)
-{
- tree field_type = TREE_TYPE (field);
- tree obj_type = TREE_TYPE (obj);
- if (!ADDR_SPACE_GENERIC_P (TYPE_ADDR_SPACE (obj_type)))
- field_type = build_qualified_type
- (field_type,
- KEEP_QUAL_ADDR_SPACE (TYPE_QUALS (obj_type)));
-
- tree ret = build3 (COMPONENT_REF, field_type, obj, field, NULL);
- if (TREE_THIS_VOLATILE (field))
- TREE_THIS_VOLATILE (ret) |= 1;
- if (TREE_READONLY (field))
- TREE_READONLY (ret) |= 1;
- return ret;
-}
-
static tree
build_receiver_ref (tree var, tree receiver_decl, field_map_t *fields)
{
tree x = build_simple_mem_ref (receiver_decl);
tree field = *fields->get (var);
TREE_THIS_NOTRAP (x) = 1;
- x = oacc_build_component_ref (x, field);
+ x = omp_build_component_ref (x, field);
return x;
}
if (POINTER_TYPE_P (TREE_TYPE (sender_decl)))
sender_decl = build_simple_mem_ref (sender_decl);
tree field = *fields->get (var);
- return oacc_build_component_ref (sender_decl, field);
+ return omp_build_component_ref (sender_decl, field);
}
static int