[llvm] [MLGO] Switch regalloc log context once per function (PR #229453)

Arseniy Obolenskiy via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 9 01:13:11 PDT 2026


================
@@ -587,6 +590,12 @@ class DevelopmentModeEvictionAdvisorProvider final
   std::unique_ptr<MLModelRunner> Runner;
   std::unique_ptr<Logger> Log;
   std::optional<unsigned> LastFunctionNumber;
+
+  static std::string getContextName(const MachineFunction &MF) {
+    if (!MF.getName().empty())
+      return MF.getName().str();
+    return ("__unnamed_" + Twine(MF.getFunctionNumber())).str();
----------------
aobolensk wrote:

Done

https://github.com/llvm/llvm-project/pull/229453


More information about the llvm-commits mailing list