From: Kugan Vivekanandarajah Date: Sun, 23 Nov 2025 06:14:53 +0000 (+1100) Subject: [PATCH] Run feedback directed ipa-split for flag_auto_profile X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0f2f068d19a2eed08aaf731fb9070606f0dd2f82;p=thirdparty%2Fgcc.git [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 * 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 --git a/gcc/ipa-split.cc b/gcc/ipa-split.cc index 48f6a725ae8..aa40bedb754 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