From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 267343854830 for ; Fri, 9 Jul 2021 11:16:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 267343854830 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ADE15ED1; Fri, 9 Jul 2021 04:16:37 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.126]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 17E753F5A1; Fri, 9 Jul 2021 04:16:36 -0700 (PDT) From: Richard Sandiford To: Jeff Law , gcc-patches@gcc.gnu.org, Matthew Fortune Mail-Followup-To: Jeff Law , gcc-patches@gcc.gnu.org, Matthew Fortune , richard.sandiford@arm.com Subject: Re: [PATCH] testsuite: mips: use noinline attribute instead of -fno-inline References: <8f047551a4694778606d615bd22ef619006d044e.camel@mengyan1223.wang> <9ae500112d9c23f025576c2443c639ba0d0bbc26.camel@mengyan1223.wang> <994f86e6-0a97-044b-e437-615cc572c3ef@gmail.com> <9c224a13070c22092bd252e34b0f17ad5e550509.camel@mengyan1223.wang> Date: Fri, 09 Jul 2021 12:16:35 +0100 In-Reply-To: <9c224a13070c22092bd252e34b0f17ad5e550509.camel@mengyan1223.wang> (Xi Ruoyao's message of "Fri, 09 Jul 2021 14:42:58 +0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2021 11:16:39 -0000 Xi Ruoyao writes: > On Thu, 2021-07-08 at 17:44 -0600, Jeff Law wrote: >>=20 >>=20 >> On 6/25/2021 8:40 AM, Richard Sandiford wrote: >> > Xi Ruoyao via Gcc-patches writes: >> > > On Fri, 2021-06-25 at 01:02 +0800, Xi Ruoyao wrote: >> > > > On Thu, 2021-06-24 at 10:48 -0600, Jeff Law wrote: >> > > > > I'd like to know a bit more here.=C2=A0 mips.exp shouldn't care >> > > > > about the >> > > > > options passed to the compiler and to the best of my knowledge >> > > > > patch itself is wrong, I question if it's necessary and >> > > > > whether or >> > > > > not >> > > > > your just papering over some other issue. >> > > > There is some logic processing options in mips.exp.=C2=A0 Some >> > > > options are >> > > > overrided for multilib.=C2=A0 It seems the mips.exp was originally >> > > > designed >> > > > as: >> > > >=20 >> > > > * MIPS options should go in dg-options >> > > > * Other options should go in dg-additional-options >> > > >=20 >> > > > In d2148424165 marxin merged some dg-additional-options into dg- >> > > > options, >> > > > exploited the problem. >> > > >=20 >> > > > And, the "origin" convention seems already broken: there is >> > > > something >> > > > like -funroll-loops which is not a MIPS option, but accepted by >> > > > mips.exp >> > > > in dg-options. >> > > >=20 >> > > > Possiblities are: >> > > >=20 >> > > > (1) this patch >> > > > (2) make mips.exp accept -fno-inline as "if it is a MIPS option" >> > > > (3) refactor mips.exp to pass everything itself doesn't know >> > > > directly >> > > > to gcc >> > > Attached a diff for mips.exp trying to make it pass everything in >> > > dg- >> > > options which is not known by itself directly to the compiler. >> > >=20 >> > > The "smallest fix" is simply adding -fno-inline into mips.exp.=C2=A0 >> > > However >> > > I don't like it because I agree with you that mips.exp shouldn't >> > > care >> > > about dg-options, at least don't do it too much. >> > As I said in the other message, I think the smallest fix is the way >> > to >> > go though. >> THanks for chiming in Richard.=C2=A0 I didn't know all the background >> here.=C2=A0=C2=A0=20 >> Let's just go with the small fix based on your recommendation.=C2=A0 We = can >> always revisit if we keep running into issues in this code. > > Pushed at 3b33b113. It looks like that was the originally posted patch though. It probably wasn't very clear, but by smallest fix, I meant adding inline to: # Add -ffoo/-fno-foo options to mips_option_groups. foreach option { common delayed-branch expensive-optimizations fast-math fat-lto-objects finite-math-only fixed-hi fixed-lo lax-vector-conversions omit-frame-pointer optimize-sibling-calls peephole2 schedule-insns2 split-wide-types tree-vectorize unroll-all-loops unroll-loops ipa-ra } { =E2=80=A6 } It seems inconsistent to remove -fno-inline from the dg-options but keep -fipa-ra, for example. Thanks, Richard