This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp4 05/14] omp-low: set 'omp target entrypoint' only on entypoints
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Alexander Monakov <amonakov at ispras dot ru>
- Cc: gcc-patches at gcc dot gnu dot org, Dmitry Melnik <dm at ispras dot ru>
- Date: Wed, 21 Oct 2015 10:14:51 +0200
- Subject: Re: [gomp4 05/14] omp-low: set 'omp target entrypoint' only on entypoints
- Authentication-results: sourceware.org; auth=none
- References: <1445366076-16082-1-git-send-email-amonakov at ispras dot ru> <1445366076-16082-6-git-send-email-amonakov at ispras dot ru>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Oct 20, 2015 at 09:34:27PM +0300, Alexander Monakov wrote:
> (note to reviewers: I'm not sure what we're after here, on the high level;
> will be happy to rework the patch in a saner manner based on feedback, or even
> drop it for now)
>
> At the moment the attribute setting logic in omp-low.c is such that if a
> function that should be present in target code does not already have 'omp
> declare target' attribute, it receives 'omp target entrypoint'. That is
> wasteful: clearly not all user-declared target functions will be target region
> entry points in OpenMP.
>
> The motivating example for this change is OpenMP parallel target regions. The
> 'parallel' part is outlined into its own function. We don't want that
> function be an 'entrypoint' on PTX (but only as a matter of optimality rather
> than correctness).
>
> * omp-low.c (create_omp_child_function): Set "omp target entrypoint"
> or "omp declare target" attribute based on is_gimple_omp_offloaded.
This is principally ok, but you want to change it for 01/14.
After that I think it is ready for trunk.
Jakub