+2013-06-12 Jan Hubicka <jh@suse.cz>
+
+ * cgraph.c (verify_edge_corresponds_to_fndecl): Be lax about
+ decl has when in streaming stage.
+ * lto-symtab.c (lto_symtab_merge_symbols): Likewise.
+ * cgraph.h (cgraph_state): Add CGRAPH_LTO_STREAMING.
+
2013-06-12 Roland Stigge <stigge@antcom.de>
PR target/57578
if (!decl || e->callee->global.inlined_to)
return false;
+ if (cgraph_state == CGRAPH_LTO_STREAMING)
+ return false;
node = cgraph_get_node (decl);
/* We do not know if a node from a different partition is an alias or what it
CGRAPH_STATE_PARSING,
/* Callgraph is being constructed. It is safe to add new functions. */
CGRAPH_STATE_CONSTRUCTION,
+ /* Callgraph is being at LTO time. */
+ CGRAPH_LTO_STREAMING,
/* Callgraph is built and IPA passes are being run. */
CGRAPH_STATE_IPA,
/* Callgraph is built and all functions are transformed to SSA form. */
also re-populate the hash translating decls into symtab nodes*/
FOR_EACH_SYMBOL (node)
{
- cgraph_node *cnode;
+ cgraph_node *cnode, *cnode2;
if (!node->symbol.analyzed && node->symbol.alias_target)
{
symtab_node tgt = symtab_node_for_asm (node->symbol.alias_target);
symtab_resolve_alias (node, tgt);
}
node->symbol.aux = NULL;
+
if (!(cnode = dyn_cast <cgraph_node> (node))
|| !cnode->clone_of
|| cnode->clone_of->symbol.decl != cnode->symbol.decl)
- symtab_insert_node_to_hashtable ((symtab_node)node);
+ {
+ if (cnode && DECL_BUILT_IN (node->symbol.decl)
+ && (cnode2 = cgraph_get_node (node->symbol.decl))
+ && cnode2 != cnode)
+ lto_cgraph_replace_node (cnode2, cnode);
+ symtab_insert_node_to_hashtable ((symtab_node)node);
+ }
}
}
}
+2013-06-12 Jan Hubicka <jh@suse.cz>
+
+ * lto.c (read_cgraph_and_symbols): Set cgraph into streaming state.
+
2013-06-12 Jan Hubicka <jh@suse.cz>
* lto.c (register_resolution): Take lto_file_data argument.
/* True, since the plugin splits the archives. */
gcc_assert (num_objects == nfiles);
}
+ cgraph_state = CGRAPH_LTO_STREAMING;
tree_with_vars = htab_create_ggc (101, htab_hash_pointer, htab_eq_pointer,
NULL);
error_found = true;
}
- hashed_node = symtab_get_node (node->symbol.decl);
- if (!hashed_node)
+ if (cgraph_state != CGRAPH_LTO_STREAMING)
{
- error ("node not found in symtab decl hashtable");
- error_found = true;
+ hashed_node = symtab_get_node (node->symbol.decl);
+ if (!hashed_node)
+ {
+ error ("node not found in symtab decl hashtable");
+ error_found = true;
+ }
}
if (assembler_name_hash)
{