From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id A0D4A38362C7 for ; Thu, 15 Dec 2022 10:32:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A0D4A38362C7 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 7F64B20F7E for ; Thu, 15 Dec 2022 10:32:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1671100326; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=4S4zwmMYK4C69cVwFfx/yZ6TJoMWvuXdvIw5qytjf9I=; b=tj1PNf6l/TwkTtROZm2CyslTiJVWTSqYOl4SR9AuC6QbCZQ+afPmloNleWCbHIDCx9evpi X1waqZ/9SSYjgk0urGnIqrXQ6BX8mHbfez9fzUphWgDEiRY0CSW6UgNuUfBHAPzisuayxv 4G7yd1AMYOgNhSgrrTT9teS5QGrXf/w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1671100326; h=from:from:reply-to:date:date:to:to:cc:mime-version:mime-version: content-type:content-type; bh=4S4zwmMYK4C69cVwFfx/yZ6TJoMWvuXdvIw5qytjf9I=; b=mALra6iN9TuJWC1yW5Pg89qQc/v68wBTi8scIyKjnFwdHVhx7033YhPNgTqeq1O9sq2GeK ebvg59EeKfMF/JBg== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 79E892C141 for ; Thu, 15 Dec 2022 10:32:06 +0000 (UTC) Date: Thu, 15 Dec 2022 10:32:06 +0000 (UTC) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] middle-end/108086 - reduce operand scanner use from inliner User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,MISSING_MID,SPF_HELO_NONE,SPF_PASS,TXREP 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: Message-ID: <20221215103206.eBIPmMKS0pzdRorfv5NaiEzdiWjl1qLat2v43C19Nok@z> The following avoids a redundant second operand scan on all stmts during inlining which shows with PR108086. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR middle-end/108086 * tree-inline.cc (copy_edges_for_bb): Do not update all stmts again. --- gcc/tree-inline.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gcc/tree-inline.cc b/gcc/tree-inline.cc index 15a1a389493..addfe7fcbcc 100644 --- a/gcc/tree-inline.cc +++ b/gcc/tree-inline.cc @@ -2571,12 +2571,8 @@ copy_edges_for_bb (basic_block bb, profile_count num, profile_count den, for (si = gsi_start_bb (new_bb); !gsi_end_p (si);) { - gimple *copy_stmt; bool can_throw, nonlocal_goto; - - copy_stmt = gsi_stmt (si); - if (!is_gimple_debug (copy_stmt)) - update_stmt (copy_stmt); + gimple *copy_stmt = gsi_stmt (si); /* Do this before the possible split_block. */ gsi_next (&si); -- 2.35.3