[PATCH] D94982: [NPM][Inliner] Factor ImportedFunctionStats in the InlineAdvisor

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 19 14:42:02 PST 2021


aeubanks added a comment.

I don't understand the non-deterministic part, but otherwise this makes sense



================
Comment at: llvm/include/llvm/Analysis/InlineAdvisor.h:117
 
   bool Recorded = false;
 };
----------------
drive by comment, this could be under `#ifdef NDEBUG`


================
Comment at: llvm/include/llvm/Analysis/InlineAdvisor.h:170
 
+  Module &M;
   FunctionAnalysisManager &FAM;
----------------
is this used anywhere except the constructor?


================
Comment at: llvm/lib/Analysis/InlineAdvisor.cpp:136
+void InlineAdvice::recordInlineStatsIfNeeded() {
+  if (InlinerFunctionImportStats != InlinerFunctionImportStatsOpts::No)
+    Advisor->ImportedFunctionsStats->recordInline(*Caller, *Callee);
----------------
`if (Advisor->ImportedFunctionsStats)`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94982



More information about the llvm-commits mailing list