From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5103D3858C53; Thu, 2 Mar 2023 11:39:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5103D3858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677757140; bh=ihDkPS0sFN5jap1Foag5BoOh75q2Q90uztcPSJYM4j8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=P2OwI4NiNWwf2ZOOVA0z0yThqk38htm1lxl62mD87FhNowRHQDzVCcHdmmIwCj8AH d2JGxO3Wk54D68KzoQ4d3/jUUvAKGFLbTc11jHV6D0MVOhYESlmSsn9H1kqmaXdv1i iGiviAL8pFpvMHQ4LyILN69TDwT8TO7KxFWL1CuE= 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, 02 Mar 2023 11:38:59 +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: 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 --- Comment #7 from Richard Biener --- So it's now better than before but still quadratic. Finding a strathegic place to limit the search with some --param might be a solution, but there's no easy point to hook that into. You'd not want to disable the whole pass but terminate the greedy search and axe the candidates sofar processed (to not = run into the same ones again), which might then result in "odd" STV decisions if the remains are picked up. To avoid this maybe maintain a "too big" set of candidates and if a further greedy search lands at a insn in that set, axe that search= as well. Note it's not the size of the set but the complexity of the search t= hat needs limiting, so count the number of ref visits through analyze_register_chain for an invocation of scalar_chain::build and limit that to some --param. I'm trying to prototype that.=