aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2021-12-30 01:12:55 -0800
committerFangrui Song <i@maskray.me>2021-12-30 01:12:55 -0800
commitb69fe48ccf9ec19f6237ee2e9d16fc6a7071c17c (patch)
treef4326fcb4f8d17b078649ad8a144d60c8d38e068
parent43ff781c783d32b5abf62509593d388c540b7ad8 (diff)
downloadllvm-b69fe48ccf9ec19f6237ee2e9d16fc6a7071c17c.zip
llvm-b69fe48ccf9ec19f6237ee2e9d16fc6a7071c17c.tar.gz
llvm-b69fe48ccf9ec19f6237ee2e9d16fc6a7071c17c.tar.bz2
[IROutliner] Move global namespace cl::opt inside llvm::
-rw-r--r--llvm/lib/Analysis/IRSimilarityIdentifier.cpp2
-rw-r--r--llvm/lib/Transforms/IPO/IROutliner.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/IRSimilarityIdentifier.cpp b/llvm/lib/Analysis/IRSimilarityIdentifier.cpp
index 2ec6cbea..ca1a290 100644
--- a/llvm/lib/Analysis/IRSimilarityIdentifier.cpp
+++ b/llvm/lib/Analysis/IRSimilarityIdentifier.cpp
@@ -23,11 +23,13 @@
using namespace llvm;
using namespace IRSimilarity;
+namespace llvm {
cl::opt<bool>
DisableBranches("no-ir-sim-branch-matching", cl::init(false),
cl::ReallyHidden,
cl::desc("disable similarity matching, and outlining, "
"across branches for debugging purposes."));
+} // namespace llvm
IRInstructionData::IRInstructionData(Instruction &I, bool Legality,
IRInstructionDataList &IDList)
diff --git a/llvm/lib/Transforms/IPO/IROutliner.cpp b/llvm/lib/Transforms/IPO/IROutliner.cpp
index b8a314c..928b1201 100644
--- a/llvm/lib/Transforms/IPO/IROutliner.cpp
+++ b/llvm/lib/Transforms/IPO/IROutliner.cpp
@@ -36,7 +36,9 @@ using namespace IRSimilarity;
// A command flag to be used for debugging to exclude branches from similarity
// matching and outlining.
+namespace llvm {
extern cl::opt<bool> DisableBranches;
+} // namespace llvm
// Set to true if the user wants the ir outliner to run on linkonceodr linkage
// functions. This is false by default because the linker can dedupe linkonceodr