[PATCH] D79042: [llvm] Add interface to drive inlining decision using ML model

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 29 20:01:20 PDT 2020


mtrofin added inline comments.


================
Comment at: llvm/lib/Analysis/InliningAdvisorAnalysis.cpp:33
+  }
+  M.getContext().emitError(
+      "Could not setup Inlining Advisor for the requested mode and/or options");
----------------
davidxl wrote:
> Can this happen, given the option parser filters out other values?
This happens if we pass Dev (for example) and neither LLVM_HAVE_TF_{API|AOT} are defined. It's what the test tests, too.


================
Comment at: llvm/lib/Passes/PassBuilder.cpp:220
+static cl::opt<MLMode> EnableMLInliner(
+    "enable-ml-inliner", cl::init(MLMode::Invalid), cl::Hidden,
+    cl::desc("Enable ML policy for inliner. Currently trained for -Oz only"),
----------------
davidxl wrote:
> Invalid mode --> Null mode?
How about 'NoML' or 'None'?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79042





More information about the llvm-commits mailing list