File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -148,8 +148,9 @@ void PseudoProbeVerifier::verifyProbeFactors(
148148 auto &PrevProbeFactors = FunctionProbeFactors[F->getName ()];
149149 for (const auto &I : ProbeFactors) {
150150 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 ;
153154 if (std::abs (CurProbeFactor - PrevProbeFactor) >
154155 DistributionFactorVariance) {
155156 if (!BannerPrinted) {
@@ -163,7 +164,7 @@ void PseudoProbeVerifier::verifyProbeFactors(
163164 }
164165
165166 // Update
166- PrevProbeFactors[I. first ] = I.second ;
167+ It-> second = I.second ;
167168 }
168169}
169170
You can’t perform that action at this time.
0 commit comments