From patchwork Wed Oct 4 12:39:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B8rgen_Kvalsvik?= X-Patchwork-Id: 148296 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:254a:b0:403:3b70:6f57 with SMTP id hf10csp107329vqb; Wed, 4 Oct 2023 05:50:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IElTzptm3YKgepdjeNGADi7iR2LLGJefESuYEuT1MPHiuDAgNx+3PZWXGU1ErzDDl7XFQpz X-Received: by 2002:a05:6402:330:b0:52f:86a1:3861 with SMTP id q16-20020a056402033000b0052f86a13861mr2012038edw.7.1696423851475; Wed, 04 Oct 2023 05:50:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696423851; cv=none; d=google.com; s=arc-20160816; b=0ykekLrfg8ZxP3++YcJpNY3QXFHgsRlXraWQWG0E8kE+FftZ00kGPFHmYOuFljHlCn vBsS7vxMT/wfLugy5+9oh1Wa5DclbhKsKsKOHiBFqYcxyNwtNrsY+PWHCoNL4PL+jpYD OUheDW5weLlUBFfpfnKfN6LXBSXAOwhsOWw2wX78Tcui5DFrw3R8ZGsD0xVJTis0whim +Ww5EKoNmACNxC8GVC7BDsGIcupfc/4iKfIO6f2VxEP+EwFeQt7iaMx57kw/yZ9BNMBL LfQBm0OH0pSDXbu9X6wPEEsIzarmD9CJFCPzcAShi+pY+ur4zDWl2exmJz3NSSFrx1Xv xwKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dmarc-filter:delivered-to; bh=ptPca8bpcLzDTQX4dNXxCwCq/PdKkM+h5W289wqHRfk=; fh=9YvKuYzPOH4H8p6ZxADoseEyE0mG6135swhZOYPib+Q=; b=rAO9tLmY2yZg9+WqOpl3qgmBcr6X0BcF5CCToeU6xgQmGv4EeX0xKKYNvydp1+t5Wx ZoNfEKeyvcLRASFLDOzwFsDuneuJZJBqEkPu4Qy7nv84wdxMyuKGVNa6XjMbRnb45Pvr wTBCs2LGpUPModnWOMU8YXUQ2ZuwZLTer13tVxQTb7bXJjI6T6i3nwyAaa4Rq03uYn4Y MsDfKz6eMpJXecTGlG6k9nfVrnxwJXQ0RJbUdGR3cGrcv6K47ttYaCaeSM9/loMykrj3 axf02lQFPf9Vk8/UGIsjpeJiOg3NcjxQepwb3YEX6uOqnLM7hxH58NnUrCIyE8IzQtO7 yniw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kolabnow.com header.s=dkim20160331 header.b=wm8MafZW; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id r21-20020aa7da15000000b005381611bf18si1625834eds.456.2023.10.04.05.50.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 05:50:51 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@kolabnow.com header.s=dkim20160331 header.b=wm8MafZW; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 04CA1385E012 for ; Wed, 4 Oct 2023 12:43:26 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx.kolabnow.com (mx.kolabnow.com [212.103.80.155]) by sourceware.org (Postfix) with ESMTPS id 9A5F93861814 for ; Wed, 4 Oct 2023 12:41:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9A5F93861814 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=lambda.is Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lambda.is Received: from localhost (unknown [127.0.0.1]) by mx.kolabnow.com (Postfix) with ESMTP id B8C4520C81FD; Wed, 4 Oct 2023 14:41:09 +0200 (CEST) Authentication-Results: ext-mx-out011.mykolab.com (amavis); dkim=pass (4096-bit key) reason="pass (just generated, assumed good)" header.d=kolabnow.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20160331; t=1696423269; x=1698237670; bh=ptPca8bpcLzDTQX4dNXxCwCq/PdKkM+h5W289wqHRfk=; b=wm8MafZW1Fsa ljnA+bmNRKsozqiJPR0egwzspSOFds3ZzNu/bNeNeitOuq55GfDb68JvUyhHPcNI U4UAVMxnLHdWbMSZks6j16ZkXkwXaxI6N0xOzwJu8rPhW+Qe/+m3INMrH6JFiCjm RPeZSqgVRmSvvCjUQBE0YEGNTH+jO6rpvA7K6wuDGeMwThVZwwgdJHHP0vzx2qve tM2ChBhu/9HBfDHG7VXfLYMm61bBXeudUAST8npIwY++YSi8iBhBFbcAKKQzmuzt UD1GPlz9+2CB1KgJpxtI8f8yoW0cqmyuJWONzbVxP3AqSDpfqZ052UEYyLJNOFEj 5vwkEdNFMoMueSzErRiKoOW9JxckjMpan1sgKMMWqje3bW7OpKR0aqneKdeO75GD 3sC170saspvjznxl+90sQFjoWWXnQyggkPJLDoki2VHZBKp4U+mgzM7tF6dsvP0G kEpI1F5U/ZQrMcjcgKrPC61ZrepLpsr2mNNr8DZ0qWQs1wONNIkuoBWg+GVzQ53W LEOgqJIXCxP2MjtnW1Ybp/qhGs1zE2XJSmudeGNzfotMxiq8Jf+mF40JGjAm/2/R MASvKeh1mw8IFhn7I+qEKt+wl0s2c9mztLZw6F/8rZ3JQjAZygQRBpxdF2DaL6Y4 TeSZDL3DSMk7XCcxaQV0sdteiV41cIk= X-Virus-Scanned: amavis at mykolab.com X-Spam-Score: -0.999 X-Spam-Level: X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out011.mykolab.com [127.0.0.1]) (amavis, port 10024) with ESMTP id HoPXmKoz7llK; Wed, 4 Oct 2023 14:41:09 +0200 (CEST) Received: from int-mx011.mykolab.com (unknown [10.9.13.11]) by mx.kolabnow.com (Postfix) with ESMTPS id 101AC20B3670; Wed, 4 Oct 2023 14:41:09 +0200 (CEST) Received: from ext-subm010.mykolab.com (unknown [10.9.6.10]) by int-mx011.mykolab.com (Postfix) with ESMTPS id F34FA3081E50; Wed, 4 Oct 2023 14:41:08 +0200 (CEST) From: =?utf-8?q?J=C3=B8rgen_Kvalsvik?= To: gcc-patches@gcc.gnu.org Cc: mliska@suse.cz, jh@suse.cz, =?utf-8?q?J=C3=B8rgen_Kvalsvik?= Subject: [PATCH 20/22] Don't try to reduce NG from dominators Date: Wed, 4 Oct 2023 21:39:20 +0900 Message-Id: <20231004123921.634024-21-j@lambda.is> In-Reply-To: <20231004123921.634024-1-j@lambda.is> References: <20231004123921.634024-1-j@lambda.is> MIME-Version: 1.0 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778829336353041900 X-GMAIL-MSGID: 1778829336353041900 The presence of gotos already makes this iffy, but it is already not necessary as reducing by refining the G should cover it. --- gcc/tree-profile.cc | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/gcc/tree-profile.cc b/gcc/tree-profile.cc index f329be84ad2..d1d7265cd1c 100644 --- a/gcc/tree-profile.cc +++ b/gcc/tree-profile.cc @@ -788,25 +788,6 @@ isolate_expression (conds_ctx &ctx, basic_block p, vec& out) gcc_assert (bitmap_count_bits (expr) > 2); bitmap_copy (prev, expr); - const unsigned NGlen = NG.length (); - for (unsigned i = 0; i != NGlen - 1; i++) - { - for (unsigned j = i+1; j != NGlen; j++) - { - basic_block b = nearest_common_dominator (CDI_DOMINATORS, NG[i], NG[j]); - if (ctx.index_map[b->index] > ctx.index_map[p->index]) - { - bitmap_clear_bit (expr, NG[i]->index); - bitmap_clear_bit (expr, NG[j]->index); - bitmap_set_bit (expr, b->index); - NG.safe_push (b); - } - } - } - for (unsigned i = 0; i != NG.length (); i++) - if (!bitmap_bit_p (expr, NG[i]->index)) - NG.unordered_remove (i--); - bitmap_copy (expr, reachable); for (const basic_block neighbor : NG) {