]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add testcase for afdo offlining and fix two bugs
authorJan Hubicka <hubicka@ucw.cz>
Thu, 26 Jun 2025 08:48:20 +0000 (10:48 +0200)
committerJan Hubicka <hubicka@ucw.cz>
Thu, 26 Jun 2025 09:07:33 +0000 (11:07 +0200)
commit7b28a7dc9dfb277ef1f053dda84899837f8ed0c1
tree52b3bc8f537f29a4b73599c75d78b7257c854cd5
parent24940ad1534aa71ed74cf059982446c6df1f3f74
Add testcase for afdo offlining and fix two bugs

This patch adds a testcase that offlining works and profile info is not lost.
While doing it I noticed a pasto that made the dump to be "afdo" and not
"afdo_offline" and also that not all functions are processed as the range
for does not expect new values to be put to the vector.  Fixed thus.

gcc/ChangeLog:

* auto-profile.cc (function_instance::merge): Add TODO.
(autofdo_source_profile::offline_external_functions):
Do not use range for on the worklist.
* timevar.def (TV_IPA_AUTOFDO_OFFLINE): New timevar.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-prof/afdo-crossmodule-1.c: New test.
* gcc.dg/tree-prof/afdo-crossmodule-1b.c: New test.
gcc/auto-profile.cc
gcc/testsuite/gcc.dg/tree-prof/afdo-crossmodule-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-prof/afdo-crossmodule-1b.c [new file with mode: 0644]
gcc/timevar.def