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 0DCBC385841C for ; Thu, 4 Nov 2021 10:57:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0DCBC385841C Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1A4ALZDq005294; Thu, 4 Nov 2021 10:57:51 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3c4dpu0nsq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Nov 2021 10:57:50 +0000 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 1A4AN3rk008232; Thu, 4 Nov 2021 10:57:50 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com with ESMTP id 3c4dpu0nsa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Nov 2021 10:57:50 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 1A4Ar8AA032076; Thu, 4 Nov 2021 10:57:48 GMT Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by ppma06ams.nl.ibm.com with ESMTP id 3c0wajx6u9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 04 Nov 2021 10:57:48 +0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 1A4Avilo63308222 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 4 Nov 2021 10:57:44 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 983E14C044; Thu, 4 Nov 2021 10:57:44 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 720D84C04E; Thu, 4 Nov 2021 10:57:42 +0000 (GMT) Received: from KewenLins-MacBook-Pro.local (unknown [9.200.47.106]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 4 Nov 2021 10:57:42 +0000 (GMT) Subject: PING^5 [PATCH] rs6000: Fix some issues in rs6000_can_inline_p [PR102059] To: GCC Patches Cc: Michael Meissner , Bill Schmidt , David Edelsohn , Segher Boessenkool References: <3f2c6df2-e458-483c-facd-148a3cc3aead@linux.ibm.com> <0318000d-c488-0176-6f14-d8c9d884480c@linux.ibm.com> <93575e81-8175-4c43-da1e-30c518f854dc@linux.ibm.com> From: "Kewen.Lin" Message-ID: <0773ea96-f79f-c973-08e8-95e27d7f2d90@linux.ibm.com> Date: Thu, 4 Nov 2021 18:57:40 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 In-Reply-To: <93575e81-8175-4c43-da1e-30c518f854dc@linux.ibm.com> Content-Type: text/plain; charset=gbk Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-GUID: ZSNdSf5pt4nngLxhArIyM2sN4DofRkOy X-Proofpoint-ORIG-GUID: ry_wyLZSksmk3Pz1JecEHRiRcSFDdM-E Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-11-04_02,2021-11-03_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 malwarescore=0 impostorscore=0 mlxlogscore=999 suspectscore=0 lowpriorityscore=0 mlxscore=0 priorityscore=1501 bulkscore=0 clxscore=1015 spamscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2111040039 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, KAM_SHORT, MIME_CHARSET_FARAWAY, 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: Thu, 04 Nov 2021 10:57:55 -0000 Hi, Gentle ping this patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-September/578552.html One related patch [1] is ready to commit, whose test cases rely on this patch if no changes are applied to them. [1] https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579658.html BR, Kewen >>>> on 2021/9/1 ÏÂÎç2:55, Kewen.Lin via Gcc-patches wrote: >>>>> Hi! >>>>> >>>>> 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. It also replaces >>>>> rs6000_isa_flags with the one from target_option_default_node >>>>> when caller_tree is NULL as rs6000_isa_flags could probably >>>>> change since initialization. >>>>> >>>>> It also extends the scope of the check for the case that callee >>>>> has explicit set options, for test case pr102059-2.c inlining can >>>>> happen unexpectedly before, it's fixed accordingly. >>>>> >>>>> As Richi/Mike pointed out, some tuning flags like MASK_P8_FUSION >>>>> can be neglected for inlining, this patch also exludes them when >>>>> the callee is attributed by always_inline. >>>>> >>>>> Bootstrapped and regtested on powerpc64le-linux-gnu Power9. >>>>> >>>>> BR, >>>>> Kewen >>>>> ----- >>>>> gcc/ChangeLog: >>>>> >>>>> PR ipa/102059 >>>>> * config/rs6000/rs6000.c (rs6000_can_inline_p): Adjust with >>>>> target_option_default_node and consider always_inline_safe flags. >>>>> >>>>> gcc/testsuite/ChangeLog: >>>>> >>>>> PR ipa/102059 >>>>> * gcc.target/powerpc/pr102059-1.c: New test. >>>>> * gcc.target/powerpc/pr102059-2.c: New test. >>>>> * gcc.target/powerpc/pr102059-3.c: New test. >>>>> * gcc.target/powerpc/pr102059-4.c: New test. >>>>> >>>>