From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EF4EE3856976; Fri, 28 Jul 2023 08:01:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EF4EE3856976 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690531270; bh=BdF0inQcpmwFVMEDw546K/Dc/UBgwxj40GtBmNcSG2M=; h=From:To:Subject:Date:In-Reply-To:References:From; b=azBWckbRI5WTx5ZY5/wnvxzg5FoaDFPljGbrCOVdrvCHQ7BCad6ywBbrgq1vsLIcl KkJfyHy3Sjbto/XidlWLQppDZO0DZ/9nB/yUjS5xRED8L7dnqj7esNC+olr1tXfXjz XeWAA5tisa23VEQ6+2+f8h3N+3d6nAJfOZqdw3Js= From: "hubicka at ucw dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106293] [13/14 Regression] 456.hmmer at -Ofast -march=native regressed by 19% on zen2 and zen3 in July 2022 Date: Fri, 28 Jul 2023 08:01:09 +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: hubicka at ucw dot cz X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.3 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=3D106293 --- Comment #19 from Jan Hubicka --- > This heuristic wants to catch >=20 > > if (foo) abort (); > >=20 > and avoid sinking "too far" across a path with "similar enough" > execution count (I think the original motivation was to fix some > spilling / register pressure issue). The loop depth test > should be !(bb_loop_depth (best_bb) < bb_loop_depth (early_bb)) I am still concenred that loop_depth (bb1) < loop_depth (bb2) does not really imply that bb1 is not in different loop nest with loop with significantly higher iteration count than bb2... > so we shouldn't limit sinking to a more outer nest. As we rule > out > before this becomes =3D=3D. >=20 > It looks tempting to sink to the earliest place with the same > execution count rather than the latest but the above doesn't > really achive that (it doesn't look "upwards" but simply fails). > With a guessed profile it's also going to be hard. Statistically guessed profile works quite well for things like placement of splills in IRA (not perfectly of course) and this looks like kind of similar thing. So perhaps it could work reasoably well... >=20 > And it in no way implements register pressure / spilling sensitivity > (see also Ajits attempts at producing a patch that avoids sinking > across a call). All these are ultimatively doomed unless we at least > consider a group of stmts together. hmm, life is hard :) Honza=