This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix materialization wrt multiple decls with same assembler name
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, rguenther at suse dot de, dnovillo at google dot com
- Date: Fri, 20 Aug 2010 07:36:08 -0700
- Subject: Re: Fix materialization wrt multiple decls with same assembler name
- References: <20100820115413.GD9926@kam.mff.cuni.cz>
On Fri, Aug 20, 2010 at 4:54 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> LTO sreaming in is reading in all function that do have corresponding sections
> (based on assebmler name).
>
> This breaks when we have two decls with same assembler name (that is the case
> of bultins). In this case we would attempt to read same body to two different
> declarations that naturally breaks in many interesting ways and thus we test
> DECL_IS_BUILTIN to avoid materialization.
>
> This test is just symptomatic, since it won't work with user aliases and such.
> I am also running into problem with DECL_IS_BUILTIN returning true for all
> compiler born functions since it test locator and UNKNOWN_LOCATION is considred
> to be builtin.
>
> This patch changes lto_materialize_function to work out from callgraph if
> function body is needed instead of checking presence of the section. ?This is
> the case when cgraph node is analyzed or when it have such clone.
>
> Bootstrapped/regtested x86_64, testing with mozilla build now, OK?
>
> Honza
>
> ? ? ? ?* lto/lto.c (has_analyzed_clone_p): New function
> ? ? ? ?(lto_materialize_function): Use callgraph to determine if
> ? ? ? ?body is needed.
> ? ? ? ?(materialize_cgraph): Remove DECL_IS_BUILTIN check.
Your checkin is different from you posted and caused:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45357
--
H.J.