This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, OpenACC, 4/8] Multi-dimensional dynamic array support for OpenACC data clauses, omp-low: dynamic array descriptor creation


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]