From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84]) by sourceware.org (Postfix) with ESMTPS id 229D1385800D for ; Wed, 15 Nov 2023 09:43:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 229D1385800D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=ispras.ru Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=ispras.ru ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 229D1385800D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=83.149.199.84 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700041430; cv=none; b=Ixc5Nxu3Tzwvwtdwf+UbHr6nVN0LwzmjsxDB6egOvmbhHW99dt8W+3+UkP3WGiCRDhUFDMhDL1wggLyf2GDtIqNqLxUbV+HsSn9sWaIMnb58OEGEIcxHLMU9Nulllifect8IwKUHdycm2r8PJ+Htzbz2KmgkTMaMi5NpLcWYJlY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700041430; c=relaxed/simple; bh=Xv+J8+6TKYOluw2ueNEqUgOlF570OMlNETg3dWX4RT0=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=iB7Geam/cuk3upnUHAJz6c7zcvmiUXPta35AKFT8veO7llOleIPPefpi/8ALsmTa7HnWI64SwgFsYrpgmk3oUYUUr6ov/r+Wb6Q6Wp2rMfrEHMecoC4aU6VNLA/PoOkr4MySJ/Hr1TX31K50ZdG/AhzOjs5ctxVr8pyVQuBNN3Q= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from [10.10.3.121] (unknown [10.10.3.121]) by mail.ispras.ru (Postfix) with ESMTPS id 1847040F1DC9; Wed, 15 Nov 2023 09:43:47 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru 1847040F1DC9 Date: Wed, 15 Nov 2023 12:43:47 +0300 (MSK) From: Alexander Monakov To: "Kewen.Lin" cc: Richard Biener , Jeff Law , Maxim Kuvyrkov , GCC Patches , Richard Sandiford , Jeff Law , Vladimir Makarov , zhroma@ispras.ru, Andrey Belevantsev , Segher Boessenkool , Peter Bergner , Michael Meissner , Alexandre Oliva Subject: Re: PING^1 [PATCH v3] sched: Change no_real_insns_p to no_real_nondebug_insns_p [PR108273] In-Reply-To: <475af219-f250-a0f4-78b0-998f96fb24aa@linux.ibm.com> Message-ID: References: <85b4098e-a72f-d013-ff17-8097971f71ba@linux.ibm.com> <09FEFDAE-698B-4B06-A896-8088B9B31539@linaro.org> <4675c26c-f230-b6d6-27c5-bc9f74736e38@linux.ibm.com> <41a4d065-c4b6-4a67-adf0-e84e942616c7@gmail.com> <93ce3468-a1ee-e77c-cbeb-a8c67a303bf9@ispras.ru> <7eb725d9-de7c-87ba-5ebd-f2e1485c5854@ispras.ru> <475af219-f250-a0f4-78b0-998f96fb24aa@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,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: On Wed, 15 Nov 2023, Kewen.Lin wrote: > >> And I suppose it would be OK to do that. Empty BBs are usually removed by > >> CFG cleanup so the situation should only happen in rare corner cases where > >> the fix would be to actually run CFG cleanup ... > > > > Yeah, sel-sched invokes 'cfg_cleanup (0)' up front, and I suppose that > > may be a preferable compromise for sched-rgn as well. > > Inspired by this discussion, I tested the attached patch 1 which is to run > cleanup_cfg (0) first in haifa_sched_init, it's bootstrapped and > regress-tested on x86_64-redhat-linux and powerpc64{,le}-linux-gnu. I don't think you can run cleanup_cfg after sched_init. I would suggest to put it early in schedule_insns. > Then I assumed some of the current uses of no_real_insns_p won't encounter > empty blocks any more, so made a patch 2 with some explicit assertions, but > unfortunately I got ICEs during bootstrapping happens in function > compute_priorities. I'm going to investigate it further and post more > findings, but just heads-up to ensure if this is on the right track. I suspect this may be caused by invoking cleanup_cfg too late. Alexander