diff options
author | chrisPyr <32153107+chrisPyr@users.noreply.github.com> | 2025-03-03 14:46:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-03 13:46:33 +0700 |
commit | 71f4c7dabec0f32b2d475e8e08f0da99628a067c (patch) | |
tree | 855a0b24f32551f0a9de9f1404826adbac111fb5 /llvm/lib/Analysis | |
parent | 1b043c25573aa0b13ad4241c641c38ca26f26bc1 (diff) | |
download | llvm-71f4c7dabec0f32b2d475e8e08f0da99628a067c.zip llvm-71f4c7dabec0f32b2d475e8e08f0da99628a067c.tar.gz llvm-71f4c7dabec0f32b2d475e8e08f0da99628a067c.tar.bz2 |
[NFC]Make file-local cl::opt global variables static (#126486)
#125983
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r-- | llvm/lib/Analysis/AliasAnalysis.cpp | 5 | ||||
-rw-r--r-- | llvm/lib/Analysis/BranchProbabilityInfo.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/Analysis/IRSimilarityIdentifier.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Analysis/MemoryProfileInfo.cpp | 2 |
6 files changed, 8 insertions, 9 deletions
diff --git a/llvm/lib/Analysis/AliasAnalysis.cpp b/llvm/lib/Analysis/AliasAnalysis.cpp index 3365349..c3d2ad1 100644 --- a/llvm/lib/Analysis/AliasAnalysis.cpp +++ b/llvm/lib/Analysis/AliasAnalysis.cpp @@ -58,11 +58,10 @@ STATISTIC(NumNoAlias, "Number of NoAlias results"); STATISTIC(NumMayAlias, "Number of MayAlias results"); STATISTIC(NumMustAlias, "Number of MustAlias results"); -namespace llvm { /// Allow disabling BasicAA from the AA results. This is particularly useful /// when testing to isolate a single AA implementation. -cl::opt<bool> DisableBasicAA("disable-basic-aa", cl::Hidden, cl::init(false)); -} // namespace llvm +static cl::opt<bool> DisableBasicAA("disable-basic-aa", cl::Hidden, + cl::init(false)); #ifndef NDEBUG /// Print a trace of alias analysis queries and their results. diff --git a/llvm/lib/Analysis/BranchProbabilityInfo.cpp b/llvm/lib/Analysis/BranchProbabilityInfo.cpp index 8077c28..62c2b36 100644 --- a/llvm/lib/Analysis/BranchProbabilityInfo.cpp +++ b/llvm/lib/Analysis/BranchProbabilityInfo.cpp @@ -54,7 +54,7 @@ static cl::opt<bool> PrintBranchProb( "print-bpi", cl::init(false), cl::Hidden, cl::desc("Print the branch probability info.")); -cl::opt<std::string> PrintBranchProbFuncName( +static cl::opt<std::string> PrintBranchProbFuncName( "print-bpi-func-name", cl::Hidden, cl::desc("The option to specify the name of the function " "whose branch probability info is printed.")); diff --git a/llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp b/llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp index 0ffbc90d..c135fe1 100644 --- a/llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp +++ b/llvm/lib/Analysis/FunctionPropertiesAnalysis.cpp @@ -30,12 +30,12 @@ cl::opt<bool> EnableDetailedFunctionProperties( "enable-detailed-function-properties", cl::Hidden, cl::init(false), cl::desc("Whether or not to compute detailed function properties.")); -cl::opt<unsigned> BigBasicBlockInstructionThreshold( +static cl::opt<unsigned> BigBasicBlockInstructionThreshold( "big-basic-block-instruction-threshold", cl::Hidden, cl::init(500), cl::desc("The minimum number of instructions a basic block should contain " "before being considered big.")); -cl::opt<unsigned> MediumBasicBlockInstructionThreshold( +static cl::opt<unsigned> MediumBasicBlockInstructionThreshold( "medium-basic-block-instruction-threshold", cl::Hidden, cl::init(15), cl::desc("The minimum number of instructions a basic block should contain " "before being considered medium-sized.")); diff --git a/llvm/lib/Analysis/IRSimilarityIdentifier.cpp b/llvm/lib/Analysis/IRSimilarityIdentifier.cpp index 42e986e..e1daf02 100644 --- a/llvm/lib/Analysis/IRSimilarityIdentifier.cpp +++ b/llvm/lib/Analysis/IRSimilarityIdentifier.cpp @@ -36,7 +36,7 @@ cl::opt<bool> cl::ReallyHidden, cl::desc("disable outlining indirect calls.")); -cl::opt<bool> +static cl::opt<bool> MatchCallsByName("ir-sim-calls-by-name", cl::init(false), cl::ReallyHidden, cl::desc("only allow matching call instructions if the " "name and type signature match.")); diff --git a/llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp b/llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp index 4074b67..fcecfc7 100644 --- a/llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp +++ b/llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp @@ -36,7 +36,7 @@ AnalysisKey InlineSizeEstimatorAnalysis::Key; #include <deque> #include <optional> -cl::opt<std::string> TFIR2NativeModelPath( +static cl::opt<std::string> TFIR2NativeModelPath( "ml-inliner-ir2native-model", cl::Hidden, cl::desc("Path to saved model evaluating native size from IR.")); diff --git a/llvm/lib/Analysis/MemoryProfileInfo.cpp b/llvm/lib/Analysis/MemoryProfileInfo.cpp index 913396f..95138de 100644 --- a/llvm/lib/Analysis/MemoryProfileInfo.cpp +++ b/llvm/lib/Analysis/MemoryProfileInfo.cpp @@ -54,7 +54,7 @@ cl::opt<bool> MemProfReportHintedSizes( // This is useful if we have enabled reporting of hinted sizes, and want to get // information from the indexing step for all contexts (especially for testing), // or have specified a value less than 100% for -memprof-cloning-cold-threshold. -cl::opt<bool> MemProfKeepAllNotColdContexts( +static cl::opt<bool> MemProfKeepAllNotColdContexts( "memprof-keep-all-not-cold-contexts", cl::init(false), cl::Hidden, cl::desc("Keep all non-cold contexts (increases cloning overheads)")); |