public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix LTO option streaming
@ 2015-04-23 12:05 Richard Biener
  2015-04-23 15:16 ` Jan Hubicka
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Biener @ 2015-04-23 12:05 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jan Hubicka


It looks like when transitioning to using target and optimization
option nodes for compile-time to link-time option streaming you
didn't adjust lto-opts.c nor lto-wrapper.c.  The following fixes
the target option side (for SWITCHABLE_TARGET).  Do not record
any target options in the lto_opts section.

Honza - I suppose we don't have any testcase that this works, I'll
try to come up with sth.  This also looks like a correctness issue
to me.

We can do similar changes for optimize options, now, for all targets, no?

Thanks,
Richard.

2015-04-23  Richard Biener  <rguenther@suse.de>

	* lto-opts.c (lto_write_options): Do not record target options
	if we are targeting a SWITCHABLE_TARGET target.  We use target
	options on functions to transfer target flags from compile to
	link time.

Index: gcc/lto-opts.c
===================================================================
*** gcc/lto-opts.c	(revision 222360)
--- gcc/lto-opts.c	(working copy)
*************** lto_write_options (void)
*** 219,224 ****
--- 219,230 ----
  	  && lto_stream_offload_p)
         continue;
  
+       /* Do not store target-specific options if we target a
+          SWITCHABLE_TARGET target.  */
+       if ((cl_options[option->opt_index].flags & CL_TARGET)
+ 	  && SWITCHABLE_TARGET)
+ 	continue;
+ 
        /* Drop options created from the gcc driver that will be rejected
  	 when passed on to the driver again.  */
        if (cl_options[option->opt_index].cl_reject_driver)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-27 11:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-23 12:05 [PATCH] Fix LTO option streaming Richard Biener
2015-04-23 15:16 ` Jan Hubicka
2015-04-23 15:30   ` Richard Biener
2015-04-27 11:54     ` Richard Biener
2015-04-23 19:32   ` Jakub Jelinek

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