https://gcc.gnu.org/g:0f2f068d19a2eed08aaf731fb9070606f0dd2f82
commit r16-5527-g0f2f068d19a2eed08aaf731fb9070606f0dd2f82 Author: Kugan Vivekanandarajah <[email protected]> Date: Sun Nov 23 17:14:53 2025 +1100 [PATCH] Run feedback directed ipa-split for flag_auto_profile IPA split is now running before auto-profile annotation. Changing it after annotation as it is done for PGO. gcc/ChangeLog: 2025-07-21 Kugan Vivekanandarajah <[email protected]> * ipa-split.cc (pass_split_functions::gate): Do not run when flag_auto_profile. (pass_feedback_split_functions::gate): Run when flag_auto_profile. Diff: --- gcc/ipa-split.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/ipa-split.cc b/gcc/ipa-split.cc index 48f6a725ae8c..aa40bedb7547 100644 --- a/gcc/ipa-split.cc +++ b/gcc/ipa-split.cc @@ -1950,7 +1950,9 @@ pass_split_functions::gate (function *) /* When doing profile feedback, we want to execute the pass after profiling is read. So disable one in early optimization. */ return (flag_partial_inlining - && !profile_arc_flag && !flag_branch_probabilities); + && !profile_arc_flag + && !flag_branch_probabilities + && !flag_auto_profile); } } // anon namespace @@ -2013,7 +2015,7 @@ pass_feedback_split_functions::gate (function *) /* We don't need to split when profiling at all, we are producing lousy code anyway. */ return (flag_partial_inlining - && flag_branch_probabilities); + && (flag_branch_probabilities || flag_auto_profile)); } } // anon namespace
