From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11705 invoked by alias); 3 May 2013 13:45:33 -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 11669 invoked by uid 48); 3 May 2013 13:45:29 -0000 From: "jamborm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/57084] 483. xalancbmk run fails with -O2 -flto for i686 Date: Fri, 03 May 2013 13:45: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: X-Bugzilla-Severity: normal X-Bugzilla-Who: jamborm at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jamborm 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 X-SW-Source: 2013-05/txt/msg00216.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57084 --- Comment #4 from Martin Jambor 2013-05-03 13:45:28 UTC --- (In reply to comment #3) > > @@ -1993,6 +1994,18 @@ ipa_intraprocedural_devirtualization (gi > > token = OBJ_TYPE_REF_TOKEN (otr); > > fndecl = gimple_get_virt_method_for_binfo (tree_low_cst (token, 1), > > binfo); > > + if (!fndecl) > > + return NULL_TREE; > > + > > + callee = cgraph_get_node (fndecl); > > + if (!callee || callee->global.inlined_to) > > + { > > + if (!canonicalize_constructor_val (fndecl, NULL) > fndecl = canonicalize_constructor_val (fndecl, NULL) > Why do you need TREE_PUBLIC check? Well, as I wrote in the comment above, I basically copied the code what you added to ipa_make_edge_direct_to_target in February this year. The comment there says that "In the case of static functions we are out of luck, since we already removed its body." BTW, we also only check canonicalize_constructor_val return value for non-NULL-ness in that function. Anyway, this was just a proof of concept patch. I suppose that we'll want to put this functionality to a separate function and call it from both ipa_make_edge_direct_to_target and eliminate_bb (in tree-ssa-pre.c). I wonder what name to give it to it though, especially given that cgraph_get_create_real_symbol_node already exits (but unlike what is required IIUC cannot return NULL). cgraph_make_fndecl_callable?