On 10/14/2014 09:25 AM, Richard Biener wrote:
On Mon, 13 Oct 2014, Bernd Schmidt wrote:

On 10/13/2014 12:33 PM, Ilya Verbin wrote:
On 13 Oct 12:19, Jakub Jelinek wrote:
But I'd like to understand why is this one needed.
Why should the compilers care?  Aggregates layout and alignment of
integral/floating types must match between host and offload compilers,
sure,
but isn't that something streamed already in the LTO bytecode?
Or is LTO streamer not streaming some types like long_type_node?

It isn't, see the preload_common_nodes code.

Something I'd like to get rid of at some point (but it's not 100%
easy as backends for example compare va_list_type_node by pointer).

Hmm, this is unfortunate - I was about to submit a patch not to stream that one since it can differ between host and offload target.

I see one such comparison in i386.c - any others you are aware of? Should it be sufficient to just compare the TYPE_MAIN_VARIANT instead?

Also, the backend needs to choose
the right Pmode (and in the case of ptx, emit a directive about address
sizes).

Surely that will only be one problem with going the LTO way to handle
the offloading ;)

Another problem I mentioned above, beyond that I have a patch to use the $host-modes.def file to define machine modes - and that's essentially it.

I'll be submitting these additional offloading patches for the case of different host and target once Ilya has committed the others.


Bernd

Reply via email to