public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Bernd Schmidt <bernds_cb1@t-online.de>,
	Richard Biener <rguenther@suse.de>,
	       Jan Hubicka <hubicka@ucw.cz>
Cc: gcc-patches@gcc.gnu.org, neil@daikokuya.co.uk.zalov.cz,
	       joseph@codesourcery.com,
	Thomas Schwinge <thomas_schwinge@mentor.com>,
	       Julian Brown <julian@codesourcery.com>,
	       Cesar Philippidis <cesar_philippidis@mentor.com>
Subject: Re: LTO streaming of TARGET_OPTIMIZE_NODE
Date: Thu, 08 Jan 2015 14:12:00 -0000	[thread overview]
Message-ID: <20150108141149.GC1405@tucnak.redhat.com> (raw)
In-Reply-To: <546DDE1C.6060203@t-online.de>

On Thu, Nov 20, 2014 at 01:27:08PM +0100, 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?

I actually think this patch makes a lot of sense.  Target option nodes
by definition are target specific, generally there is no mapping between
host and offloading target features.  So, the host target options
are not useful to the offloading target.  And, because the amount of bits
streamed is also target specific, say x86_64 will have different and
incompatible cl_target_option_stream_{out,in} from nvptx, and even
for Intel MIC offloading it doesn't make much sense, what CPU is certain
function targetting doesn't necessarily have any relation to the Intel MIC
that will offload it.

I agree the strcmp (section_name_prefix, LTO_SECTION_NAME_PREFIX) == 0
checks in the patch aren't very nice, that could be replaced by
some bool flag alongside of section_name_prefix that would be set
where section_name_prefix is set:
cgraphunit.c:	  section_name_prefix = OFFLOAD_SECTION_NAME_PREFIX;
cgraphunit.c:	  section_name_prefix = LTO_SECTION_NAME_PREFIX;
lto-streamer.c:const char *section_name_prefix = LTO_SECTION_NAME_PREFIX;
lto/lto.c:    section_name_prefix = OFFLOAD_SECTION_NAME_PREFIX;

(call it say bool lto_stream_offload_p ?).

Also note that the patch fixes all the current regressions in Intel MIC
(emulated) offloading caused by the r218767

	Jakub

  parent reply	other threads:[~2015-01-08 14:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-13  5:10 Jan Hubicka
2014-11-13 10:58 ` Richard Biener
2014-11-13 15:32   ` Jan Hubicka
2014-11-14  0:54     ` Jan Hubicka
2014-11-14  8:54       ` Richard Biener
2014-11-14 18:15       ` [BUILDROBOT] error: ‘cl_target_option_stream_in’ was not declared in this scope (was: LTO streaming of TARGET_OPTIMIZE_NODE) Jan-Benedict Glaw
2014-11-14 19:13         ` [BUILDROBOT] error: �??cl_target_option_stream_in�?? " Jan Hubicka
2014-11-15 17:07           ` Jan-Benedict Glaw
2014-11-20 13:09 ` LTO streaming of TARGET_OPTIMIZE_NODE Bernd Schmidt
2014-11-20 13:38   ` Richard Biener
2014-11-20 14:24     ` Bernd Schmidt
2014-11-20 21:51       ` Jan Hubicka
2015-01-08 14:12   ` Jakub Jelinek [this message]
2015-01-09 11:13     ` Thomas Schwinge
2015-01-09 11:50       ` Jakub Jelinek
2015-01-09 12:12         ` Richard Biener
2015-01-11 17:38         ` Jan Hubicka
2015-01-11 21:28         ` Ilya Verbin
2015-01-12 20:08           ` Jan Hubicka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150108141149.GC1405@tucnak.redhat.com \
    --to=jakub@redhat.com \
    --cc=bernds_cb1@t-online.de \
    --cc=cesar_philippidis@mentor.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=joseph@codesourcery.com \
    --cc=julian@codesourcery.com \
    --cc=neil@daikokuya.co.uk.zalov.cz \
    --cc=rguenther@suse.de \
    --cc=thomas_schwinge@mentor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).