On Thu, Sep 20, 2018 at 11:06:40AM -0700, Cesar Philippidis wrote:
> 2018-XX-YY  Chung-Lin Tang <clt...@codesourcery.com>
>           Cesar Philippidis  <ce...@codesourcery.com>
> 
>       gcc/
>       * cfgloop.h (struct loop): Add 'bool marked_independent' field.
>       * omp-expand.c (struct omp_region): Add 'int kind' and
>       'bool independent' fields.
>       (expand_omp_for): Set 'marked_independent' field for loop
>       corresponding to region.
>       (find_omp_for_region_data): New function.
>       (build_omp_regions_1): Set kind field.  Call
>       find_omp_for_region_data for GIMPLE_OMP_FOR statements.

In addition to what I've just mentioned in another mail:

> --- a/gcc/omp-expand.c
> +++ b/gcc/omp-expand.c
> @@ -107,6 +107,12 @@ struct omp_region
>  
>    /* True if this is nested inside an OpenACC kernels construct.  */
>    bool inside_kernels_p;
> +
> +  /* Records a generic kind field.  */
> +  int kind;
> +
> +  /* For an OpenACC loop directive, true if has the 'independent' clause.  */
> +  bool independent;
>  };

I'm not sure why you need kind cached, you can get from the region at the
stmt and from there at the kind easily.  And even if it would be a good idea
to cache it, you don't want to mix bool and non-bool members in the
structure to avoid padding gaps.

        Jakub

Reply via email to