Skip to content

Commit f74a236

Browse files
committed
fixup: fix two comments
1 parent 565ba9a commit f74a236

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

llvm/lib/Transforms/IPO/UnpredictableProfileLoader.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,10 @@ static cl::opt<double>
5757
cl::desc("Multiply all ratios by this factor"), cl::init(1.0),
5858
cl::ReallyHidden);
5959

60-
// Lookup samples for an Instruction's corresponding location in a
61-
// FunctionSamples profile. The count returned is directly from the profile
62-
// representing the number of samples seen.
60+
// Lookup execution frequency and mispredict samples for an Instruction's
61+
// corresponding location in a the two FunctionSamples profiles and compute an
62+
// effective branch mispredict ratio. The counts used to compute the ratio are
63+
// uint64s read directly from the profile files.
6364
ErrorOr<double> UnpredictableProfileLoaderPass::getMispredictRatio(
6465
const FunctionSamples *FuncFreqSamples,
6566
const FunctionSamples *FuncMispSamples, const Instruction *I) {
@@ -101,8 +102,9 @@ ErrorOr<double> UnpredictableProfileLoaderPass::getMispredictRatio(
101102
return MissRatio;
102103
}
103104

104-
// Examine all Select and BranchInsts in a function, adding !unpredictable
105-
// metadata if they appear in the mispredict profile with sufficient weight.
105+
// Examine all Branch, Select, and SwitchInsts in a function, adding
106+
// !unpredictable metadata if they appear in the mispredict profile with
107+
// sufficient weight.
106108
bool UnpredictableProfileLoaderPass::addUpredictableMetadata(Function &F) {
107109

108110
const FunctionSamples *FreqSamples = FreqReader->getSamplesFor(F);

0 commit comments

Comments
 (0)