[lto][patch] Merge variable alignments and fix failure to load bodies of static functions

Diego Novillo dnovillo@google.com
Thu Jul 31 21:24:00 GMT 2008


On Thu, Jul 31, 2008 at 00:47, Bill Maddox <maddox@google.com> wrote:

> gcc
>
>        * lto-function-in.c (input_function_decl): Save the
>        old assembler name before renaming static functions.
>        * lto-tree-in.h (struct data_in): Removed field global.
>        Tidy up comments.
>        * lto-section-in.c (struct lto_renaming_slot): New type.
>        (hash_name, eq_name, renaming_slot_free, lto_create_renaming_table,
>        lto_record_renamed_decl, lto_original_decl_name): New functions.
>        * lto-section-in.h (struct lto_file_decl_data): Add field
>        renaming_hash_table.  Fix comments.
>        (lto_create_renaming_table, lto_record_renamed_decl,
>        lto_original_decl_name): Declare.
>        * lto-section-out.c: Remove marker comments.
>
> gcc/lto
>
>        * lto.c (lto_materialize_function): Call lto_original_decl_name.
>        Remove obsolete comments.
>        (lto_read_decls): Remove initialization of deleted field data_in.global.
>        Tidy up comments.
>        (lto_main): Remove redundant initialization of section_hash_table.
>        * lto-elf.c: Removed obsolete comments.
>        * lto.h: Tidy up comments.
>        * lto-symtab.c (lto_least_common_multiple): New function.
>        (lto_symtab_merge_decl): Merge variable alignments in some cases.
>        Tidy up comments.

OK with

>    if (!TREE_PUBLIC (decl))
> -    /* Need to ensure static entities between different files
> -       don't clash unexpectedly.  */
> -    lang_hooks.set_decl_assembler_name (decl);
> +    {
> +      tree old_assembler_name = decl->decl_with_vis.assembler_name;

So, here we don't use DECL_ASSEMBLER_NAME because it may set a
new one, right?  Could you add a comment about it?


Diego.



More information about the Gcc-patches mailing list