Skip to content

Commit 67efbd0

Browse files
authored
[LLVM] Fix various cl::desc typos and whitespace issues (NFC) (#121955)
1 parent 303249c commit 67efbd0

24 files changed

+55
-52
lines changed

llvm/lib/Analysis/ScalarEvolution.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static cl::opt<unsigned> RangeIterThreshold(
226226

227227
static cl::opt<unsigned> MaxLoopGuardCollectionDepth(
228228
"scalar-evolution-max-loop-guard-collection-depth", cl::Hidden,
229-
cl::desc("Maximum depth for recrusive loop guard collection"), cl::init(1));
229+
cl::desc("Maximum depth for recursive loop guard collection"), cl::init(1));
230230

231231
static cl::opt<bool>
232232
ClassifyExpressions("scalar-evolution-classify-expressions",

llvm/lib/CodeGen/CodeGenPrepare.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ static cl::opt<bool>
152152

153153
static cl::opt<bool>
154154
EnableAndCmpSinking("enable-andcmp-sinking", cl::Hidden, cl::init(true),
155-
cl::desc("Enable sinkinig and/cmp into branches."));
155+
cl::desc("Enable sinking and/cmp into branches."));
156156

157157
static cl::opt<bool> DisableStoreExtract(
158158
"disable-cgp-store-extract", cl::Hidden, cl::init(false),

llvm/lib/CodeGen/MIRSampleProfile.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,9 @@ static cl::opt<bool> ShowFSBranchProb(
4646
cl::desc("Print setting flow sensitive branch probabilities"));
4747
static cl::opt<unsigned> FSProfileDebugProbDiffThreshold(
4848
"fs-profile-debug-prob-diff-threshold", cl::init(10),
49-
cl::desc("Only show debug message if the branch probility is greater than "
50-
"this value (in percentage)."));
49+
cl::desc(
50+
"Only show debug message if the branch probability is greater than "
51+
"this value (in percentage)."));
5152

5253
static cl::opt<unsigned> FSProfileDebugBWThreshold(
5354
"fs-profile-debug-bw-threshold", cl::init(10000),

llvm/lib/CodeGen/MachineBlockPlacement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static cl::opt<unsigned> JumpInstCost("jump-inst-cost",
149149
static cl::opt<bool>
150150
TailDupPlacement("tail-dup-placement",
151151
cl::desc("Perform tail duplication during placement. "
152-
"Creates more fallthrough opportunites in "
152+
"Creates more fallthrough opportunities in "
153153
"outline branches."),
154154
cl::init(true), cl::Hidden);
155155

llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace llvm {
2929
cl::opt<unsigned>
3030
StaticLikelyProb("static-likely-prob",
3131
cl::desc("branch probability threshold in percentage"
32-
"to be considered very likely"),
32+
" to be considered very likely"),
3333
cl::init(80), cl::Hidden);
3434

3535
cl::opt<unsigned> ProfileLikelyProb(

llvm/lib/CodeGen/RegAllocGreedy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static cl::opt<bool> GreedyReverseLocalAssignment(
140140
static cl::opt<unsigned> SplitThresholdForRegWithHint(
141141
"split-threshold-for-reg-with-hint",
142142
cl::desc("The threshold for splitting a virtual register with a hint, in "
143-
"percentate"),
143+
"percentage"),
144144
cl::init(75), cl::Hidden);
145145

146146
static RegisterRegAlloc greedyRegAlloc("greedy", "greedy register allocator",

llvm/lib/CodeGen/RegisterCoalescer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static cl::opt<unsigned> LargeIntervalSizeThreshold(
113113

114114
static cl::opt<unsigned> LargeIntervalFreqThreshold(
115115
"large-interval-freq-threshold", cl::Hidden,
116-
cl::desc("For a large interval, if it is coalesed with other live "
116+
cl::desc("For a large interval, if it is coalesced with other live "
117117
"intervals many times more than the threshold, stop its "
118118
"coalescing to control the compile time. "),
119119
cl::init(256));

llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static cl::opt<bool> EnableReduceLoadOpStoreWidth(
141141
static cl::opt<bool> ReduceLoadOpStoreWidthForceNarrowingProfitable(
142142
"combiner-reduce-load-op-store-width-force-narrowing-profitable",
143143
cl::Hidden, cl::init(false),
144-
cl::desc("DAG combiner force override the narrowing profitable check when"
144+
cl::desc("DAG combiner force override the narrowing profitable check when "
145145
"reducing the width of load/op/store sequences"));
146146

147147
static cl::opt<bool> EnableShrinkLoadReplaceStoreWithStore(

llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ static cl::opt<int> MaxReorderWindow(
125125
cl::desc("Number of instructions to allow ahead of the critical path "
126126
"in sched=list-ilp"));
127127

128-
static cl::opt<unsigned> AvgIPC(
129-
"sched-avg-ipc", cl::Hidden, cl::init(1),
130-
cl::desc("Average inst/cycle whan no target itinerary exists."));
128+
static cl::opt<unsigned>
129+
AvgIPC("sched-avg-ipc", cl::Hidden, cl::init(1),
130+
cl::desc("Average inst/cycle when no target itinerary exists."));
131131

132132
namespace {
133133

llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ STATISTIC(LoadsClustered, "Number of loads clustered together");
4343
// without a target itinerary. The choice of number here has more to do with
4444
// balancing scheduler heuristics than with the actual machine latency.
4545
static cl::opt<int> HighLatencyCycles(
46-
"sched-high-latency-cycles", cl::Hidden, cl::init(10),
47-
cl::desc("Roughly estimate the number of cycles that 'long latency'"
48-
"instructions take for targets with no itinerary"));
46+
"sched-high-latency-cycles", cl::Hidden, cl::init(10),
47+
cl::desc("Roughly estimate the number of cycles that 'long latency' "
48+
"instructions take for targets with no itinerary"));
4949

5050
ScheduleDAGSDNodes::ScheduleDAGSDNodes(MachineFunction &mf)
5151
: ScheduleDAG(mf), InstrItins(mf.getSubtarget().getInstrItineraryData()) {}

llvm/lib/Passes/PassBuilderPipelines.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ static cl::opt<bool> EnableGlobalAnalyses(
189189
"enable-global-analyses", cl::init(true), cl::Hidden,
190190
cl::desc("Enable inter-procedural analyses"));
191191

192-
static cl::opt<bool>
193-
RunPartialInlining("enable-partial-inlining", cl::init(false), cl::Hidden,
194-
cl::desc("Run Partial inlinining pass"));
192+
static cl::opt<bool> RunPartialInlining("enable-partial-inlining",
193+
cl::init(false), cl::Hidden,
194+
cl::desc("Run Partial inlining pass"));
195195

196196
static cl::opt<bool> ExtraVectorizerPasses(
197197
"extra-vectorizer-passes", cl::init(false), cl::Hidden,
@@ -264,7 +264,7 @@ static cl::opt<bool>
264264
static cl::opt<bool> FlattenedProfileUsed(
265265
"flattened-profile-used", cl::init(false), cl::Hidden,
266266
cl::desc("Indicate the sample profile being used is flattened, i.e., "
267-
"no inline hierachy exists in the profile"));
267+
"no inline hierarchy exists in the profile"));
268268

269269
static cl::opt<bool> EnableOrderFileInstrumentation(
270270
"enable-order-file-instrumentation", cl::init(false), cl::Hidden,

llvm/lib/Target/X86/X86ISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static cl::opt<int> BrMergingCcmpBias(
9494

9595
static cl::opt<bool>
9696
WidenShift("x86-widen-shift", cl::init(true),
97-
cl::desc("Replacte narrow shifts with wider shifts."),
97+
cl::desc("Replace narrow shifts with wider shifts."),
9898
cl::Hidden);
9999

100100
static cl::opt<int> BrMergingLikelyBias(

llvm/lib/Transforms/IPO/FunctionSpecialization.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,19 @@ static cl::opt<unsigned> MaxCodeSizeGrowth(
6666
"Maximum codesize growth allowed per function"));
6767

6868
static cl::opt<unsigned> MinCodeSizeSavings(
69-
"funcspec-min-codesize-savings", cl::init(20), cl::Hidden, cl::desc(
70-
"Reject specializations whose codesize savings are less than this"
71-
"much percent of the original function size"));
69+
"funcspec-min-codesize-savings", cl::init(20), cl::Hidden,
70+
cl::desc("Reject specializations whose codesize savings are less than this "
71+
"much percent of the original function size"));
7272

7373
static cl::opt<unsigned> MinLatencySavings(
7474
"funcspec-min-latency-savings", cl::init(40), cl::Hidden,
75-
cl::desc("Reject specializations whose latency savings are less than this"
75+
cl::desc("Reject specializations whose latency savings are less than this "
7676
"much percent of the original function size"));
7777

7878
static cl::opt<unsigned> MinInliningBonus(
79-
"funcspec-min-inlining-bonus", cl::init(300), cl::Hidden, cl::desc(
80-
"Reject specializations whose inlining bonus is less than this"
81-
"much percent of the original function size"));
79+
"funcspec-min-inlining-bonus", cl::init(300), cl::Hidden,
80+
cl::desc("Reject specializations whose inlining bonus is less than this "
81+
"much percent of the original function size"));
8282

8383
static cl::opt<bool> SpecializeOnAddress(
8484
"funcspec-on-address", cl::init(false), cl::Hidden, cl::desc(

llvm/lib/Transforms/IPO/GlobalOpt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ static cl::opt<int> ColdCCRelFreq(
105105
"coldcc-rel-freq", cl::Hidden, cl::init(2),
106106
cl::desc(
107107
"Maximum block frequency, expressed as a percentage of caller's "
108-
"entry frequency, for a call site to be considered cold for enabling"
108+
"entry frequency, for a call site to be considered cold for enabling "
109109
"coldcc"));
110110

111111
/// Is this global variable possibly used by a leak checker as a root? If so,

llvm/lib/Transforms/IPO/OpenMPOpt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static cl::opt<bool> PrintModuleBeforeOptimizations(
129129

130130
static cl::opt<bool> AlwaysInlineDeviceFunctions(
131131
"openmp-opt-inline-device",
132-
cl::desc("Inline all applicible functions on the device."), cl::Hidden,
132+
cl::desc("Inline all applicable functions on the device."), cl::Hidden,
133133
cl::init(false));
134134

135135
static cl::opt<bool>

llvm/lib/Transforms/IPO/SampleProfile.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ static cl::opt<bool> ProfileSampleBlockAccurate(
162162
static cl::opt<bool> ProfileAccurateForSymsInList(
163163
"profile-accurate-for-symsinlist", cl::Hidden, cl::init(true),
164164
cl::desc("For symbols in profile symbol list, regard their profiles to "
165-
"be accurate. It may be overriden by profile-sample-accurate. "));
165+
"be accurate. It may be overridden by profile-sample-accurate. "));
166166

167167
static cl::opt<bool> ProfileMergeInlinee(
168168
"sample-profile-merge-inlinee", cl::Hidden, cl::init(true),
@@ -193,9 +193,10 @@ static cl::opt<bool> ProfileSizeInline(
193193
// and inline the hot functions (that are skipped in this pass).
194194
static cl::opt<bool> DisableSampleLoaderInlining(
195195
"disable-sample-loader-inlining", cl::Hidden, cl::init(false),
196-
cl::desc("If true, artifically skip inline transformation in sample-loader "
197-
"pass, and merge (or scale) profiles (as configured by "
198-
"--sample-profile-merge-inlinee)."));
196+
cl::desc(
197+
"If true, artificially skip inline transformation in sample-loader "
198+
"pass, and merge (or scale) profiles (as configured by "
199+
"--sample-profile-merge-inlinee)."));
199200

200201
namespace llvm {
201202
cl::opt<bool>
@@ -255,7 +256,7 @@ static cl::opt<unsigned> PrecentMismatchForStalenessError(
255256

256257
static cl::opt<bool> CallsitePrioritizedInline(
257258
"sample-profile-prioritized-inline", cl::Hidden,
258-
cl::desc("Use call site prioritized inlining for sample profile loader."
259+
cl::desc("Use call site prioritized inlining for sample profile loader. "
259260
"Currently only CSSPGO is supported."));
260261

261262
static cl::opt<bool> UsePreInlinerDecision(

llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ static cl::opt<bool>
192192
cl::Hidden);
193193

194194
static cl::opt<int> ClHotPercentileCutoff("hwasan-percentile-cutoff-hot",
195-
cl::desc("Hot percentile cuttoff."));
195+
cl::desc("Hot percentile cutoff."));
196196

197197
static cl::opt<float>
198198
ClRandomSkipRate("hwasan-random-rate",

llvm/lib/Transforms/Instrumentation/LowerAllowCheckPass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ using namespace llvm;
3030

3131
static cl::opt<int>
3232
HotPercentileCutoff("lower-allow-check-percentile-cutoff-hot",
33-
cl::desc("Hot percentile cuttoff."));
33+
cl::desc("Hot percentile cutoff."));
3434

3535
static cl::opt<float>
3636
RandomRate("lower-allow-check-random-rate",

llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ STATISTIC(NumCoveredBlocks, "Number of basic blocks that were executed");
158158

159159
// Command line option to specify the file to read profile from. This is
160160
// mainly used for testing.
161-
static cl::opt<std::string>
162-
PGOTestProfileFile("pgo-test-profile-file", cl::init(""), cl::Hidden,
163-
cl::value_desc("filename"),
164-
cl::desc("Specify the path of profile data file. This is"
165-
"mainly for test purpose."));
161+
static cl::opt<std::string> PGOTestProfileFile(
162+
"pgo-test-profile-file", cl::init(""), cl::Hidden,
163+
cl::value_desc("filename"),
164+
cl::desc("Specify the path of profile data file. This is "
165+
"mainly for test purpose."));
166166
static cl::opt<std::string> PGOTestProfileRemappingFile(
167167
"pgo-test-profile-remapping-file", cl::init(""), cl::Hidden,
168168
cl::value_desc("filename"),
@@ -186,7 +186,7 @@ static cl::opt<unsigned> MaxNumAnnotations(
186186
// to write to the metadata for a single memop intrinsic.
187187
static cl::opt<unsigned> MaxNumMemOPAnnotations(
188188
"memop-max-annotations", cl::init(4), cl::Hidden,
189-
cl::desc("Max number of preicise value annotations for a single memop"
189+
cl::desc("Max number of precise value annotations for a single memop"
190190
"intrinsic"));
191191

192192
// Command line option to control appending FunctionHash to the name of a COMDAT
@@ -291,13 +291,13 @@ static cl::opt<bool> PGOVerifyHotBFI(
291291
cl::desc("Print out the non-match BFI count if a hot raw profile count "
292292
"becomes non-hot, or a cold raw profile count becomes hot. "
293293
"The print is enabled under -Rpass-analysis=pgo, or "
294-
"internal option -pass-remakrs-analysis=pgo."));
294+
"internal option -pass-remarks-analysis=pgo."));
295295

296296
static cl::opt<bool> PGOVerifyBFI(
297297
"pgo-verify-bfi", cl::init(false), cl::Hidden,
298298
cl::desc("Print out mismatched BFI counts after setting profile metadata "
299299
"The print is enabled under -Rpass-analysis=pgo, or "
300-
"internal option -pass-remakrs-analysis=pgo."));
300+
"internal option -pass-remarks-analysis=pgo."));
301301

302302
static cl::opt<unsigned> PGOVerifyBFIRatio(
303303
"pgo-verify-bfi-ratio", cl::init(2), cl::Hidden,

llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ static cl::opt<bool, true>
128128

129129
static cl::opt<bool> UseLIRCodeSizeHeurs(
130130
"use-lir-code-size-heurs",
131-
cl::desc("Use loop idiom recognition code size heuristics when compiling"
131+
cl::desc("Use loop idiom recognition code size heuristics when compiling "
132132
"with -Os/-Oz"),
133133
cl::init(true), cl::Hidden);
134134

llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static cl::opt<unsigned> UnrollMaxPercentThresholdBoost(
104104

105105
static cl::opt<unsigned> UnrollMaxIterationsCountToAnalyze(
106106
"unroll-max-iteration-count-to-analyze", cl::init(10), cl::Hidden,
107-
cl::desc("Don't allow loop unrolling to simulate more than this number of"
107+
cl::desc("Don't allow loop unrolling to simulate more than this number of "
108108
"iterations when checking full unroll profitability"));
109109

110110
static cl::opt<unsigned> UnrollCount(

llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static const char *LICMVersioningMetaData = "llvm.loop.licm_versioning.disable";
9595
/// invariant instructions in a loop.
9696
static cl::opt<float>
9797
LVInvarThreshold("licm-versioning-invariant-threshold",
98-
cl::desc("LoopVersioningLICM's minimum allowed percentage"
98+
cl::desc("LoopVersioningLICM's minimum allowed percentage "
9999
"of possible invariant instructions per loop"),
100100
cl::init(25), cl::Hidden);
101101

llvm/lib/Transforms/Utils/AssumeBundleBuilder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ using namespace llvm;
2828
namespace llvm {
2929
cl::opt<bool> ShouldPreserveAllAttributes(
3030
"assume-preserve-all", cl::init(false), cl::Hidden,
31-
cl::desc("enable preservation of all attrbitues. even those that are "
32-
"unlikely to be usefull"));
31+
cl::desc("enable preservation of all attributes. even those that are "
32+
"unlikely to be useful"));
3333

3434
cl::opt<bool> EnableKnowledgeRetention(
3535
"enable-knowledge-retention", cl::init(false), cl::Hidden,

llvm/lib/Transforms/Utils/SimplifyCFG.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ using namespace PatternMatch;
9696
cl::opt<bool> llvm::RequireAndPreserveDomTree(
9797
"simplifycfg-require-and-preserve-domtree", cl::Hidden,
9898

99-
cl::desc("Temorary development switch used to gradually uplift SimplifyCFG "
100-
"into preserving DomTree,"));
99+
cl::desc(
100+
"Temporary development switch used to gradually uplift SimplifyCFG "
101+
"into preserving DomTree,"));
101102

102103
// Chosen as 2 so as to be cheap, but still to have enough power to fold
103104
// a select, so the "clamp" idiom (of a min followed by a max) will be caught.
@@ -126,7 +127,7 @@ static cl::opt<bool> HoistLoadsStoresWithCondFaulting(
126127

127128
static cl::opt<unsigned> HoistLoadsStoresWithCondFaultingThreshold(
128129
"hoist-loads-stores-with-cond-faulting-threshold", cl::Hidden, cl::init(6),
129-
cl::desc("Control the maximal conditonal load/store that we are willing "
130+
cl::desc("Control the maximal conditional load/store that we are willing "
130131
"to speculatively execute to eliminate conditional branch "
131132
"(default = 6)"));
132133

0 commit comments

Comments
 (0)