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 C41B9385841A for ; Tue, 12 Dec 2023 06:18:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C41B9385841A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C41B9385841A Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702361890; cv=none; b=elS7YS63T2i61115hNpE4/xB+2OUniKA3evgYUbFT+UaUjFM8ryBUq5FcS+9mk+CZJ5Hg53h9RM5tZRErWh515pDZJvOcQ0x2G82ppzYjlo3OvmNUqX06Gtwb+6vPz2w4s/QpPpSUB9wbGNaE/npxEIseQddEAYcKEq6w4aEE0M= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702361890; c=relaxed/simple; bh=lY9KHtKkBACdPyza5n8YppQuOcP0YeXKrLfhrvCadug=; h=DKIM-Signature:Message-ID:Date:Subject:From:To:MIME-Version; b=HaU4J4ajDTDGkWfuboyNXSPNeIRpvBqkevV7/iIW3AjZ450AMMm1DAhGUjM9B+pY2leaEd/qIIYmx1z6zUcHIN2IvbloLPKobbI0IlcE4pEfp6QF8AmCeDVn1QGd4YhuwCOrY9I6E7ogl0/Z51l5AIf1X8kni6XfbF8ATuOI2M4= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3BC5OSO2032594; Tue, 12 Dec 2023 06:18:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : subject : from : to : cc : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=w5w2ClgNSt7GBxLHQvvhtPP8aOLKwew6z8oicmLgIn4=; b=ZtZolZfmGzPfK8GnW/vtXCm8USSH6+2nhoxhp0HNobC5uPUxvoZ+38K6y9Wj5bxRE7Ra gasgdPJoPhNQIqAOYQWAN+1pQJXLorIoDiocj0ICuudQzF1nVt/ADyYiND0aZLAQKSE+ q4A9marjh/K6uwqyQuaOYUxXI4epvMmAXQS4wfo05REo9jxKLWAWCe3jDk/tRAAoYc5b D28voO2PyUl4af58lBXhqwXsT/oOdFJzsZYmz2PYzUqe0XP6kjIb9Al904OhekGw83N/ iGfhfaAET2i28mEsWESwHKmEGWzRjAtQd3vTJ+SSBf/FDxC++rqgt3T5Tfg2uC1CeOki kw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3uxhb5195s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 06:18:05 +0000 Received: from m0356516.ppops.net (m0356516.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3BC6HwX6018918; Tue, 12 Dec 2023 06:18:05 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3uxhb5194n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 06:18:04 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3BC5Lw5W028220; Tue, 12 Dec 2023 06:18:03 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3uw2xyf5jm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 12 Dec 2023 06:18:03 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3BC6I07g44761656 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Dec 2023 06:18:00 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A376920043; Tue, 12 Dec 2023 06:18:00 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5BC1E20040; Tue, 12 Dec 2023 06:17:56 +0000 (GMT) Received: from [9.200.53.32] (unknown [9.200.53.32]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 12 Dec 2023 06:17:56 +0000 (GMT) Message-ID: <8b7e8bf1-89bc-82c4-5b7d-bcbb84f46cb7@linux.ibm.com> Date: Tue, 12 Dec 2023 14:17:54 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: PING^1 [PATCH] sched: Remove debug counter sched_block Content-Language: en-US From: "Kewen.Lin" To: Alexander Monakov , Maxim Kuvyrkov Cc: GCC Patches , Richard Guenther , Richard Sandiford , Jeff Law , Vladimir Makarov , zhroma@ispras.ru, Andrey Belevantsev , Segher Boessenkool , Peter Bergner , Michael Meissner References: <85b4098e-a72f-d013-ff17-8097971f71ba@linux.ibm.com> <09FEFDAE-698B-4B06-A896-8088B9B31539@linaro.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: zxIt0LPn8JaurtEJQ35CtTWbSh0wb0Qc X-Proofpoint-GUID: BES-x-qUljd5uHVMp3r_-r4IhNFzo0V5 Content-Transfer-Encoding: 7bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-12_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1011 spamscore=0 malwarescore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 mlxlogscore=999 suspectscore=0 impostorscore=0 adultscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312120047 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 List-Id: Hi, Gentle ping this: https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636597.html BR, Kewen on 2023/11/15 17:01, Kewen.Lin wrote: > Hi, > > on 2023/11/10 01:40, Alexander Monakov wrote: > >> I agree with the concern. I hoped that solving the problem by skipping the BB >> like the (bit-rotted) debug code needs to would be a minor surgery. As things >> look now, it may be better to remove the non-working sched_block debug counter >> entirely and implement a good solution for the problem at hand. >> > > According to this comment, I made and tested the below patch to remove the > problematic debug counter: > > Subject: [PATCH] sched: Remove debug counter sched_block > > Currently the debug counter sched_block doesn't work well > since we create dependencies for some insns and those > dependencies are expected to be resolved during scheduling > insns but they can get skipped once we are skipping some > block while respecting sched_block debug counter. > > For example, for the below test case: > -- > int a, b, c, e, f; > float d; > > void > g () > { > float h, i[1]; > for (; f;) > if (c) > { > d *e; > if (b) > { > float *j = i; > j[0] = 0; > } > h = d; > } > if (h) > a = i[0]; > } > -- > ICE occurs with option "-O2 -fdbg-cnt=sched_block:1". > > As the discussion in [1], it seems that we think this debug > counter is useless and can be removed. It's also implied > that if it's useful and used often, the above issue should > have been cared about and resolved earlier. So this patch > is to remove this debug counter. > > Bootstrapped and regtested on x86_64-redhat-linux and > powerpc64{,le}-linux-gnu. > > [1] https://gcc.gnu.org/pipermail/gcc-patches/2023-November/635852.html > > Is it ok for trunk? > > BR, > Kewen > ----- > > gcc/ChangeLog: > > * dbgcnt.def (sched_block): Remove. > * sched-rgn.cc (schedule_region): Remove the support of debug count > sched_block. > --- > gcc/dbgcnt.def | 1 - > gcc/sched-rgn.cc | 19 ++++++------------- > 2 files changed, 6 insertions(+), 14 deletions(-) > > diff --git a/gcc/dbgcnt.def b/gcc/dbgcnt.def > index 871cbf75d93..a8c4e61e13d 100644 > --- a/gcc/dbgcnt.def > +++ b/gcc/dbgcnt.def > @@ -198,7 +198,6 @@ DEBUG_COUNTER (pre_insn) > DEBUG_COUNTER (prefetch) > DEBUG_COUNTER (registered_jump_thread) > DEBUG_COUNTER (sched2_func) > -DEBUG_COUNTER (sched_block) > DEBUG_COUNTER (sched_breakdep) > DEBUG_COUNTER (sched_func) > DEBUG_COUNTER (sched_insn) > diff --git a/gcc/sched-rgn.cc b/gcc/sched-rgn.cc > index e5964f54ead..1c8acf5068a 100644 > --- a/gcc/sched-rgn.cc > +++ b/gcc/sched-rgn.cc > @@ -3198,20 +3198,13 @@ schedule_region (int rgn) > current_sched_info->queue_must_finish_empty = current_nr_blocks == 1; > > curr_bb = first_bb; > - if (dbg_cnt (sched_block)) > - { > - int saved_last_basic_block = last_basic_block_for_fn (cfun); > + int saved_last_basic_block = last_basic_block_for_fn (cfun); > > - schedule_block (&curr_bb, bb_state[first_bb->index]); > - gcc_assert (EBB_FIRST_BB (bb) == first_bb); > - sched_rgn_n_insns += sched_n_insns; > - realloc_bb_state_array (saved_last_basic_block); > - save_state_for_fallthru_edge (last_bb, curr_state); > - } > - else > - { > - sched_rgn_n_insns += rgn_n_insns; > - } > + schedule_block (&curr_bb, bb_state[first_bb->index]); > + gcc_assert (EBB_FIRST_BB (bb) == first_bb); > + sched_rgn_n_insns += sched_n_insns; > + realloc_bb_state_array (saved_last_basic_block); > + save_state_for_fallthru_edge (last_bb, curr_state); > > /* Clean up. */ > if (current_nr_blocks > 1) > -- > 2.39.1