From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D10293858D37; Thu, 1 Dec 2022 06:54:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D10293858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669877695; bh=0bqvpU9CIAmHQvIWOrE3xQpRYuTxha0DWdY43R+4m9M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DM1hmCJRtdCBtbdWraNwoWlGejv8oxX7np7vZg5q+1fv2LH5zY3Z4NZjIf9aoxk8i QDeucpecD0ytEg6/B7Eq/xYqz7CNj6WvcfVRROGFVqWChf9HQtN9JGWtPitjAgaAua I2wDCcqWOE9XUwSEMX0P7fTxCP25BWF1Bz5QPI8Q= From: "rvmallad at amazon dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/107409] Perf loss ~5% on 519.lbm_r SPEC cpu2017 benchmark with r10-5090-ga9a4edf0e71bba Date: Thu, 01 Dec 2022 06:54:55 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: rvmallad at amazon dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107409 --- Comment #9 from Rama Malladi --- (In reply to Martin Li=C5=A1ka from comment #3) > Can you please share perf-profile before and after the revision? >=20 > Note I can't see it for Altra aarch64 CPU: > https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=3D633.477.0&plot. > 1=3D683.477.0&plot.2=3D664.477.0&plot.3=3D648.477.0&plot.4=3D618.477.0&pl= ot.5=3D605. > 477.0&plot.6=3D759.477.0&plot.7=3D584.477.0& >=20 > However, there are huge changes in between GCC 6/7 and a newer releases. > Note the benchmark is pretty small and very sensitive to instruction cach= es. Hi, I got IPC data for baseline version of compiler and with this patch reverted. This is on Graviton3 processor machine, executing 1-copy rate run of 519.lb= m_r. Baseline: Compiler commit ID: f896c13489d22b30d01257bc8316ab97b3359d1c Cycles: 148,489,372,938 Instructions: 382,748,379,257 IPC: 2.58 Baseline with code change in a9a4edf0e71bbac9f1b5dcecdcf9250111d16889 rever= ted. $ git diff gcc/tree-cfg.cc diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc index d982988048f..736432713fe 100644 --- a/gcc/tree-cfg.cc +++ b/gcc/tree-cfg.cc @@ -9984,7 +9984,7 @@ execute_fixup_cfg (void) } if (scale) { - update_max_bb_count (); +// update_max_bb_count (); compute_function_frequency (); } Cycles: 140,937,228,769 Instructions: 368,881,714,982 IPC: 2.62 >From the above, I do see the instructions executed are higher for the basel= ine compiler code-gen vs. the one with patch reverted. Can you please look into= the code-gen and let me know if you find some perf opportunity with this patch revert? Thank you.=