[PATCH] D85577: [NFC][MLInliner] Set up the logger outside the development mode advisor

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 09:22:01 PDT 2020


mtrofin added inline comments.


================
Comment at: llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp:371
+void TrainingLogger::print() {
+  std::error_code ErrorCode;
+  raw_fd_ostream OutFile(LogFileName, ErrorCode);
----------------
MaskRay wrote:
> A common variable name of type error_code is `EC`. You may consider it
done


================
Comment at: llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp:400-401
     std::unique_ptr<MLModelRunner> ModelRunner,
-    std::function<bool(CallBase &)> GetDefaultAdvice, bool IsDoingInference)
+    std::function<bool(CallBase &)> GetDefaultAdvice, bool IsDoingInference,
+    std::unique_ptr<TrainingLogger> Logger)
     : MLInlineAdvisor(M, MAM, std::move(ModelRunner)),
----------------
yundiqian wrote:
> swap IsDoingInference and Logger so that the sequence matches?
done


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85577



More information about the llvm-commits mailing list