]> git.ipfire.org Git - thirdparty/gcc.git/commit
Restrict what kind of statements are used for auto-profile
authorJan Hubicka <hubicka@ucw.cz>
Mon, 29 Sep 2025 22:22:48 +0000 (00:22 +0200)
committerJan Hubicka <hubicka@ucw.cz>
Tue, 30 Sep 2025 11:09:46 +0000 (13:09 +0200)
commit5bf08863328955a688c3bf9236fb041f1b909392
tree476e542a894a2d5ca8eb7ac12e75087d3fe5aaef
parent3d62068b69f5148450a0881a4ded7d0eae46d3c9
Restrict what kind of statements are used for auto-profile

When building profile of walk_tree_1 during autoprofiledbootstrap we produce
non-zero counts to call of tree_check_failed because location of INLINE_ENTRY
debug statement is misplaced.  Auto-profile already knows it should skip
clobbers since their locations will never go into debug info.  This patch extend
it to all kind of debug statement except for DEBUG_BEGIN_STMT, nops, labels
and predict.

autoprofilebootstrapped/regtested x86_64-linux.

gcc/ChangeLog:

* auto-profile.cc (stmt_loc_used_by_debug_info): New function.
(autofdo_source_profile::get_count_info): Use it.
(afdo_set_bb_count): Likewise.
(afdo_vpt_for_early_inline): Likewise.
gcc/auto-profile.cc