On Wed, 21 Oct 2015, Bernd Schmidt wrote:

> On 10/20/2015 08:34 PM, Alexander Monakov wrote:
> > The NVPTX backend emits each functions either as .func (callable only from
> > the
> > device code) or as .kernel (entry point for a parallel region).  OpenMP
> > lowering adds "omp target entrypoint" attribute to functions outlined from
> > target regions.  Unlike OpenACC offloading, OpenMP offloading does not
> > invoke
> > such outlined functions directly, but instead passes their address to
> > 'gomp_nvptx_main'.  Restrict the special attribute treatment to OpenACC
> > only.
> >
> >  * config/nvptx/nvptx.c (write_as_kernel): Additionally test
> >  flag_openacc for "omp_target_entrypoint".
> 
> I'm not too keen on this. The idea of the attribute is to make it a kernel
> that can be executed from the host. If that isn't wanted by OpenMP, it
> shouldn't set the attribute.

I do want the attribute in OpenMP, but I want to use the attribute
differently in the backend, as in patch 02/14 demonstrates.

Alexander

Reply via email to