[PATCH] D133616: [MLGO] ML Regalloc Priority Advisor

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 29 08:32:00 PDT 2022


mtrofin accepted this revision.
mtrofin added a comment.
This revision is now accepted and ready to land.

added Yundi for the test model generator, please wait for her feedback before submitting.

On my side, lgtm, left some comments about not trying to enable release mode at this point.

(self-note: there's some boilerplate we can further simplify, I think like ctoring of the dev mode could be more streamlined - I'll take a look into that)



================
Comment at: llvm/lib/CodeGen/RegAllocPriorityAdvisor.cpp:39
 
+#ifdef LLVM_HAVE_TF_AOT_REGALLOCPRIORITYMODEL
+#define LLVM_HAVE_TF_AOT
----------------
I'd remove this. We don't currently support constructing the release model - that also needs some stuff in CMakeLists.txt. All good, all we need is the development stuff anyway, and all the release stuff is common anyway.


================
Comment at: llvm/lib/CodeGen/RegAllocPriorityAdvisor.cpp:88
   case RegAllocPriorityAdvisorAnalysis::AdvisorMode::Release:
-    // TODO: add implementation
+#if defined(LLVM_HAVE_TF_AOT)
+    Ret = createReleaseModePriorityAdvisor();
----------------
check LLVM_HAVE_TF_AOT_REGALLOCPRIORITYMODEL here (which nothing sets, which is good right now). We need to do something similar for evictadvisor now, too (not in this patch)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133616/new/

https://reviews.llvm.org/D133616



More information about the llvm-commits mailing list