]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[AUTOFDO] Enable ipa-split for auto-profile
authorKugan Vivekanandarajah <kvivekananda@nvidia.com>
Mon, 26 May 2025 00:52:45 +0000 (10:52 +1000)
committerKugan Vivekanandarajah <kvivekananda@nvidia.com>
Mon, 26 May 2025 00:55:26 +0000 (10:55 +1000)
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 <kvivekananda@nvidia.com>
gcc/ipa-split.cc
gcc/passes.def

index 729fb79af52c40747da517df620805db112ccab6..933ca16c9469e4d5fe71591716319d6bce802592 100644 (file)
@@ -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
index 3b251052e53acedb926cd238bb6f804926eaef43..0f7a65926990af1b812033cb2d723698f36846bd 100644 (file)
@@ -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);