From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6ABCB385841D; Tue, 2 Apr 2024 10:30:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6ABCB385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712053803; bh=ZdVJre9sxf6VxprERNiTsPo0TFqyiihtM16LH75flIU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DSIzvOM+qOEaSovd05pKJNATMApEm1lyggSI+oMFRS8L6yytd7qc/JsQbYd4nZz8D CDZHYYZqp35aRmvfHJaDstWosTNtV4DxS02fnTy4IH4Zscc0xiWh2ZRz9RNpDPY2i4 4uYp3SNEjnTvb65xk0tqFfdUe6OkGJia/h0MmDq0= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/114557] ehcleanup cleanup_empty_eh_merge_phis eats a lot of memory Date: Tue, 02 Apr 2024 10:30:01 +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: 14.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: NEW 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=3D114557 --- Comment #2 from Richard Biener --- The free_phinodes buckets itself could better use the ->next chain of the gimple stmts rather than a (re-allocated) GC vector. Given the current bucket structure a single chain for the 4-argument case might be good enough. Otherwise hooking into the GC special sizes array might be worthwhile. Note that ggc_free()ing all PHIs (and thus using the GC allocator freelist which has its own issues) is a tiny bit faster than keeping the pool for at least the testcase at hand.=