@@ -455,9 +455,9 @@ class SampleProfileMatcher {
455
455
Unknown = 32 ,
456
456
};
457
457
458
- // For each function, store every callsite a matching state into this map, of
459
- // which each entry is a pair of callsite location and MatchState. This is
460
- // used for profile stalness computation and report.
458
+ // For each function, store every callsite and its matching state into this
459
+ // map, of which each entry is a pair of callsite location and MatchState.
460
+ // This is used for profile staleness computation and report.
461
461
StringMap<std::unordered_map<LineLocation, MatchState, LineLocationHash>>
462
462
FuncCallsiteMatchStates;
463
463
@@ -2416,9 +2416,9 @@ void SampleProfileMatcher::computeCallsiteMatchStates(
2416
2416
2417
2417
for (const auto &I : IRAnchors) {
2418
2418
// In post-match, use the matching result to remap the current IR callsite.
2419
- const auto &Loc = MapIRLocToProfileLoc (I.first );
2419
+ const auto &ProfileLoc = MapIRLocToProfileLoc (I.first );
2420
2420
const auto &IRCalleeName = I.second ;
2421
- const auto &It = ProfileAnchors.find (Loc );
2421
+ const auto &It = ProfileAnchors.find (ProfileLoc );
2422
2422
if (It == ProfileAnchors.end ())
2423
2423
continue ;
2424
2424
const auto &Callees = It->second ;
@@ -2434,7 +2434,7 @@ void SampleProfileMatcher::computeCallsiteMatchStates(
2434
2434
IsCallsiteMatched = true ;
2435
2435
2436
2436
if (IsCallsiteMatched) {
2437
- auto R = CallsiteMatchStates.emplace (Loc , MatchState::Matched);
2437
+ auto R = CallsiteMatchStates.emplace (ProfileLoc , MatchState::Matched);
2438
2438
// When there is an existing state, we know it's in post-match phrase.
2439
2439
// Update the matching state accordingly.
2440
2440
if (!R.second ) {
@@ -2584,8 +2584,7 @@ void SampleProfileMatcher::computeAndReportProfileStaleness() {
2584
2584
errs () << " (" << NumStaleProfileFunc << " /" << TotalProfiledFunc << " )"
2585
2585
<< " of functions' profile are invalid and "
2586
2586
<< " (" << MismatchedFunctionSamples << " /" << TotalFunctionSamples
2587
- << " )"
2588
- << " of samples are discarded due to function hash mismatch.\n " ;
2587
+ << " ) of samples are discarded due to function hash mismatch.\n " ;
2589
2588
}
2590
2589
errs () << " (" << (NumMismatchedCallsites + NumRecoveredCallsites) << " /"
2591
2590
<< TotalProfiledCallsites << " )"
0 commit comments