This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, OpenACC, 4/8] Multi-dimensional dynamic array support for OpenACC data clauses, omp-low: dynamic array descriptor creation
- From: Jakub Jelinek <jakub at redhat dot com>
- To: cltang at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org, Thomas Schwinge <Thomas_Schwinge at mentor dot com>
- Date: Tue, 18 Dec 2018 13:51:37 +0100
- Subject: Re: [PATCH, OpenACC, 4/8] Multi-dimensional dynamic array support for OpenACC data clauses, omp-low: dynamic array descriptor creation
- References: <4c8edea9-4685-2c19-d742-9f1a63e89f91@mentor.com> <b52ca843-2e3b-9466-6f7f-2f4d141d4ee3@mentor.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Dec 13, 2018 at 10:52:32PM +0800, Chung-Lin Tang wrote:
> --- gcc/omp-low.c (revision 267050)
> +++ gcc/omp-low.c (working copy)
> @@ -60,6 +60,7 @@ along with GCC; see the file COPYING3. If not see
> #include "hsa-common.h"
> #include "stringpool.h"
> #include "attribs.h"
> +#include "tree-hash-traits.h"
>
> /* Lowering of OMP parallel and workshare constructs proceeds in two
> phases. The first phase scans the function looking for OMP statements
> @@ -133,6 +134,9 @@ struct omp_context
>
> /* True if this construct can be cancelled. */
> bool cancellable;
> +
> + /* Hash map of dynamic arrays in this context. */
> + hash_map<tree_operand_hash, tree> *dynamic_arrays;
You still call it dynamic arrays. Call it array descriptors or something
similar. In the comment too.
>
> +/* Helper function for create_dynamic_array_descr_type(), to append a new field
Here too and many other spots.
> + tree da_descr_type, name, x;
Even here.
> + append_field_to_record_type (da_descr_type, get_identifier ("$dim_num"),
> + sizetype);
Why the $s in the identifiers? Use . or __ if it shouldn't be user
accessible. Think whether you want it to be in debuginfo or not, if not,
it should be DECL_IGNORED_P.
Jakub