From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id 589D53858D32; Mon, 24 Apr 2023 07:26:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 589D53858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682321184; bh=Z5ImASGxWtPhdXbuXxsPQzmUwvsvhqts4OhfWSMRF6k=; h=From:To:Subject:Date:From; b=o8udZ2OwraW/kAfEn+avH6RVNKgpmfoTZYc0D4VQXlur0FfxEEuTU/8rIZc9MQ1y+ tt86X9/TbD/lEEMHonKMhNXbHxRjGHYxJQ3/IG7BMcrlrsUxuLjy1BrwoEQhQY1Ryk IWTcDkPI3Jkz2sBVo72qKUBtlZ6BvaqKuMTuTv48= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Richard Biener To: gcc-cvs@gcc.gnu.org Subject: [gcc r14-186] Avoid repeated forwarder_block_p calls in CFG cleanup X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/heads/master X-Git-Oldrev: ff8f95449350372b584cfcd28a7d9d71f52eea50 X-Git-Newrev: 28c06d0ed134d7d325da101e7e4230067cebeab3 Message-Id: <20230424072624.589D53858D32@sourceware.org> Date: Mon, 24 Apr 2023 07:26:24 +0000 (GMT) List-Id: https://gcc.gnu.org/g:28c06d0ed134d7d325da101e7e4230067cebeab3 commit r14-186-g28c06d0ed134d7d325da101e7e4230067cebeab3 Author: Richard Biener Date: Wed Apr 19 11:24:00 2023 +0200 Avoid repeated forwarder_block_p calls in CFG cleanup CFG cleanup maintains BB_FORWARDER_BLOCK and uses FORWARDER_BLOCK_P to check that apart from two places which use forwarder_block_p in outgoing_edges_match alongside many BB_FORWARDER_BLOCK uses. The following adjusts those. * cfgcleanup.cc (outgoing_edges_match): Use FORWARDER_BLOCK_P. Diff: --- gcc/cfgcleanup.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/cfgcleanup.cc b/gcc/cfgcleanup.cc index 78f59e99653..5f1aa29c89d 100644 --- a/gcc/cfgcleanup.cc +++ b/gcc/cfgcleanup.cc @@ -1861,9 +1861,9 @@ outgoing_edges_match (int mode, basic_block bb1, basic_block bb2) /* fallthru edges must be forwarded to the same destination. */ if (fallthru1) { - basic_block d1 = (forwarder_block_p (fallthru1->dest) + basic_block d1 = (FORWARDER_BLOCK_P (fallthru1->dest) ? single_succ (fallthru1->dest): fallthru1->dest); - basic_block d2 = (forwarder_block_p (fallthru2->dest) + basic_block d2 = (FORWARDER_BLOCK_P (fallthru2->dest) ? single_succ (fallthru2->dest): fallthru2->dest); if (d1 != d2)