[llvm] fa71c16 - [Inliner] Move cl::opt inside llvm::
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 24 20:31:18 PST 2022
Author: Fangrui Song
Date: 2022-11-24T20:31:13-08:00
New Revision: fa71c16455873bcd218dc443dae8a4ec158d770b
URL: https://github.com/llvm/llvm-project/commit/fa71c16455873bcd218dc443dae8a4ec158d770b
DIFF: https://github.com/llvm/llvm-project/commit/fa71c16455873bcd218dc443dae8a4ec158d770b.diff
LOG: [Inliner] Move cl::opt inside llvm::
Added:
Modified:
llvm/lib/Analysis/ImportedFunctionsInliningStatistics.cpp
llvm/lib/Analysis/InlineAdvisor.cpp
llvm/lib/Transforms/IPO/Inliner.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/ImportedFunctionsInliningStatistics.cpp b/llvm/lib/Analysis/ImportedFunctionsInliningStatistics.cpp
index 48eeb87ac8b34..d24cb1c3c7a15 100644
--- a/llvm/lib/Analysis/ImportedFunctionsInliningStatistics.cpp
+++ b/llvm/lib/Analysis/ImportedFunctionsInliningStatistics.cpp
@@ -23,6 +23,7 @@
using namespace llvm;
+namespace llvm {
cl::opt<InlinerFunctionImportStatsOpts> InlinerFunctionImportStats(
"inliner-function-import-stats",
cl::init(InlinerFunctionImportStatsOpts::No),
@@ -31,6 +32,7 @@ cl::opt<InlinerFunctionImportStatsOpts> InlinerFunctionImportStats(
clEnumValN(InlinerFunctionImportStatsOpts::Verbose, "verbose",
"printing of statistics for each inlined function")),
cl::Hidden, cl::desc("Enable inliner stats for imported functions"));
+}
ImportedFunctionsInliningStatistics::InlineGraphNode &
ImportedFunctionsInliningStatistics::createInlineGraphNode(const Function &F) {
diff --git a/llvm/lib/Analysis/InlineAdvisor.cpp b/llvm/lib/Analysis/InlineAdvisor.cpp
index 3642d316c0fbe..e4335eff83f9a 100644
--- a/llvm/lib/Analysis/InlineAdvisor.cpp
+++ b/llvm/lib/Analysis/InlineAdvisor.cpp
@@ -61,7 +61,9 @@ static cl::opt<bool>
cl::desc("If true, annotate inline advisor remarks "
"with LTO and pass information."));
+namespace llvm {
extern cl::opt<InlinerFunctionImportStatsOpts> InlinerFunctionImportStats;
+}
namespace {
using namespace llvm::ore;
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp
index ea462f46cd4c2..5d4ad97f66420 100644
--- a/llvm/lib/Transforms/IPO/Inliner.cpp
+++ b/llvm/lib/Transforms/IPO/Inliner.cpp
@@ -109,7 +109,9 @@ static cl::opt<bool>
EnablePostSCCAdvisorPrinting("enable-scc-inline-advisor-printing",
cl::init(false), cl::Hidden);
+namespace llvm {
extern cl::opt<InlinerFunctionImportStatsOpts> InlinerFunctionImportStats;
+}
static cl::opt<std::string> CGSCCInlineReplayFile(
"cgscc-inline-replay", cl::init(""), cl::value_desc("filename"),
More information about the llvm-commits
mailing list