Skip to content

Commit 9d3bf9b

Browse files
committed
[NFC] [hwasan] consistent naming for cl::opt
1 parent 30f098e commit 9d3bf9b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,15 @@ static cl::opt<bool>
187187
cl::desc("Use selective instrumentation"),
188188
cl::Hidden, cl::init(false));
189189

190-
static cl::opt<int> HotPercentileCutoff(
190+
static cl::opt<int> ClHotPercentileCutoff(
191191
"hwasan-percentile-cutoff-hot", cl::init(0),
192192
cl::desc("Alternative hot percentile cuttoff."
193193
"By default `-profile-summary-cutoff-hot` is used."));
194194

195195
static cl::opt<float>
196-
RandomSkipRate("hwasan-random-skip-rate", cl::init(0),
197-
cl::desc("Probability value in the range [0.0, 1.0] "
198-
"to skip instrumentation of a function."));
196+
ClRandomSkipRate("hwasan-random-skip-rate", cl::init(0),
197+
cl::desc("Probability value in the range [0.0, 1.0] "
198+
"to skip instrumentation of a function."));
199199

200200
STATISTIC(NumTotalFuncs, "Number of total funcs");
201201
STATISTIC(NumInstrumentedFuncs, "Number of instrumented funcs");
@@ -301,7 +301,7 @@ class HWAddressSanitizer {
301301
? ClEnableKhwasan
302302
: CompileKernel;
303303
this->Rng =
304-
RandomSkipRate.getNumOccurrences() ? M.createRNG("hwasan") : nullptr;
304+
ClRandomSkipRate.getNumOccurrences() ? M.createRNG("hwasan") : nullptr;
305305

306306
initializeModule();
307307
}
@@ -1537,8 +1537,8 @@ void HWAddressSanitizer::sanitizeFunction(Function &F,
15371537

15381538
NumTotalFuncs++;
15391539
if (CSelectiveInstrumentation) {
1540-
if (RandomSkipRate.getNumOccurrences()) {
1541-
std::bernoulli_distribution D(RandomSkipRate);
1540+
if (ClRandomSkipRate.getNumOccurrences()) {
1541+
std::bernoulli_distribution D(ClRandomSkipRate);
15421542
if (D(*Rng))
15431543
return;
15441544
} else {
@@ -1547,10 +1547,10 @@ void HWAddressSanitizer::sanitizeFunction(Function &F,
15471547
MAMProxy.getCachedResult<ProfileSummaryAnalysis>(*F.getParent());
15481548
if (PSI && PSI->hasProfileSummary()) {
15491549
auto &BFI = FAM.getResult<BlockFrequencyAnalysis>(F);
1550-
if ((HotPercentileCutoff.getNumOccurrences() &&
1551-
HotPercentileCutoff >= 0)
1550+
if ((ClHotPercentileCutoff.getNumOccurrences() &&
1551+
ClHotPercentileCutoff >= 0)
15521552
? PSI->isFunctionHotInCallGraphNthPercentile(
1553-
HotPercentileCutoff, &F, BFI)
1553+
ClHotPercentileCutoff, &F, BFI)
15541554
: PSI->isFunctionHotInCallGraph(&F, BFI))
15551555
return;
15561556
} else {

0 commit comments

Comments
 (0)