[PATCH] D125495: [Inline][Remark] Annotate inline pass name with link phase information for analysis.

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 31 12:54:05 PDT 2022


davidxl added a comment.

I suggest splitting out the LTOPhase passing interface changes into a different patch. That one is more mechanical. After which this patch can be greatly simplified.



================
Comment at: llvm/include/llvm/Analysis/InlineAdvisor.h:43
 
+enum class InlineAdvisorContext : int {
+  EarlyInliner,
----------------
Is it possible to define sample loader inliner here too ?


================
Comment at: llvm/include/llvm/Analysis/InlineAdvisor.h:44
+enum class InlineAdvisorContext : int {
+  EarlyInliner,
+  CGSCCInliner,
----------------
AlwaysInline should probably be defined here too.


================
Comment at: llvm/include/llvm/Analysis/InlineAdvisor.h:197
+  /// may not be the accurate reason.
+  ///    For example, a inline decision in postlink CGSCC pass could be a result
+  ///    of applying heuristics, but could be a result of mandatory inline as
----------------
a inline --> an inline


================
Comment at: llvm/include/llvm/Analysis/InlineAdvisor.h:198
+  ///    For example, a inline decision in postlink CGSCC pass could be a result
+  ///    of applying heuristics, but could be a result of mandatory inline as
+  ///    well.
----------------
If we split out AlwaysInline, then it will be less ambiguous.


================
Comment at: llvm/include/llvm/Passes/PassBuilder.h:220
+  buildModuleOptimizationPipeline(OptimizationLevel Level,
+                                  ThinOrFullLTOPhase LTOPhase);
 
----------------
This change can be split out into an independent patch.


================
Comment at: llvm/lib/Analysis/InlineAdvisor.cpp:568
+    return "replay-sample-profile-inline";
+  case (InlineAdvisorContext::UnspecifiedInlinerContext):
+    return DEBUG_TYPE;
----------------
In what case it is unspecified?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125495



More information about the llvm-commits mailing list