]> git.ipfire.org Git - thirdparty/gcc.git/commit
[AutoFDO] Profile merging for clone test
authorKugan Vivekanandarajah <kvivekananda@nvidia.com>
Wed, 4 Jun 2025 21:15:34 +0000 (07:15 +1000)
committerKugan Vivekanandarajah <kvivekananda@nvidia.com>
Wed, 4 Jun 2025 21:15:34 +0000 (07:15 +1000)
commit74e691a8e31a81019e0fda0f919d721d3092ad54
tree0b11123a15a702993bf815439cbbb9829ab455db
parentfc198521cd3e135bc07f6a86a5ffa9c70fc3abca
[AutoFDO] Profile merging for clone test

This patch introduces a new testcase to verify the merging of profiles
is performed for cloned functions.

Since this is invoked very early, before the pass manager, we need to
set up the dumping explicitly. This is similar to the handling in
finish_optimization_passes.

gcc/ChangeLog:

* auto-profile.cc (autofdo_source_profile::read): Dump message
while merging profile.
* pass_manager.h (get_pass_auto_profile): New.

gcc/testsuite/ChangeLog:

* gcc.dg/tree-prof/clone-merge-1.c: New test.

Signed-off-by: Kugan Vivekanandarajah <kvivekananda@nvidia.com>
gcc/auto-profile.cc
gcc/pass_manager.h
gcc/testsuite/gcc.dg/tree-prof/clone-merge-1.c [new file with mode: 0644]