From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by sourceware.org (Postfix) with ESMTPS id 525923858D28 for ; Fri, 3 Dec 2021 23:23:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 525923858D28 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1B3NHY0i015901; Fri, 3 Dec 2021 23:23:07 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3cqvsgr2bk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Dec 2021 23:23:07 +0000 Received: from m0098404.ppops.net (m0098404.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1B3NHkwn017332; Fri, 3 Dec 2021 23:23:06 GMT Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 3cqvsgr2bc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Dec 2021 23:23:06 +0000 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1B3NHisG009628; Fri, 3 Dec 2021 23:23:05 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma04dal.us.ibm.com with ESMTP id 3cnne4bhvp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 03 Dec 2021 23:23:05 +0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1B3NN41148693532 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 3 Dec 2021 23:23:04 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 28023BE04F; Fri, 3 Dec 2021 23:23:04 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 492A4BE054; Fri, 3 Dec 2021 23:23:03 +0000 (GMT) Received: from [9.65.255.219] (unknown [9.65.255.219]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 3 Dec 2021 23:23:03 +0000 (GMT) Message-ID: <51fa45ff-cfb2-7b2a-5f42-3344b5aa3280@linux.ibm.com> Date: Fri, 3 Dec 2021 17:23:02 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; 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: "Kewen.Lin" , Segher Boessenkool Cc: Bill Schmidt , GCC Patches , David Edelsohn , Michael Meissner , =?UTF-8?Q?Martin_Li=c5=a1ka?= , Richard Biener References: <3f2c6df2-e458-483c-facd-148a3cc3aead@linux.ibm.com> <20211129165712.GU614@gate.crashing.org> <57a263ea-4ef3-c57e-ff4c-2e5833532162@linux.ibm.com> From: Peter Bergner In-Reply-To: <57a263ea-4ef3-c57e-ff4c-2e5833532162@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: _GvH1_IcbXa8y8_lQ0pVoazMuiSwbElK X-Proofpoint-GUID: KYThxlMShlNBBKRlvL3hfrH6QoznhMee X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2021-12-03_11,2021-12-02_01,2021-12-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 bulkscore=0 phishscore=0 adultscore=0 mlxlogscore=999 suspectscore=0 priorityscore=1501 lowpriorityscore=0 mlxscore=0 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112030146 X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_MSPIKE_H2, 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, 03 Dec 2021 23:23:09 -0000 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? Peter