[PATCH] D139232: [ModuleInliner] Add memorization to MLPriority

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 2 15:46:14 PST 2022


mtrofin added a comment.

What do you mean by "trainer introduces noise"?



================
Comment at: llvm/lib/Analysis/InlineOrder.cpp:243
     auto IC = getInlineCostWrapper(const_cast<CallBase &>(*CB), FAM, Params);
+    int Cost;
     if (IC.isVariable())
----------------
please initialize it at decl.


================
Comment at: llvm/lib/Analysis/InlineOrder.cpp:272
+
+  static ManagedStatic<DenseMap<MLInlineOrderMetrics, int>> MetricsToPriority;
+
----------------
this could be a non-static member with the user of the priority, to avoid the data hanging out for the duration of the compilation, after it's no longer needed. I assume it's static right now as a placeholder?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D139232



More information about the llvm-commits mailing list