On 8 April 2013 22:08:54 Jan Hubicka <hubi...@ucw.cz> wrote:
Hi,
this patch makes change_decl_assembler_name to do the right thing with inline
clones.  My original plan was to remove inline clones from assembler_name_hash,
but it hits the problem that we currently need to make them unique for purposes
of LTO sreaming.

It is not hard to walk the clone tree and update it.
Later we can reorg streaming to not rely on uniqueness of symbol names of function
bodies not associated with a real symbol and perhaps simplify this somewhat.

Bootstrapped/regtested x86_64-linux, will commit it shortly.

        PR lto/54095
        * symtab.c (insert_to_assembler_name_hash): Handle clones.
        (unlink_from_assembler_name_hash): Likewise.
        (symtab_prevail_in_asm_name_hash, symtab_register_node,
        symtab_unregister_node, symtab_initialize_asm_name_hash,
        change_decl_assembler_name): Update.
        
Index: symtab.c
===================================================================
*** symtab.c    (revision 197551)
--- symtab.c    (working copy)
*************** eq_assembler_name (const void *p1, const
*** 102,108 ****
  /* Insert NODE to assembler name hash.  */

  static void
! insert_to_assembler_name_hash (symtab_node node)
  {
    if (is_a <varpool_node> (node) && DECL_HARD_REGISTER (node->symbol.decl))
      return;
--- 102,108 ----
  /* Insert NODE to assembler name hash.  */

  static void
! insert_to_assembler_name_hash (symtab_node node, bool with_clones)
  {
    if (is_a <varpool_node> (node) && DECL_HARD_REGISTER (node->symbol.decl))
      return;
*************** insert_to_assembler_name_hash (symtab_no
*** 111,116 ****
--- 111,119 ----
    if (assembler_name_hash)
      {
        void **aslot;
+       struct cgraph_node *cnode;
+       tree decl = node->symbol.decl;
+         tree name = DECL_ASSEMBLER_NAME (node->symbol.decl);

Maybe use decl here?
Thanks,


Sent with AquaMail for Android
http://www.aqua-mail.com


Reply via email to