On 03/13/2018 01:13 PM, Martin Liška wrote:
> Hi.
> 
> This is a fix for situation where we use -fno-guess-branch-probability and 
> fnsplit happens.
> 
> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
> 
> Ready for trunk?
> Thanks,
> Martin
> 
> gcc/ChangeLog:
> 
> 2018-03-13  Martin Liska  <mli...@suse.cz>
> 
>     PR ipa/84825
>     * predict.c (rebuild_frequencies): Handle case when we have
>     PROFILE_ABSENT, but flag_guess_branch_prob is false.
> 
> gcc/testsuite/ChangeLog:
> 
> 2018-03-13  Martin Liska  <mli...@suse.cz>
> 
>     * g++.dg/ipa/pr84825.C: New test.
> ---
>  gcc/predict.c                      |  3 +++
>  gcc/testsuite/g++.dg/ipa/pr84825.C | 18 ++++++++++++++++++
>  2 files changed, 21 insertions(+)
>  create mode 100644 gcc/testsuite/g++.dg/ipa/pr84825.C
> 
> 

Honza asked about a place where a BB count is set up. It's here:

(gdb) bt
#0  init_lowered_empty_function (decl=0x7ffff692a700, in_ssa=true, count=...) 
at ../../gcc/cgraphunit.c:1606
#1  0x0000000000cddde1 in cgraph_node::expand_thunk (this=0x7ffff692f2e0, 
output_asm_thunks=false, force_gimple_thunk=false) at 
../../gcc/cgraphunit.c:1856
#2  0x0000000000cd9e01 in cgraph_node::analyze (this=0x7ffff692f2e0) at 
../../gcc/cgraphunit.c:635
#3  0x0000000000cdb85c in analyze_functions (first_time=true) at 
../../gcc/cgraphunit.c:1131
#4  0x0000000000ce0510 in symbol_table::finalize_compilation_unit 
(this=0x7ffff67b0100) at ../../gcc/cgraphunit.c:2691
#5  0x00000000012908d8 in compile_file () at ../../gcc/toplev.c:480
#6  0x00000000012931fd in do_compile () at ../../gcc/toplev.c:2132
#7  0x00000000012934ea in toplev::main (this=0x7fffffffd7de, argc=24, 
argv=0x7fffffffd8d8) at ../../gcc/toplev.c:2267
#8  0x0000000001f69194 in main (argc=24, argv=0x7fffffffd8d8) at 
../../gcc/main.c:39

(gdb) p count.debug()
10000 (estimated locally)
$7 = void

Martin

Reply via email to