From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6977 invoked by alias); 23 Oct 2012 13:59:53 -0000 Received: (qmail 6919 invoked by uid 55); 23 Oct 2012 13:59:38 -0000 From: "hubicka at ucw dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/54966] Does LTO requires a larger inline-unit-growth? Date: Tue, 23 Oct 2012 13:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Keywords: lto X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at ucw dot cz X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-10/txt/msg02054.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54966 --- Comment #4 from Jan Hubicka 2012-10-23 13:59:38 UTC --- > I'm not sure how we count the initial unit size, given that when not using > LTO not merged comdats are probably counted here, so overall they add up > while the initial LTO unit size may be considerably smaller than the sum > of the non-LTO unit sizes. I do not realy see problem here. We simply count size of the unit by summing all the functions in the callgraph prior inlining (after merging). So in the case of LTO we count COMDATs once and if they are unused by non-LTO we promote them to static and get better inlining due removing offline copies (that we are acccounting as inline decisions are made). In the case of non-LTO we count COMDAT in every unit that has the COMDAT used + we have heuristic predicting that most likely the COMDAT will be eliminated in the other units, too, if it is eliminated in the current unit. So we inline them almost as aggressively as statics, but not quite. What kind of problem are you looking into? Honza