This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [OpenACC 1/11] UNIQUE internal function
- From: Nathan Sidwell <nathan at acm dot org>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Julian Brown <julian at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Bernd Schmidt <bschmidt at redhat dot com>, Jason Merrill <jason at redhat dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Thu, 22 Oct 2015 10:42:01 -0400
- Subject: Re: [OpenACC 1/11] UNIQUE internal function
- Authentication-results: sourceware.org; auth=none
- References: <5627DD78 dot 9040302 at acm dot org> <5627E0DF dot 9050507 at acm dot org> <CAFiYyc0nKuS8qHCTn-Y_axg6YfQE7M6OoscjQHA_v3DC3H0BZA at mail dot gmail dot com> <CAFiYyc3VEH5Cp_9TMV353TSx9TT12_VNQ0Vuuqx14GEeKBbKYQ at mail dot gmail dot com> <20151022075910 dot GB478 at tucnak dot redhat dot com> <CAFiYyc1HoaTKoui6yBDEaCPfWsdJh-v_iq4BQRpwxAbctKn2wQ at mail dot gmail dot com> <20151022121006 dot 250e5cec at octopus> <5628DFCE dot 30101 at acm dot org> <20151022131736 dot GR478 at tucnak dot redhat dot com> <5628E377 dot 4000108 at acm dot org> <CAFiYyc0_3JmEHGhNa5ZhZkp-RJnfatjP0h2uvx9=r=67sqUJFA at mail dot gmail dot com>
On 10/22/15 10:30, Richard Biener wrote:
On Thu, Oct 22, 2015 at 3:24 PM, Nathan Sidwell <nathan@acm.org> wrote:
Essentially, yes. a set of IFN_UNIQUE form a group which must not be
separated from each other. The set is discovered implicitly by following
the CFG (though I suppose we could add an identifying INT_CST operand or
something equivalent).
I don't see how this is achieved though.
Well, in practice it does.
To achieve this you'd need data
dependences between them, sth like
token_1 = IFN_UNIQUE (HEAD);
...
token_2 = IFN_UNIQUE (TAIL, token_1);
not sure if that is enough (what is "separate from each other"?), for example
partial inlining might simply pass token_1 to the split part where only
IFN_UNIQUE (TAIL, token_1) would be in.
Yeah, such partial inlining will break. Not encountered it happening though.
At least the above provides
ordering between the two IFN calls (which you achieve by having VDEFs
I guess, but then they are also barriers for memory optimizations).
Right, I think I'm relying on the compiler's lack of knowledge about what global
state might be affected by the two calls to prevent it reordering them WRT
eachother. Is that what you meant?
(I did wonder about the need to add the kind of data dependency you describe,
but found it unnecessary.)
nathan