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: LTO streaming of TARGET_OPTIMIZE_NODE


> 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.

I am currently populating TREE_TARGET_OPTION in free lang data that is probably
called after omp-low and incrementally I plan to set it even for newly constructed
functions (profiling, ctors etc.) that are built during IPA, so we do not really need
to rely on sane global state at link time.
This however has nothing to do with offloading.

Honza

> 
> >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


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