Fwd: [lto][patch] Remove the comdat_group langhook

Rafael Espindola espindola@google.com
Fri Jan 9 15:33:00 GMT 2009


I forgot to CC gcc-patches.


---------- Forwarded message ----------
From: Diego Novillo <dnovillo@google.com>
Date: 2009/1/9
Subject: Re: [lto][patch] Remove the comdat_group langhook
To: Rafael Espindola <espindola@google.com>
Cc: lto-team <lto-team@google.com>


On Thu, Jan 8, 2009 at 14:50, Rafael Espindola <espindola@google.com> wrote:

> @@ -7233,7 +7234,7 @@ ix86_file_end (void)
>                            error_mark_node);
>         TREE_PUBLIC (decl) = 1;
>         TREE_STATIC (decl) = 1;
> -       DECL_ONE_ONLY (decl) = 1;
> +       DECL_COMDAT_GROUP (decl) = lhd_comdat_group (decl);

No point calling an lhd if you're removing the whole langhook.
Just call DECL_ASSEMBLER_NAME() directly.  This will let you
remove all the extraneous includes of langhooks-def.h.

> +  /* FIXME lto: This warning is incomplete in the LTO branch. The is caused
> +     by the removal of the comdat_group langhook. It changed the order
> +     in which decl_assembler_names are computed, and this confuses the
> +     c++ FE global variables. Has something to do with the function
> +     problematic_instantiation_changed. */

I'm not sure I follow this.  What do you mean by 'confuses c++ FE
global variables'?  How is problematic_instantiation_changed
related?

> @@ -308,10 +308,10 @@ lhd_decl_ok_for_sibcall (const_tree decl ATTRIBUTE_UNUSED)
>
>  /* Return the COMDAT group into which DECL should be placed.  */
>
> -const char *
> +tree
>  lhd_comdat_group (tree decl)
>  {
> -  return IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
> +  return DECL_ASSEMBLER_NAME (decl);
>  }

Just remove this one.  It's not needed anymore.

OK with those changes.


Diego.



-- 
Rafael Avila de Espindola

Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047



More information about the Gcc-patches mailing list