Hi, This patch calls update_max_bb_count even if autofdo counts are all zeros, otherwise it would trigger ICE because of mismatch between basic blocks' count (all autofdo::zero) and cfun->cfg->max_count (guessed::non_zero). For functions with all autofdo::zero counts, we should improve by restoring guessed profile counts, but this maybe not for GCC-9.
Bootstrap and test on x86_64 along with following patches. Is it OK? Thanks, bin 2018-12-13 Bin Cheng <bin.ch...@linux.alibaba.com> * auto-profile.c (afdo_annotate_cfg): Call update_max_bb_count even if autofdo counts are all zeros.
0005-Call-update_max_bb_count-even-if-autufdo-counts-are-.patch
Description: Binary data