From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id E42D93858D28 for ; Mon, 6 Dec 2021 09:35:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E42D93858D28 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id BC56A212C2; Mon, 6 Dec 2021 09:35:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1638783301; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6lBsY0xTnndH60rV2aKGpjBnyL/nb0a7ph0Ej/r3l+A=; b=H4HEmRs5MBcFKKwTWCPW0Z7F0iFuElPGAyantb/pNNfTkJquacD/JxObCnyh30hMfx7Eq3 mJYsot5eGgah77tT+ODfB7ahWl/hTNaTnuf/kqjuj/dWJOJBcHb57xfdcJCPbsFE5N9704 xgcjfMVeB/sNvfF24TuZRwwO2I1/3gI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1638783301; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6lBsY0xTnndH60rV2aKGpjBnyL/nb0a7ph0Ej/r3l+A=; b=ovyC0v/q2sNn/ME8vzeaCb0WoVUkLEB0YgtWxyzpEc9N4ZM1SbrjDe7h0yM1w6au3iQBD5 5NdDBjGasl68+7DQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8B71313B2C; Mon, 6 Dec 2021 09:35:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id E4zNIEXZrWGvLQAAMHmgww (envelope-from ); Mon, 06 Dec 2021 09:35:01 +0000 Message-ID: <8905cc4f-0390-9890-8084-ec8492dc7fbf@suse.cz> Date: Mon, 6 Dec 2021 10:35:00 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [PATCH v2] rs6000: Fix some issues in rs6000_can_inline_p [PR102059] Content-Language: en-US To: Peter Bergner , "Kewen.Lin" , Segher Boessenkool Cc: Bill Schmidt , GCC Patches , David Edelsohn , Michael Meissner , Richard Biener References: <3f2c6df2-e458-483c-facd-148a3cc3aead@linux.ibm.com> <20211129165712.GU614@gate.crashing.org> <57a263ea-4ef3-c57e-ff4c-2e5833532162@linux.ibm.com> <51fa45ff-cfb2-7b2a-5f42-3344b5aa3280@linux.ibm.com> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= In-Reply-To: <51fa45ff-cfb2-7b2a-5f42-3344b5aa3280@linux.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, NICE_REPLY_A, 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: Mon, 06 Dec 2021 09:35:07 -0000 On 12/4/21 00:23, Peter Bergner wrote: > On 12/2/21 9:46 PM, Kewen.Lin via Gcc-patches wrote: >> on 2021/11/30 上午12:57, Segher Boessenkool wrote: >>> On Wed, Sep 01, 2021 at 02:55:51PM +0800, Kewen.Lin wrote: >>>> This patch is to fix the inconsistent behaviors for non-LTO mode >>>> and LTO mode. As Martin pointed out, currently the function >>>> rs6000_can_inline_p simply makes it inlinable if callee_tree is >>>> NULL, but it's wrong, we should use the command line options >>>> from target_option_default_node as default. >>> >>> This is not documented. >>> >> >> Yeah, but according to the document for the target attribute [1], >> "Multiple target back ends implement the target attribute to specify >> that a function is to be compiled with different target options than >> specified on the command line. The original target command-line options >> are ignored. ", it seems to say the function without any target >> attribute/pragma will be compiled with target options specified on the >> command line. I think it's a normal expectation for users. >> >> Excepting for the inconsistent behaviors between LTO and non-LTO, >> it can also make the below case different. > > I thought Martin and richi mentioned that target attribute options > are treated as if they are appended to the end of the command line > options, so they can potentially override earlier options, but they > don't actually ignore them? No, the described behavior is true for optimize attribute: optimize (string, …) ... The optimize attribute arguments of a function behave behave as if appended to the command-line. but: target (string, …) ... The original target command-line options are ignored. As seen here: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes Cheers, Martin > > Peter >