From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 86EC13858C52; Fri, 23 Sep 2022 07:38:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 86EC13858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663918697; bh=pwmJ0uu9/bnXeMu8uYmHeBy0DBHl09O1G/KUZQJ9ABI=; h=From:To:Subject:Date:From; b=f1XL6mGCKGMYxQhimEiuG9XFK9v+KE7AW2OoZnKfzo+FRDMN/9Vn8uBb5UHkkqv32 MZlTxmWeFrI+fYZub8G0WYviOgRUjuTBa1JJs1tia6hIttBSj+zfmN3lxfsZkJLXRh VNSEFsE0/SNeBsxe7AQ2P/ilR/EaWucU4zrpVABk= From: "jirislaby at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/107014] New: flatten+lto Date: Fri, 23 Sep 2022 07:38:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 12.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jirislaby at gmail dot com X-Bugzilla-Status: UNCONFIRMED 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: 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=3D107014 Bug ID: 107014 Summary: flatten+lto Product: gcc Version: 12.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto Assignee: unassigned at gcc dot gnu.org Reporter: jirislaby at gmail dot com CC: marxin at gcc dot gnu.org Target Milestone: --- Maybe this is simply a dup of bug 77472, but I am not sure what the proper solution is supposed to be. In the kernel, when LTO is enabled, we disable flatten completely, so that = the build is able to finish -- in ~ 2 minutes, w/ 4G of RAM. With flatten enabled, the build didn't finish in 10 minutes, eating 40G of = RAM at that point. There is only a single user of flatten in the kernel: pcpu_build_alloc_info= (). Here: https://github.com/torvalds/linux/blob/bf682942cd26ce9cd5e87f73ae099b383041= e782/mm/percpu.c#L2852-L2855 And that on its own makes the link not to finish in a reasonable time, with reasonable RAM. I suppose much inlining happens in such a long function. Bu= t: shouldn't really there be any limit? I am going to link this bug in the commit message disabling flatten on LTO,= so that we have a reference of why/how...=