2014-06-07 Jan Hubicka <hubicka@ucw.cz>
+ * varasm.c (use_blocks_for_decl_p): Check symbol table instead of alias
+ attribute.
+ (place_block_symbol): Recurse on aliases.
+
+2014-06-07 Jan Hubicka <hubicka@ucw.cz>
+
* ipa-visibility.c: Include varasm.h
(can_replace_by_local_alias): Ceck decl_binds_to_current_def_p.
static bool
use_blocks_for_decl_p (tree decl)
{
+ struct symtab_node *snode;
+
/* Only data DECLs can be placed into object blocks. */
if (TREE_CODE (decl) != VAR_DECL && TREE_CODE (decl) != CONST_DECL)
return false;
/* If this decl is an alias, then we don't want to emit a
definition. */
- if (lookup_attribute ("alias", DECL_ATTRIBUTES (decl)))
+ if (TREE_CODE (decl) == VAR_DECL
+ && (snode = symtab_get_node (decl)) != NULL
+ && snode->alias)
return false;
return targetm.use_blocks_for_decl_p (decl);
if (snode->alias)
{
rtx target = DECL_RTL (symtab_alias_ultimate_target (snode)->decl);
+
+ place_block_symbol (target);
SYMBOL_REF_BLOCK_OFFSET (symbol) = SYMBOL_REF_BLOCK_OFFSET (target);
return;
}