On Mon, May 08, 2017 at 09:29:28PM +0200, Thomas Schwinge wrote:
> commit fac5c3214f58812881635d3fb1e1751446d4b660
> Author: Thomas Schwinge <[email protected]>
> Date: Mon May 8 21:24:46 2017 +0200
>
> Use "oacc kernels" attribute for OpenACC kernels
>
> gcc/
> * omp-expand.c (expand_omp_target)
> <GF_OMP_TARGET_KIND_OACC_KERNELS>: Set "oacc kernels" attribute.
I think
* omp-expand.c (expand_omp_target) <GF_OMP_TARGET_KIND_OACC_KERNELS>:
Set "oacc kernels" attribute.
fits better.
> * omp-general.c (oacc_set_fn_attrib): Remove is_kernel formal
> parameter. Adjust all users.
> (oacc_fn_attrib_kernels_p): Remove function.
> (execute_oacc_device_lower): Look for "oacc kernels" attribute
> instead of calling oacc_fn_attrib_kernels_p.
> * tree-ssa-loop.c (gate_oacc_kernels): Likewise.
> * tree-parloops.c (create_parallel_loop): If oacc_kernels_p,
> assert "oacc kernels" attribute is set.
> gcc/testsuite/
> * c-c++-common/goacc/classify-kernels-unparallelized.c: Adjust.
> * c-c++-common/goacc/classify-kernels.c: Likewise.
> * c-c++-common/goacc/classify-parallel.c: Likewise.
> * c-c++-common/goacc/classify-routine.c: Likewise.
> * gfortran.dg/goacc/classify-kernels-unparallelized.f95: Likewise.
> * gfortran.dg/goacc/classify-kernels.f95: Likewise.
> * gfortran.dg/goacc/classify-parallel.f95: Likewise.
> * gfortran.dg/goacc/classify-routine.f95: Likewise.
> @@ -7451,7 +7457,7 @@ expand_omp_target (struct omp_region *region)
> break;
> case BUILT_IN_GOACC_PARALLEL:
> {
> - oacc_set_fn_attrib (child_fn, clauses, oacc_kernels_p, &args);
> + oacc_set_fn_attrib (child_fn, clauses, &args);
> tagging = true;
> }
> /* FALLTHRU */
The {}s aren't needed around this, could you drop them?
> + pos = tree_cons (purpose[ix],
> + build_int_cst (integer_type_node, dims[ix]),
> + pos);
pos); would fit on the earlier line.
Ok with those changes.
Jakub