diff options
author | Eugene Rozenfeld <erozen@microsoft.com> | 2022-01-18 16:03:19 -0800 |
---|---|---|
committer | Eugene Rozenfeld <erozen@microsoft.com> | 2022-02-01 15:20:11 -0800 |
commit | c17975d81aaed49ff759c20c68b31304a6953d58 (patch) | |
tree | b0489af3e49878955d23fa457e5812ecda19285b /gcc/auto-profile.cc | |
parent | 6bc732eba9a7dcf2e948c27814b37d30e0a47542 (diff) | |
download | gcc-c17975d81aaed49ff759c20c68b31304a6953d58.zip gcc-c17975d81aaed49ff759c20c68b31304a6953d58.tar.gz gcc-c17975d81aaed49ff759c20c68b31304a6953d58.tar.bz2 |
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.
Diffstat (limited to 'gcc/auto-profile.cc')
-rw-r--r-- | gcc/auto-profile.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/auto-profile.cc b/gcc/auto-profile.cc index 0bfaae7..c7cee63 100644 --- a/gcc/auto-profile.cc +++ b/gcc/auto-profile.cc @@ -1644,8 +1644,7 @@ auto_profile (void) function before annotation, so the profile inside bar@loc_foo2 will be useful. */ autofdo::stmt_set promoted_stmts; - for (int i = 0; i < opt_for_fn (node->decl, - param_early_inliner_max_iterations); i++) + for (int i = 0; i < 10; i++) { if (!flag_value_profile_transformations || !autofdo::afdo_vpt_for_early_inline (&promoted_stmts)) |