lto-cgraph.c (output_cgraph): Output toplevel asms only into first partition.
* lto-cgraph.c (output_cgraph): Output toplevel asms only into first partition. From-SVN: r161904
This commit is contained in:
parent
38be945b90
commit
b0d9e66374
2 changed files with 19 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-07-06 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* lto-cgraph.c (output_cgraph): Output toplevel asms only into first
|
||||
partition.
|
||||
|
||||
2010-07-06 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* doc/gimple.texi (GIMPLE_DEBUG): Document.
|
||||
|
|
|
@ -881,14 +881,21 @@ output_cgraph (cgraph_node_set set, varpool_node_set vset)
|
|||
|
||||
lto_output_uleb128_stream (ob->main_stream, 0);
|
||||
|
||||
/* Emit toplevel asms. */
|
||||
for (can = cgraph_asm_nodes; can; can = can->next)
|
||||
/* Emit toplevel asms.
|
||||
When doing WPA we must output every asm just once. Since we do not partition asm
|
||||
nodes at all, output them to first output. This is kind of hack, but should work
|
||||
well. */
|
||||
if (!asm_nodes_output)
|
||||
{
|
||||
int len = TREE_STRING_LENGTH (can->asm_str);
|
||||
lto_output_uleb128_stream (ob->main_stream, len);
|
||||
for (i = 0; i < len; ++i)
|
||||
lto_output_1_stream (ob->main_stream,
|
||||
TREE_STRING_POINTER (can->asm_str)[i]);
|
||||
asm_nodes_output = true;
|
||||
for (can = cgraph_asm_nodes; can; can = can->next)
|
||||
{
|
||||
int len = TREE_STRING_LENGTH (can->asm_str);
|
||||
lto_output_uleb128_stream (ob->main_stream, len);
|
||||
for (i = 0; i < len; ++i)
|
||||
lto_output_1_stream (ob->main_stream,
|
||||
TREE_STRING_POINTER (can->asm_str)[i]);
|
||||
}
|
||||
}
|
||||
|
||||
lto_output_uleb128_stream (ob->main_stream, 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue