This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix glibc builds
> On Wed, Nov 12, 2003 at 08:29:14PM +0100, Jan Hubicka wrote:
> > * c-decl.c (finish_decl): Use change_decl_assembler_name.
> > * c-pragma.c (handle_pragma_redefine_extname): Likewise.
> > * varasm.c (make_decl_rtl): Likewise.
> > * cgraph.c (change_decl_assembler_name): New function.
> > * tree.h (set_decl_assembler_name): Kill dead declaration.
> > (change_decl_assembler_name): Declare.
> >
> > * decl.c (make_rtl_for_nonlocal_decl): Use change_decl_assembler_name.
> > * decl2.c (make_rtl_for_nonlocal_decl): Use change_decl_assembler_name.
>
> Mostly ok.
>
> > + /* Check that we didn't introduce entry earlier. */
> > + slot1 =
> > + htab_find_slot_with_hash (cgraph_hash, name,
> > + IDENTIFIER_HASH_VALUE (name), NO_INSERT);
> > + if (slot1)
> > + abort ();
>
> This check is redundant with ...
>
> > + slot =
> > + htab_find_slot_with_hash (cgraph_hash, name,
> > + IDENTIFIER_HASH_VALUE (name), INSERT);
> > + if (*slot)
> > + abort ();
>
> ... this one. Similarly for variables.
>
> I'll say it would be nice if we had a unified hash table, since
> checking everything twice like this is no fun.
The probem is that I would like to keep datastructures different so we
don't end up with unnecesary memory and for most of use in optimizers
this is OK.
Perhaps I can add some functions around to make this easier.
Honza
>
>
> r~