[Bug ipa/81133] [8 Regression] PGO/LTO bootstrap: ICE: in inline_small_functions, at ipa-inline.c:1891
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81133 Jan Hubicka changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #9 from Jan Hubicka --- I have disabled the sanity check because it is too bothered by roundoff errors, so this is "fixed".
[Bug ipa/81133] [8 Regression] PGO/LTO bootstrap: ICE: in inline_small_functions, at ipa-inline.c:1891
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81133 --- Comment #8 from Jan Hubicka --- I see. compute_uninlined_call_time uses counts when they are available and frequencies when they are not. It makes sense that dropping count to 0 will lead to change of compute_uninlined_call_time. I am bit surprised it is that large (it would be nice to know why). Otherwise I have WIP path that gets rid of frequencies completely, so it will fix this problem. I will try to finish it soon. Thanks a lot for looking into this! Honza
[Bug ipa/81133] [8 Regression] PGO/LTO bootstrap: ICE: in inline_small_functions, at ipa-inline.c:1891
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81133 --- Comment #7 from Martin Liška --- I've got it what's responsible. When the edge_badness is called for the first time, we call compute_uninlined_call_time where: (gdb) p edge->count.to_gcov_type () $25 = 194 Then various clones of the caller (app_disable) are created: #0 profile_count::operator-= (other=..., this=0x2aaab9c1d270) at ../../gcc/profile-count.h:683 #1 cgraph_edge::clone (this=this@entry=0x2aaab9c1d270, n=n@entry=0x2aaab8ebee60, call_stmt=, stmt_uid=3, num=..., den=..., freq_scale=, update_original=true) at ../../gcc/cgraphclones.c:147 #2 0x006a20fc in cgraph_node::create_clone (this=0x2aaab9c038a0, new_decl=, prof_count=..., freq=freq@entry=94, update_original=, redirect_callers=..., redirect_callers@entry=..., call_duplication_hook=, new_inlined_to=, args_to_skip=, suffix=) at ../../gcc/cgraphclones.c:492 #3 0x0127a3ff in clone_inlined_nodes (e=e@entry=0x2aaab9c266e8, duplicate=duplicate@entry=true, update_original=update_original@entry=true, overall_size=overall_size@entry=0x1f5c3a0 <_ZL12overall_size>, freq_scale=94) at ../../gcc/ipa-inline-transform.c:235 #4 0x0127ae61 in inline_call (e=0x2aaab9c266e8, update_original=, new_edges=, overall_size=, update_overall_summary=, callee_removed=) at ../../gcc/ipa-inline-transform.c:462 where counter changes: Old value = 194 New value = 91 note that in #4 it's shown that callee is app_disable (gdb) p e->caller->name() $26 = 0x2e4acef0 "final_scan_insn" (gdb) p e->callee->name() $27 = 0x2e6aa1b0 "app_disable" This repeats various time and we end up eventually with the counter == 0. Then compute_uninlined_call_time returns 0.09765625 instead of 2.8684735298156738e-07.
[Bug ipa/81133] [8 Regression] PGO/LTO bootstrap: ICE: in inline_small_functions, at ipa-inline.c:1891
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81133 --- Comment #6 from Martin Liška --- So when the edge is insert to the heap we see: Badness calculation for app_disable/164630 -> _Z11app_disablev.part.30/166180 size growth 6, time 16.00 unspec 216.00 Wrapper penalty. Increasing growth -4 to 30 -0.000709: guessed profile. frequency 0.00, count 195 caller count 66781966 time w/o inlining 5.00, time with inlining 5.00 overall growth -4 (current) -4 (original) 900 (compensated) Adjusted by hints -0.002838 and when the ICE happens: Badness calculation for app_disable/164630 -> _Z11app_disablev.part.30/166180 size growth 6, time 16.00 unspec 216.00 Wrapper penalty. Increasing growth -4 to 30 -0.748913: guessed profile. frequency 0.00, count 0 caller count 207383 time w/o inlining 5.105469, time with inlining 5.007812 overall growth 38 (current) -4 (original) 900 (compensated) Adjusted by hints -2.995652
[Bug ipa/81133] [8 Regression] PGO/LTO bootstrap: ICE: in inline_small_functions, at ipa-inline.c:1891
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81133 --- Comment #5 from Martin Liška --- Happens Fortran front-end. I'm attaching IPA inline dump file where I also dumped the problematic badnesses which are compared: https://drive.google.com/file/d/0B0pisUJ80pO1N2pBUXdhVlVwZlU/view?usp=sharing Snippet: [...] Enqueueing calls in app_disable/164630. Estimating body: _Z11app_disablev.part.30/166180 Known to be false: not inlined size:7 time:16.00 nonspec time:216.00 enqueuing call app_disable/164630 -> _Z11app_disablev.part.30/166180, badness -0.002838 [...] assert triggered: app_disable/164630->_Z11app_disablev.part.30/166180, current_badness: -2.995652, badness: -0.002838 where edge_badness for the problematic edge prints: Badness calculation for app_disable/164630 -> _Z11app_disablev.part.30/166180 size growth 6, time 16.00 unspec 216.00 Wrapper penalty. Increasing growth -4 to 30 -0.748913: guessed profile. frequency 0.00, count 0 caller count 207383 time w/o inlining 5.105469, time with inlining 5.007812 overall growth 38 (current) -4 (original) 900 (compensated) Adjusted by hints -2.995652 I can provide pre-build tree on gcc67 machine if needed.
[Bug ipa/81133] [8 Regression] PGO/LTO bootstrap: ICE: in inline_small_functions, at ipa-inline.c:1891
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81133 Markus Trippelsdorf changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED |--- --- Comment #4 from Markus Trippelsdorf --- No, unfortunately it still happens. (I was testing with checking=release. Sorry.)
[Bug ipa/81133] [8 Regression] PGO/LTO bootstrap: ICE: in inline_small_functions, at ipa-inline.c:1891
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81133 Markus Trippelsdorf changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #3 from Markus Trippelsdorf --- Looks like it got fixed by r249771.
[Bug ipa/81133] [8 Regression] PGO/LTO bootstrap: ICE: in inline_small_functions, at ipa-inline.c:1891
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81133 Jan Hubicka changed: What|Removed |Added Status|NEW |ASSIGNED CC||hubicka at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |hubicka at gcc dot gnu.org --- Comment #2 from Jan Hubicka --- I will take a look.
[Bug ipa/81133] [8 Regression] PGO/LTO bootstrap: ICE: in inline_small_functions, at ipa-inline.c:1891
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81133 H.J. Lu changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-06-21 Ever confirmed|0 |1
[Bug ipa/81133] [8 Regression] PGO/LTO bootstrap: ICE: in inline_small_functions, at ipa-inline.c:1891
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81133 Markus Trippelsdorf changed: What|Removed |Added CC||hjl.tools at gmail dot com --- Comment #1 from Markus Trippelsdorf --- *** Bug 81149 has been marked as a duplicate of this bug. ***
[Bug ipa/81133] [8 Regression] PGO/LTO bootstrap: ICE: in inline_small_functions, at ipa-inline.c:1891
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81133 Richard Biener changed: What|Removed |Added Target Milestone|--- |8.0