[llvm] eb76ca5 - [NFC][MLGO] Debug messages for what inline advisor is selected
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 27 15:05:48 PDT 2021
Author: Mircea Trofin
Date: 2021-07-27T15:05:39-07:00
New Revision: eb76ca573d755fd445596e63ef1f0d30937097f6
URL: https://github.com/llvm/llvm-project/commit/eb76ca573d755fd445596e63ef1f0d30937097f6
DIFF: https://github.com/llvm/llvm-project/commit/eb76ca573d755fd445596e63ef1f0d30937097f6.diff
LOG: [NFC][MLGO] Debug messages for what inline advisor is selected
We already have an indication (error) if the desired inline advisor
cannot be enabled, but we don't have a positive indication. Added
LLVM_DEBUG messages for the latter.
Added:
Modified:
llvm/lib/Analysis/InlineAdvisor.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/InlineAdvisor.cpp b/llvm/lib/Analysis/InlineAdvisor.cpp
index 469ec4c1d57c..195c22191d4c 100644
--- a/llvm/lib/Analysis/InlineAdvisor.cpp
+++ b/llvm/lib/Analysis/InlineAdvisor.cpp
@@ -157,6 +157,7 @@ bool InlineAdvisorAnalysis::Result::tryCreate(InlineParams Params,
auto &FAM = MAM.getResult<FunctionAnalysisManagerModuleProxy>(M).getManager();
switch (Mode) {
case InliningAdvisorMode::Default:
+ LLVM_DEBUG("Using default inliner heuristic.");
Advisor.reset(new DefaultInlineAdvisor(M, FAM, Params));
// Restrict replay to default advisor, ML advisors are stateful so
// replay will need augmentations to interleave with them correctly.
@@ -168,6 +169,7 @@ bool InlineAdvisorAnalysis::Result::tryCreate(InlineParams Params,
break;
case InliningAdvisorMode::Development:
#ifdef LLVM_HAVE_TF_API
+ LLVM_DEBUG("Using development-mode inliner policy.");
Advisor =
llvm::getDevelopmentModeAdvisor(M, MAM, [&FAM, Params](CallBase &CB) {
auto OIC = getDefaultInlineAdvice(CB, FAM, Params);
@@ -177,6 +179,7 @@ bool InlineAdvisorAnalysis::Result::tryCreate(InlineParams Params,
break;
case InliningAdvisorMode::Release:
#ifdef LLVM_HAVE_TF_AOT
+ LLVM_DEBUG("Using release-mode inliner policy.");
Advisor = llvm::getReleaseModeAdvisor(M, MAM);
#endif
break;
More information about the llvm-commits
mailing list