[lto][patch] Small fixes for DECL_ASSEMBLE_NAME computation
Wed Jan 14 20:40:00 GMT 2009
> Sorry, I don't follow. Specifically, I'm asking:
> 1- Why is this hunk needed?
> - /* If DECL is ignored or already has its assembler name set, it does
> - not need a new one. */
> - if (DECL_IGNORED_P (decl)
> - || !HAS_DECL_ASSEMBLER_NAME_P (decl)
> + /* If DECL already has its assembler name set, it does not need a
> new one. */
> + if (!HAS_DECL_ASSEMBLER_NAME_P (decl)
> || DECL_ASSEMBLER_NAME_SET_P (decl))
> return false;
Because without it we try to compute the assembler name of some
variables after free_lang_specifics. With this hunk, more assembler
names are computed earlier.
> 2- Why is this hunk needed? The map 'decl_for_uid_map' should contain
> ALL the decls that were created by the compiler. Meaning that every
> node->decl in the cgraph should *also* exist in decl_for_uid_map, why
> isn't this the case?
It is. set_asm_name gets called on that decl. The problem is that it
does nothing, since it things the decl is not necessary.
> OK, but is the patch part of another fix? Perhaps it would be clearer
> if you put them together so that you can include a test case. All by
> themselves these changes make no sense to me. I'm missing something,
> I'm sure.
What I am trying to fix is the DECL_CONTEXT (t) =
decl_function_context (t) FIXME. Do you agree that we should not
compute assembler names after free_lang_specifics is done? What this
patch does is fixes some cases where we were doing that.
> Thanks. 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