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 7F4F43858C27 for ; Wed, 13 Oct 2021 02:33:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7F4F43858C27 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 19D2C7Ol011593; Tue, 12 Oct 2021 22:33:41 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bnpf20ahx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Oct 2021 22:33:41 -0400 Received: from m0098409.ppops.net (m0098409.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 19D2MSjX018924; Tue, 12 Oct 2021 22:33:40 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 3bnpf20ahb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Oct 2021 22:33:40 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 19D2XUqe020253; Wed, 13 Oct 2021 02:33:38 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma04ams.nl.ibm.com with ESMTP id 3bk2qa67pt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 13 Oct 2021 02:33:38 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 19D2XYPb56558048 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 13 Oct 2021 02:33:34 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6061711C04C; Wed, 13 Oct 2021 02:33:34 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D77A811C050; Wed, 13 Oct 2021 02:33:32 +0000 (GMT) Received: from kewenlins-mbp.cn.ibm.com (unknown [9.200.146.131]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 13 Oct 2021 02:33:32 +0000 (GMT) Subject: PING^3 [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> From: "Kewen.Lin" Message-ID: Date: Wed, 13 Oct 2021 10:33:31 +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: <0318000d-c488-0176-6f14-d8c9d884480c@linux.ibm.com> Content-Type: text/plain; charset=gbk Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-GUID: pmIeVJgMxNmG5VkdeCjn_8r2VJMXfuTM X-Proofpoint-ORIG-GUID: Hj9ez1ivI25ULP3xoMwEPQZcTt2wEzDd 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.182.1,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.0.607.475 definitions=2021-10-12_07,2021-10-12_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 impostorscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 mlxscore=0 phishscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2110130013 X-Spam-Status: No, score=-2.4 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: Wed, 13 Oct 2021 02:33:44 -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. >>> >>