diff options
author | Jan Hubicka <jh@suse.cz> | 2010-07-07 14:04:09 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-07-07 12:04:09 +0000 |
commit | b0d9e66374cae4f996a4a2f8f2a58b9f70819ad1 (patch) | |
tree | 673227f670cc8407b1b362afe606908aa7b44318 /gcc | |
parent | 38be945b90fb0b72fda14d60ade541b9f7874e06 (diff) | |
download | gcc-b0d9e66374cae4f996a4a2f8f2a58b9f70819ad1.zip gcc-b0d9e66374cae4f996a4a2f8f2a58b9f70819ad1.tar.gz gcc-b0d9e66374cae4f996a4a2f8f2a58b9f70819ad1.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/lto-cgraph.c | 21 |
2 files changed, 19 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b42a64f..6c661c8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index 4217a71..04f5407 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -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); |