On 12/12/18 8:50 PM, bin.cheng wrote: > 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. > OK. Though note there may be some kind of skew between your auto-profile.c and the trunk. Your patch has a comment just before the removed calls to update_max_bb_count that isn't on the trunk.
I'm sure you can adjust accordingly. jeff