This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: nvptx offloading patches [1/n]
- From: Jeff Law <law at redhat dot com>
- To: Bernd Schmidt <bernds at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 04 Nov 2014 16:17:17 -0700
- Subject: Re: nvptx offloading patches [1/n]
- Authentication-results: sourceware.org; auth=none
- References: <5454C84A dot 5090000 at codesourcery dot com> <54580027 dot 4050107 at redhat dot com> <54580A97 dot 1070502 at codesourcery dot com> <54593E9D dot 7060400 at redhat dot com> <54594055 dot 4030204 at codesourcery dot com>
On 11/04/14 14:08, Bernd Schmidt wrote:
On 11/04/2014 10:01 PM, Jeff Law wrote:
Communication between host and GPU is all done via some form of memcpy,
so I wouldn't expect this to be a problem.
They still need to agree on the layout of the structure.
That is guaranteed by the fact that structure layouts are fixed before
we write out LTO.
Ok. This is the key item. Thanks for walking me through it.
And assuming
it'll always be memcpy perhaps isn't wise. Consider the possibility
that one day (perhaps soon) the host and GPU may share address space &
memory.
Well, in that case such a target presumably wouldn't use this hook, or
the hook would be extended so that DECLs that live in the host address
space retain their alignment. But that's not the problem we're solving
today.
We're pretty close to this capability right now, so we may have to
change this fairly soon ;-)
Jeff