This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, OpenACC] Enable GOMP_MAP_FIRSTPRIVATE_INT for OpenACC
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Julian Brown <julian at codesourcery dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>, Cesar Philippidis <cesar at codesourcery dot com>
- Date: Tue, 4 Dec 2018 15:27:12 +0100
- Subject: Re: [PATCH, OpenACC] Enable GOMP_MAP_FIRSTPRIVATE_INT for OpenACC
- References: <20180920193804.2413efa1@squid.athome>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Sep 20, 2018 at 07:38:04PM -0400, Julian Brown wrote:
> 2018-09-20 Cesar Philippidis <cesar@codesourcery.com>
> Julian Brown <julian@codesourcery.com>
>
> gcc/
> * omp-low.c (maybe_lookup_field_in_outer_ctx): New function.
> (convert_to_firstprivate_int): New function.
> (convert_from_firstprivate_int): New function.
> (lower_omp_target): Enable GOMP_MAP_FIRSTPRIVATE_INT in OpenACC.
>
> libgomp/
> * oacc-parallel.c (GOACC_parallel_keyed): Handle
> GOMP_MAP_FIRSTPRIVATE_INT host addresses.
> * plugin/plugin-nvptx.c (nvptx_exec): Handle
> GOMP_MAP_FIRSTPRIVATE_INT host addresses.
> * testsuite/libgomp.oacc-c++/firstprivate-int.C: New test.
> * testsuite/libgomp.oacc-c-c++-common/firstprivate-int.c: New
> test.
> * testsuite/libgomp.oacc-fortran/firstprivate-int.f90: New test.
> @@ -8039,7 +8182,7 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
> if (omp_is_reference (ovar))
> type = TREE_TYPE (type);
> if ((INTEGRAL_TYPE_P (type)
> - && TYPE_PRECISION (type) <= POINTER_SIZE)
> + && tree_to_uhwi (TYPE_SIZE (type)) <= POINTER_SIZE)
> || TREE_CODE (type) == POINTER_TYPE)
> {
> tkind = GOMP_MAP_FIRSTPRIVATE_INT;
> @@ -8194,7 +8337,7 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
> if (omp_is_reference (var))
> type = TREE_TYPE (type);
> if ((INTEGRAL_TYPE_P (type)
> - && TYPE_PRECISION (type) <= POINTER_SIZE)
> + && tree_to_uhwi (TYPE_SIZE (type)) <= POINTER_SIZE)
> || TREE_CODE (type) == POINTER_TYPE)
> {
> x = build_receiver_ref (var, false, ctx);
Why this?
Jakub