From: Kugan Vivekanandarajah Date: Mon, 26 May 2025 00:52:45 +0000 (+1000) Subject: [AUTOFDO] Enable ipa-split for auto-profile X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53fb5a1a98a2d72ada7786f28e94a724916a39b1;p=thirdparty%2Fgcc.git [AUTOFDO] Enable ipa-split for auto-profile ipa-split is not now run for auto-profile. IMO this was an oversight. This patch enables it similar to PGO runs. gcc/ChangeLog: * ipa-split.cc (pass_feedback_split_functions::clone): New. * passes.def: Enable pass_feedback_split_functions for pass_ipa_auto_profile. Signed-off-by: Kugan Vivekanandarajah --- diff --git a/gcc/ipa-split.cc b/gcc/ipa-split.cc index 729fb79af52..933ca16c946 100644 --- a/gcc/ipa-split.cc +++ b/gcc/ipa-split.cc @@ -1992,6 +1992,10 @@ public: return execute_feedback_split_functions (); } + opt_pass * clone () final override + { + return new pass_feedback_split_functions (m_ctxt); + } }; // class pass_feedback_split_functions bool diff --git a/gcc/passes.def b/gcc/passes.def index 3b251052e53..0f7a6592699 100644 --- a/gcc/passes.def +++ b/gcc/passes.def @@ -140,6 +140,9 @@ along with GCC; see the file COPYING3. If not see NEXT_PASS (pass_target_clone); NEXT_PASS (pass_ipa_auto_profile); + PUSH_INSERT_PASSES_WITHIN (pass_ipa_auto_profile) + NEXT_PASS (pass_feedback_split_functions); + POP_INSERT_PASSES () NEXT_PASS (pass_ipa_tree_profile); PUSH_INSERT_PASSES_WITHIN (pass_ipa_tree_profile) NEXT_PASS (pass_feedback_split_functions);