This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 6/n] OpenMP 4.0 offloading infrastructure: option handling
- From: Ilya Verbin <iverbin at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>, Bernd Schmidt <bernds at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Richard Biener <rguenther at suse dot de>, Thomas Schwinge <thomas at codesourcery dot com>, Kirill Yukhin <kirill dot yukhin at gmail dot com>, Andrey Turetskiy <andrey dot turetskiy at gmail dot com>
- Date: Mon, 13 Oct 2014 14:33:11 +0400
- Subject: Re: [PATCH 6/n] OpenMP 4.0 offloading infrastructure: option handling
- Authentication-results: sourceware.org; auth=none
- References: <20141011144900 dot GA16368 at msticlxl57 dot ims dot intel dot com> <20141013101909 dot GT10376 at tucnak dot redhat dot com>
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?
> I'd expect if host and offload compiler disagree on long type size that
> you'd just use a different integral type with the same size as long on the
> host.
> Different sized pointers are of course a bigger problem, but can't you just
> error out on that during reading of the LTO, or even handle it (just use
> some integral type for when is the pointer stored in memory, and just
> convert to pointer after reads from memory, and convert back before storing
> to memory). Erroring out during LTO streaming in sounds just fine to me
> though.
Actually this option was developed by Bernd, so I think PTX team is going to use
it somehow. In MIC's case we're planning just to check in mkoffload that host
and target compiler's ABI are the same. Without this check we will crash in LTO
streamer with ICE, so I'd like to issue an error message, rather than crashing.
-- Ilya