On 11/20/2014 02:20 PM, Richard Biener wrote:
On Thu, 20 Nov 2014, Bernd Schmidt wrote:

On 11/13/2014 05:06 AM, Jan Hubicka wrote:
this patch adds infrastructure for proper streaming and merging of
TREE_TARGET_OPTION.

This breaks the offloading path via LTO since it introduces an incompatibility
in LTO format between host and offload machine.

A very quick patch to fix it is below - the OpenACC testcase I was using seems
to be working again with this. Thoughts, suggestions?

The offload target needs to have the same target options as the host?

Not really meaningful I'd think.

Are the offload functions marked somehow?  That is, can we avoid
setting TREE_TARGET_OPTION on them?

Well, they are mostly generated automatically by omp-low.c, so TREE_TARGET_OPTION wouldn't normally be set anyway. So the field is unnecessary, we just can't write it out since the two compilers involved disagree on its layout.

Or rather we need to have a
default TREE_TARGET_OPTION node for the offload target which we'd
need to set - how would you otherwise transfer different offload
target options to the offload compile?  How do you transfer
offload target options to the offload compile at all?

ABI options are transferred via the -foffload-abi mechanism. No other target options can be transferred.

I think this just shows conceptual issues with the LTO approach...

I don't think running into a few problems demonstrates a conceptual problem when it works fine with some fairly small patches.


Bernd

Reply via email to