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 C784D385B83D for ; Tue, 23 Aug 2022 12:55:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C784D385B83D Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27NBwpMn023409; Tue, 23 Aug 2022 12:55:26 GMT Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3j4xge9usa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 Aug 2022 12:55:26 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27NCnq4b004457; Tue, 23 Aug 2022 12:55:25 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma03dal.us.ibm.com with ESMTP id 3j2q89qn10-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 Aug 2022 12:55:25 +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 27NCtOWq8061448 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 23 Aug 2022 12:55:24 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B7EEDBE056; Tue, 23 Aug 2022 12:55:23 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 21FD7BE051; Tue, 23 Aug 2022 12:55:23 +0000 (GMT) Received: from [9.160.4.32] (unknown [9.160.4.32]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 23 Aug 2022 12:55:22 +0000 (GMT) Message-ID: <92671542-b6b9-e39a-b483-514dffc4773a@linux.ibm.com> Date: Tue, 23 Aug 2022 07:55:22 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH] sched1: Fix -fcompare-debug issue in schedule_region [PR105586] Content-Language: en-US To: Surya Kumari Jangala , gcc-patches@gcc.gnu.org, Segher Boessenkool , pthaugen@us.ibm.com References: From: Peter Bergner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: hlbFoa8q9umzCjkJZRYLdm3RCzZu-Gpd X-Proofpoint-GUID: hlbFoa8q9umzCjkJZRYLdm3RCzZu-Gpd X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-23_05,2022-08-22_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxscore=0 malwarescore=0 suspectscore=0 spamscore=0 mlxlogscore=999 phishscore=0 impostorscore=0 clxscore=1015 lowpriorityscore=0 priorityscore=1501 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208230050 X-Spam-Status: No, score=-3.3 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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Tue, 23 Aug 2022 12:55:30 -0000 On 8/23/22 6:49 AM, Surya Kumari Jangala 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. It looks good to me, but I cannot approve it. That said, you're missing a ChangeLog entry for your new helper function. The ChangeLog mentions what changed, not why it changed. Maybe something like the following? gcc/ PR rtl-optimization/105586 * sched-rgn.cc (save_state_for_fallthru_edge): New function. (schedule_region): Use it for all blocks. Peter