From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 74E2839DA519; Fri, 29 Jan 2021 14:39:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 74E2839DA519 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/98863] WRF with LTO consumes a lot of memory in REE, CPROP, PRE and LRA passes Date: Fri, 29 Jan 2021 14:39:10 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: memory-hog, ra 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2021 14:39:10 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98863 --- Comment #26 from Richard Biener --- (In reply to Richard Biener from comment #24) > Created attachment 50087 [details] > updated time and memory report >=20 > This is updated -f{time,mem}-report (with > --enable-gather-detailed-mem-stats) for ltrans34.o And the obvious candidate is the RD DF problem where DF-chain depends on RD. Explicit RD users are haifa (sched_init (), but adds also DF-chain), WEB, REE, loop IV and invariant and DCE. df-problems.c:228 (df_rd_alloc) 1276M: 7.3% 1280= M=20=20=20 33M: 1.6% 0 0 heap df-problems.c:509 (df_rd_transfer_function) 6709M: 38.1% 6709= M=20=20=20 329M: 15.6% 0 0 heap df-problems.c:227 (df_rd_alloc) 7992M: 45.4% 7992= M=20=20=20 200M: 9.5% 0 0 heap but it's odd since in particular IRA does not seem to use DF_CHAIN/DF_RD and at the start of ira() we do have 7GB RSS (for quite some time already, somewhere in loop opt). So the first peak to 7GB is fwprop_init, after add_phi_nodes. Memory is released again after fwprop but since fwprop runs at -O1 it should likely limit itself somehow. Richard? The next pass is (meh), STV, which uses df_chain. Then we have another fwprop instance. Then remove_partial_avx_dependency and STV again, then if-conversion but that doesn't use chain or rd - so sth from before must leak, most likely one of the i386 specific passes after combine. Looks like remove_partial_avx_dependency is the culprit, leaving garbage around and for whatever stupid reason adds a plethora of DF problems...=