From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BB44D3858CD1; Thu, 21 Mar 2024 13:15:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BB44D3858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1711026955; bh=dx0prZF7jxRb1IZtIXEld26ZCeTnQ6+WBAbwm2iIdug=; h=From:To:Subject:Date:In-Reply-To:References:From; b=a7bNrPkbi/E2YhMB+bO+R7IQ+7c0y4vcbzxIZggkUEyZc3CyJZq7/s6rjuUS10e65 rRQuSaaNpo6I3heT81X1HU0tYPfNwvkEUUV6t85v/WVNMdT/h0d5cS1begWbM3mRmk JPk5LFI/FcSSUf+zLq/z6lZKeAYh42z6LoR3T1sI= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/101523] Huge number of combine attempts Date: Thu, 21 Mar 2024 13:15:55 +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: 12.0 X-Bugzilla-Keywords: compile-time-hog, memory-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: segher 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=3D101523 --- Comment #40 from Richard Biener --- (In reply to Segher Boessenkool from comment #39) > (In reply to Richard Biener from comment #37) > > Created attachment 57753 [details] > > quick attempt at a limit > >=20 > > So like this? >=20 > Hrm. It should be possible to not have the same test 28 times. Just at = one > spot! Not sure. We loop over log-links multiple times. You could argue we should only call try_combine once ;) But yeah, it's not very pretty, agreed. We could pass the counter to try_combine and have a special return value, (void *)-1 for the failed-and-exhausted case, handling that in retry: like retry: if (next =3D=3D NULL || next =3D=3D (void *)-1) attempts =3D 0; then only the last case where we mangle 'set' and have to restore it on failure would need special casing (and of course try_combine itself). But in a way that's also ugly so I guess I stay with my proposal. At least until somebody actually tried if and how much it helps (and for wh= ich values of the --param).=