This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [OpenACC 1/11] UNIQUE internal function


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]