This is the mail archive of the 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: [lto][patch] Fix the decls only after reading all the files

On Thu, Oct 2, 2008 at 14:11, Rafael Espindola <> wrote:

> This patch changes how we fix (link) decls. Currently we keep the
> first one we see and overwrite it when we find the prevailing one.
> With this patch we keep track of the prevailing one but don't update
> anything until we have read all the decls.
> The advantages of doing this is that the code is easier to understand
> since each file is read independently. This is also a requirement for
> updating the cgraph with the symbol resolution information, since
> today when the cgraph is read, the non prevailing defs have already
> been removed.

Excellent!  Thanks for doing this.

> Bootstrapped and regression tested on linux x86-64. I have also
> manually tested a minimal c++ case to check that the NOTHROW updates
> still work.

Can this be included in the testsuite?

> gcc/
> 2008-10-02 Rafael Espindola  <>
>        * lto-function-in.c (global_vector_fixup) Remove. Remove all calls.
> gcc/lto/
> 2008-10-02 Rafael Espindola  <>
>        * lto-symtab.c (lto_symtab_overwrite_decl): Remove. Remove all calls.
>        (lto_symtab_merge_decl): Update  LTO_IDENTIFIER_DECL the reflect the
>        prevailing definition. Don't mark TREE_NOTHROW differences.
>        * lto.c (lto_fixup_tree): New.
>        (lto_fixup_state): New.
>        (lto_fixup_state_aux): New.
>        (free_decl): New.
>        (lto_fixup_decls): New.
>        (lto_main): Call lto_fixup_decls.

> +
> +    /* LTO FIXME: There should be no DECL_ABSTRACT in the middle end. */

s/LTO FIXME/FIXME lto/  (I know I'm being overly anal, but it does
simplify grepping for fixme spots).

OK, otherwise.

Thanks.  Diego.

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