[Bug lto/71089] [7 Regression] Failed to build 483.xalancbmk in SPEC CPU 2006
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71089 Jan Hubicka changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #8 from Jan Hubicka --- Fixed a while ago
[Bug lto/71089] [7 Regression] Failed to build 483.xalancbmk in SPEC CPU 2006
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71089 --- Comment #7 from Jan Hubicka --- > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71089 > > --- Comment #6 from Markus Trippelsdorf --- > (In reply to Jan Hubicka from comment #5) > > Hi, > > I reproduced the firefox ICE now (it needs -O3 instead of default flags). I > > am testing > > the following patch which fixes some confusion between thunk and non-thunk > > inline clones > > (there can be both, because we can first inline thunk, then inline into > > thunk and then > > inline the whole thing again) > > The segfault is gone, but I still see the ICE: > > lto1: internal compiler error: in lto_output_node, at lto-cgraph.c:473 I reproduce it too, I am looking into it now. I have also patch to fix the metrics to tell inliner that thunks are really cheap. Without this patch we inline a lot of thunks and seem to trip some itneresting cases for partitioning. Honza
[Bug lto/71089] [7 Regression] Failed to build 483.xalancbmk in SPEC CPU 2006
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71089 --- Comment #6 from Markus Trippelsdorf --- (In reply to Jan Hubicka from comment #5) > Hi, > I reproduced the firefox ICE now (it needs -O3 instead of default flags). I > am testing > the following patch which fixes some confusion between thunk and non-thunk > inline clones > (there can be both, because we can first inline thunk, then inline into > thunk and then > inline the whole thing again) The segfault is gone, but I still see the ICE: lto1: internal compiler error: in lto_output_node, at lto-cgraph.c:473 0x10594813 lto_output_node ../../gcc/gcc/lto-cgraph.c:473 0x10594813 output_symtab() ../../gcc/gcc/lto-cgraph.c:1021 0x105acb6f lto_output() ../../gcc/gcc/lto-streamer-out.c:2386 0x106365db write_lto ../../gcc/gcc/passes.c:2452 0x1063be17 ipa_write_optimization_summaries(lto_symtab_encoder_d*) ../../gcc/gcc/passes.c:2656 0x1017d743 do_stream_out ../../gcc/gcc/lto/lto.c:2294 0x1018c88b stream_out ../../gcc/gcc/lto/lto.c:2358 0x1018c88b lto_wpa_write_files ../../gcc/gcc/lto/lto.c:2475 0x1018c88b do_whole_program_analysis ../../gcc/gcc/lto/lto.c:3157 0x1018c88b lto_main() ../../gcc/gcc/lto/lto.c:3317
[Bug lto/71089] [7 Regression] Failed to build 483.xalancbmk in SPEC CPU 2006
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71089 --- Comment #5 from Jan Hubicka --- Hi, I reproduced the firefox ICE now (it needs -O3 instead of default flags). I am testing the following patch which fixes some confusion between thunk and non-thunk inline clones (there can be both, because we can first inline thunk, then inline into thunk and then inline the whole thing again) Index: ipa-inline-transform.c === --- ipa-inline-transform.c (revision 236275) +++ ipa-inline-transform.c (working copy) @@ -587,9 +587,10 @@ preserve_function_body_p (struct cgraph_ gcc_assert (symtab->global_info_ready); gcc_assert (!node->alias && !node->thunk.thunk_p); - /* Look if there is any clone around. */ - if (node->clones && !node->clones->thunk.thunk_p) -return true; + /* Look if there is any non-thunk clone around. */ + for (node = node->clones; node; node = node->next_sibling_clone) +if (!node->thunk.thunk_p) + return true; return false; } Index: lto-cgraph.c === --- lto-cgraph.c(revision 236275) +++ lto-cgraph.c(working copy) @@ -259,7 +259,7 @@ lto_output_edge (struct lto_simple_outpu streamer_write_gcov_count_stream (ob->main_stream, edge->count); bp = bitpack_create (ob->main_stream); - uid = (!gimple_has_body_p (edge->caller->decl) + uid = (!gimple_has_body_p (edge->caller->decl) || edge->caller->thunk.thunk_p ? edge->lto_stmt_uid : gimple_uid (edge->call_stmt) + 1); bp_pack_enum (, cgraph_inline_failed_t, CIF_N_REASONS, edge->inline_failed); Index: lto-streamer-in.c === --- lto-streamer-in.c (revision 236275) +++ lto-streamer-in.c (working copy) @@ -952,20 +952,21 @@ fixup_call_stmt_edges (struct cgraph_nod fixup_call_stmt_edges_1 (orig, stmts, fn); if (orig->clones) for (node = orig->clones; node != orig;) - { - fixup_call_stmt_edges_1 (node, stmts, fn); - if (node->clones) - node = node->clones; - else if (node->next_sibling_clone) - node = node->next_sibling_clone; - else - { - while (node != orig && !node->next_sibling_clone) - node = node->clone_of; - if (node != orig) - node = node->next_sibling_clone; - } - } + if (!node->thunk.thunk_p) + { + fixup_call_stmt_edges_1 (node, stmts, fn); + if (node->clones) + node = node->clones; + else if (node->next_sibling_clone) + node = node->next_sibling_clone; + else + { + while (node != orig && !node->next_sibling_clone) + node = node->clone_of; + if (node != orig) + node = node->next_sibling_clone; + } + } }
[Bug lto/71089] [7 Regression] Failed to build 483.xalancbmk in SPEC CPU 2006
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71089 --- Comment #4 from Jan Hubicka --- > --- Comment #3 from Markus Trippelsdorf --- > Also happens when building Firefox with -flto: > > trippels@gcc2-power8 gecko-dev % cat out | grep "nternal compi" > lto1: internal compiler error: in lto_output_node, at lto-cgraph.c:473 > lto1: internal compiler error: Segmentation fault > lto1: internal compiler error: Segmentation fault > lto1: internal compiler error: in lto_output_node, at lto-cgraph.c:473 > lto1: internal compiler error: Segmentation fault > lto1: internal compiler error: in lto_output_node, at lto-cgraph.c:473 > lto1: internal compiler error: in lto_output_node, at lto-cgraph.c:473 > lto1: internal compiler error: in lto_output_node, at lto-cgraph.c:473 > lto1: internal compiler error: Segmentation fault Weird, Firefox and xlanacbmk builds for me. I will try to reproduce it today. Honza
[Bug lto/71089] [7 Regression] Failed to build 483.xalancbmk in SPEC CPU 2006
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71089 Markus Trippelsdorf changed: What|Removed |Added CC||trippels at gcc dot gnu.org --- Comment #3 from Markus Trippelsdorf --- Also happens when building Firefox with -flto: trippels@gcc2-power8 gecko-dev % cat out | grep "nternal compi" lto1: internal compiler error: in lto_output_node, at lto-cgraph.c:473 lto1: internal compiler error: Segmentation fault lto1: internal compiler error: Segmentation fault lto1: internal compiler error: in lto_output_node, at lto-cgraph.c:473 lto1: internal compiler error: Segmentation fault lto1: internal compiler error: in lto_output_node, at lto-cgraph.c:473 lto1: internal compiler error: in lto_output_node, at lto-cgraph.c:473 lto1: internal compiler error: in lto_output_node, at lto-cgraph.c:473 lto1: internal compiler error: Segmentation fault ...
[Bug lto/71089] [7 Regression] Failed to build 483.xalancbmk in SPEC CPU 2006
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71089 Richard Biener changed: What|Removed |Added Keywords||lto Target Milestone|--- |7.0
[Bug lto/71089] [7 Regression] Failed to build 483.xalancbmk in SPEC CPU 2006
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71089 Jan Hubicka changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2016-05-13 CC||hubicka at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #2 from Jan Hubicka --- mine
[Bug lto/71089] [7 Regression] Failed to build 483.xalancbmk in SPEC CPU 2006
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71089 Igor Zamyatin changed: What|Removed |Added CC||izamyatin at gmail dot com --- Comment #1 from Igor Zamyatin --- May be related to PR71015