This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, 4/16] Implement -foffload-alias
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: Tom de Vries <Tom_deVries at mentor dot com>, "gcc-patches at gnu dot org" <gcc-patches at gnu dot org>
- Date: Fri, 13 Nov 2015 12:39:38 +0100
- Subject: Re: [PATCH, 4/16] Implement -foffload-alias
- Authentication-results: sourceware.org; auth=none
- References: <5640BD31 dot 2060602 at mentor dot com> <5640C560 dot 1000007 at mentor dot com> <alpine dot LSU dot 2 dot 11 dot 1511111150020 dot 4884 at t29 dot fhfr dot qr> <20151111110034 dot GF5675 at tucnak dot redhat dot com> <5644B84D dot 6050504 at mentor dot com> <alpine dot LSU dot 2 dot 11 dot 1511130944270 dot 4884 at t29 dot fhfr dot qr> <5645C33B dot 9080802 at mentor dot com> <alpine dot LSU dot 2 dot 11 dot 1511131228450 dot 4884 at t29 dot fhfr dot qr>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Nov 13, 2015 at 12:29:51PM +0100, Richard Biener wrote:
> > thanks for the explanation. Filed as PR68331 - '[meta-bug] fipa-pta issues'.
> >
> > Any feedback on the '#pragma GCC offload-alias=<none|pointer|all>' bit above?
> > Is that sort of what you had in mind?
>
> Yes. Whether that makes sense is another question of course. You can
> annotate memory references with MR_DEPENDENCE_BASE/CLIQUE yourself
> as well if you know dependences without the users intervention.
I really don't like even the GCC offload-alias, I just don't see anything
special on the offload code. Not to mention that the same issue is already
with other outlined functions, like OpenMP tasks or parallel regions, those
aren't offloaded, yet they can suffer from worse alias/points-to analysis
too.
We simply have some compiler internal interface between the caller and
callee of the outlined regions, each interface in between those has
its own structure type used to communicate the info;
we can attach attributes on the fields, or some flags to indicate some
properties interesting from aliasing POV. We don't really need to perform
full IPA-PTA, perhaps it would be enough to a) record somewhere in cgraph
the relationship in between such callers and callees (for offloading regions
we already have "omp target entrypoint" attribute on the callee and a
singler caller), tell LTO if possible not to split those into different
partitions if easily possible, and then just for these pairs perform
aliasing/points-to analysis in the caller and the result record using
cliques/special attributes/whatever to the callee side, so that the callee
(outlined OpenMP/OpenACC/Cilk+ region) can then improve its alias analysis.
Jakub