This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix materialization wrt multiple decls with same assembler name


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]