This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [lto][patch] Fix the decls only after reading all the files
- From: "Diego Novillo" <dnovillo at google dot com>
- To: "Rafael Espindola" <espindola at google dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 2 Oct 2008 17:24:59 -0400
- Subject: Re: [lto][patch] Fix the decls only after reading all the files
- References: <38a0d8450810021111s378cae50n14e2ce8b7bd16bbd@mail.gmail.com>
On Thu, Oct 2, 2008 at 14:11, Rafael Espindola <espindola@google.com> 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 <espindola@google.com>
>
> * lto-function-in.c (global_vector_fixup) Remove. Remove all calls.
>
> gcc/lto/
> 2008-10-02 Rafael Espindola <espindola@google.com>
>
> * 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.