This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH AutoFDO]Call update_max_bb_count even if autofdo counts are all zeros


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.cheng@linux.alibaba.com>

        * auto-profile.c (afdo_annotate_cfg): Call update_max_bb_count even
        if autofdo counts are all zeros.

Attachment: 0005-Call-update_max_bb_count-even-if-autufdo-counts-are-.patch
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]