]> git.ipfire.org Git - thirdparty/gcc.git/commit
Do not recompute profile when entry block has afdo count of 0
authorJan Hubicka <hubicka@ucw.cz>
Wed, 28 May 2025 12:18:39 +0000 (14:18 +0200)
committerJan Hubicka <hubicka@ucw.cz>
Wed, 28 May 2025 12:19:12 +0000 (14:19 +0200)
commita4dc4001999a8b504cde468618af12c9b870589b
tree83fd967c74c625ba7f5584052b21a48c7f2f31de
parent33ee574a7444b238005d89fdfdf2f21f50b1fc6e
Do not recompute profile when entry block has afdo count of 0

With normal profile feedback checking entry block count to be non-zero is quite
reliable check for presence of non-0 profile in the body since the function
body can only be executed if the entry block was executed.  With autofdo this
is not true, since the entry block may just execute too few times to be
recorded.  As a consequence we currently drop AFDO profile quite often.  This
patch fixes it.

gcc/ChangeLog:

* predict.cc (rebuild_frequencies): look harder for presence
of profile feedback.
gcc/predict.cc