From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2824 invoked by alias); 27 Jun 2014 23:04:13 -0000 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 Received: (qmail 2739 invoked by uid 48); 27 Jun 2014 23:04:06 -0000 From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/61635] LTO partitioner does not handle &&label in statics Date: Fri, 27 Jun 2014 23:04: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-Version: 4.8.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hubicka at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: hubicka at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc assigned_to everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-06/txt/msg02263.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61635 Jan Hubicka changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2014-06-27 CC| |hubicka at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |hubicka at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Jan Hubicka --- Yep, this is a known problem. We do not represent labels in symbol table and thus LTO partitioner has no clue about them. I would be interested to see the example that fails - theoretically the problematic static variable should always end up in the same partition as the function using it, because that function is no inline and no clone and should not get duplicated. So kernel & friends should fail only with -flto-partition=1to1 not with ballanced/none/one algorithms. I plan correct solution - I already implemented labels for symtab some time ago but I would like to re-do it on the new API. The poor-man's class hiearchy in C was not very pretty and a lot of code is still not updated to nots assume two basic types of symbols (variables and functions). With Martin Liska we are updating the APIs and once it is done I will add symbols for non-local labels and const_decls.