From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id D77B23858CDA for ; Tue, 8 Nov 2022 16:37:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D77B23858CDA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=linux.vnet.ibm.com Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2A8FWs1D020699; Tue, 8 Nov 2022 16:37:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=5eP9kzstcIRVwHsLowNJpRHMzLdQQzemVOkvNDt7Guc=; b=XBV0qBW2ceiRH/jH/Z9eCbldKMoll8qPCHkUuoR7rtqMCLCG0OnbwNctZhKc6K8Rzgdy ymCdThbl9Yj1fiAxX+LM3aZgFRzPIYxbk9XEQKWBq8CK9919jC3QrYLarG97CTHjJ6PM OUdBPCWPv41QyKtVF4NwN7fiouzWbd9KOLS3d0OVbD9SQe+lAqav8DbEqdEFQ4njBSIe W9Dzs+/eGm0zBDc0/dNpnM8JQSQta6fNqZW8qIAyskful7HEGfaqR+e3NBgyAEzBKV9L eN88RJIOb1rUznhWx7mLB1tIIrC/KXJsW1OGOOtzjGDJ4RyJuEQ9Zx4qSdi5rPAYqnPY VQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kqsug29rs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Nov 2022 16:37:00 +0000 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 2A8FXrY0025122; Tue, 8 Nov 2022 16:37:00 GMT Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3kqsug29r9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Nov 2022 16:37:00 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2A8GaMMJ017652; Tue, 8 Nov 2022 16:36:59 GMT Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by ppma04wdc.us.ibm.com with ESMTP id 3kngptqpyc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 08 Nov 2022 16:36:59 +0000 Received: from smtpav03.dal12v.mail.ibm.com ([9.208.128.129]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2A8Gaui344564792 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 8 Nov 2022 16:36:56 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4F97258060; Tue, 8 Nov 2022 16:36:58 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C7C7D5805A; Tue, 8 Nov 2022 16:36:56 +0000 (GMT) Received: from [9.43.65.101] (unknown [9.43.65.101]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTP; Tue, 8 Nov 2022 16:36:56 +0000 (GMT) Message-ID: Date: Tue, 8 Nov 2022 22:06:55 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH] sched1: Fix -fcompare-debug issue in schedule_region [PR105586] Content-Language: en-US To: Richard Biener Cc: Jeff Law , GCC Patches , Richard Sandiford References: <0312d474-d2de-6c68-5812-5b79f1176b0b@gmail.com> <5e948661-0429-0783-3ba4-b7150299a844@linux.vnet.ibm.com> From: Surya Kumari Jangala In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: tlG3jR4Ngx8lfk5qhTWhtWxpp4FJRV1Y X-Proofpoint-ORIG-GUID: EeHa57YYT14sBGqSHOfyK55KvVECa9JU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-07_11,2022-11-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxscore=0 impostorscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1011 suspectscore=0 spamscore=0 mlxlogscore=999 adultscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211080102 X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,KAM_SHORT,NICE_REPLY_A,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Richard, On 21/09/22 1:03 pm, Richard Biener wrote: > On Tue, Sep 20, 2022 at 9:18 AM Surya Kumari Jangala via Gcc-patches > wrote: >> >> Hi Jeff, Richard, >> Thank you for reviewing the patch! >> I have committed the patch to the gcc repo. >> Can I backport this patch to prior versions of gcc, as this is an easy patch to backport and the issue exists in prior versions too? > > It doesn't seem to be a regression so I'd error on the safe side here. Can you please clarify, should this patch be backported? It is not very clear what "safe side" means here. Thanks! Surya > > Richard. > >> Regards, >> Surya >> >> >> On 31/08/22 9:09 pm, Jeff Law via Gcc-patches wrote: >>> >>> >>> On 8/23/2022 5:49 AM, Surya Kumari Jangala via Gcc-patches wrote: >>>> sched1: Fix -fcompare-debug issue in schedule_region [PR105586] >>>> >>>> In schedule_region(), a basic block that does not contain any real insns >>>> is not scheduled and the dfa state at the entry of the bb is not copied >>>> to the fallthru basic block. However a DEBUG insn is treated as a real >>>> insn, and if a bb contains non-real insns and a DEBUG insn, it's dfa >>>> state is copied to the fallthru bb. This was resulting in >>>> -fcompare-debug failure as the incoming dfa state of the fallthru block >>>> is different with -g. We should always copy the dfa state of a bb to >>>> it's fallthru bb even if the bb does not contain real insns. >>>> >>>> 2022-08-22 Surya Kumari Jangala >>>> >>>> gcc/ >>>> PR rtl-optimization/105586 >>>> * sched-rgn.cc (schedule_region): Always copy dfa state to >>>> fallthru block. >>>> >>>> gcc/testsuite/ >>>> PR rtl-optimization/105586 >>>> * gcc.target/powerpc/pr105586.c: New test. >>> Interesting. We may have stumbled over this bug internally a little while ago -- not from a compare-debug standpoint, but from a "why isn't the processor state copied to the fallthru block" point of view. I had it on my to investigate list, but hadn't gotten around to it yet. >>> >>> I think there were requests for ChangeLog updates and a function comment for save_state_for_fallthru_edge. OK with those updates. >>> >>> jeff >>>