From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29733 invoked by alias); 23 Apr 2015 19:32:56 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 29721 invoked by uid 89); 23 Apr 2015 19:32:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_50,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 23 Apr 2015 19:32:55 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3NJWpm3022381 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 23 Apr 2015 15:32:52 -0400 Received: from tucnak.zalov.cz (ovpn-116-89.ams2.redhat.com [10.36.116.89]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3NJWon1028890 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 23 Apr 2015 15:32:51 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.9/8.14.9) with ESMTP id t3NJWmGn015870; Thu, 23 Apr 2015 21:32:48 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.9/8.14.9/Submit) id t3NJWjMv015869; Thu, 23 Apr 2015 21:32:45 +0200 Date: Thu, 23 Apr 2015 19:32:00 -0000 From: Jakub Jelinek To: Jan Hubicka Cc: Richard Biener , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Fix LTO option streaming Message-ID: <20150423193245.GH1751@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20150423151619.GD79833@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150423151619.GD79833@kam.mff.cuni.cz> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg01446.txt.bz2 On Thu, Apr 23, 2015 at 05:16:19PM +0200, Jan Hubicka wrote: > > 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. > > Thanks, that would be a good idea. So with SWITCHABLE_TARGET > we have problem that after switching the options are misinterpretted? > I think Jakub made patch to simply skip target-option-node streaming here, > how this is supposed to work. > > > > We can do similar changes for optimize options, now, for all targets, no? > > I am not quite sure about this; not all options are per-function nature. > I need to audit all the target options for LTO safety, I did some work > on this for optimization options, but the target options are still very wild. > For example I am not quite convinced mixing -malign-double -mno-align-double units > will work as expected. SWITCHABLE_TARGETs are 3, i?86/x86_64, powerpc* and mips*, but mips* does not support target attribute (and no other targets do). Also, not all options are allowed in target attribute, doesn't the option need to be Target and Save, I think not all CL_TARGET options are Save. > > 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) Jakub