Commit 72aec1d 1 parent 3692fb6 commit 72aec1d Copy full SHA for 72aec1d
File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -148,8 +148,9 @@ void PseudoProbeVerifier::verifyProbeFactors(
148
148
auto &PrevProbeFactors = FunctionProbeFactors[F->getName ()];
149
149
for (const auto &I : ProbeFactors) {
150
150
float CurProbeFactor = I.second ;
151
- if (PrevProbeFactors.count (I.first )) {
152
- float PrevProbeFactor = PrevProbeFactors[I.first ];
151
+ auto [It, Inserted] = PrevProbeFactors.try_emplace (I.first );
152
+ if (!Inserted) {
153
+ float PrevProbeFactor = It->second ;
153
154
if (std::abs (CurProbeFactor - PrevProbeFactor) >
154
155
DistributionFactorVariance) {
155
156
if (!BannerPrinted) {
@@ -163,7 +164,7 @@ void PseudoProbeVerifier::verifyProbeFactors(
163
164
}
164
165
165
166
// Update
166
- PrevProbeFactors[I. first ] = I.second ;
167
+ It-> second = I.second ;
167
168
}
168
169
}
169
170
You can’t perform that action at this time.
0 commit comments