AutoFDO: don't set param_early_inliner_max_iterations to 10.
authorEugene Rozenfeld <erozen@microsoft.com>
Wed, 19 Jan 2022 00:03:19 +0000 (16:03 -0800)
committerEugene Rozenfeld <erozen@microsoft.com>
Tue, 1 Feb 2022 23:20:11 +0000 (15:20 -0800)
commitc17975d81aaed49ff759c20c68b31304a6953d58
treeb0489af3e49878955d23fa457e5812ecda19285b
parent6bc732eba9a7dcf2e948c27814b37d30e0a47542
AutoFDO: don't set param_early_inliner_max_iterations to 10.

param_early_inliner_max_iterations specifies the maximum number
of nested indirect inlining iterations performed by early inliner.
Normally, the default value is 1.

For AutoFDO this parameter was also used as the number of iteration for
its indirect call promotion loop and the default value was set to 10.
While it makes sense to have 10 in the indirect call promotion loop
(we want to make the IR match the profiled binary before actual annotation)
there is no reason to have a special default value for the
regular early inliner.

This change removes the special AutoFDO default value setting for
param_early_inliner_max_iterations while keeping 10 as the number of
iterations for the AutoFDO indirect call promotion loop.

This change improves a simple fibonacci benchmark in AutoFDO mode
by 15% on x86_64-pc-linux-gnu.

Tested on x86_64-pc-linux-gnu.

gcc/ChangeLog:
* auto-profile.cc (auto_profile): Hard-code the number of iterations (10).

gcc/ChangeLog:
* opts.cc (common_handle_option): Don't set param_early_inliner_max_iterations
to 10 for AutoFDO.
gcc/auto-profile.cc
gcc/opts.cc