From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CE06E3858C50; Thu, 9 Feb 2023 09:11:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE06E3858C50 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675933869; bh=unNhRrBCaKGOnM+Vg58438hELfxiXatC/odK1OWHDu0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SJQUWUHn2JeGLAU9Ir/XWofb+T95e+55oMXba+NIf2RV3beyTTaMpg42/urTVO9Lb 4i6J83hjknMd5YGfDpOBKlvFkGs5TNh7TH1rc3l7oy+QEM6jiJr+cdif/I74zAkxyI lkBIpUMuow8vHqpuiDl4qPEs5x/3wHhHuos8iPZ8= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108738] compile-time and memory-hog in mdreorg Date: Thu, 09 Feb 2023 09:11:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_reconfirmed_on everconfirmed cf_known_to_fail bug_status assigned_to 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=3D108738 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2023-02-09 Ever confirmed|0 |1 Known to fail| |10.4.0 Status|UNCONFIRMED |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot = gnu.org --- Comment #2 from Richard Biener --- Happens at least since GCC 10. There's a comment already: /* ??? The following is quadratic since analyze_register_chain iterates over all refs to look for dual-mode regs. Instead this should be done separately for all regs mentioned in the chain once. */ df_ref ref; for (ref =3D DF_INSN_UID_DEFS (insn_uid); ref; ref =3D DF_REF_NEXT_LOC (r= ef)) if (!HARD_REGISTER_P (DF_REF_REG (ref))) analyze_register_chain (candidates, ref); but the walk also adds to the queue, so it's more interwinded and the sugge= sted solution isn't the proper. Instead it might be possible to just record already visited regs.=