We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 95e38ba commit 8fe6677Copy full SHA for 8fe6677
llvm/lib/Transforms/IPO/SampleProfileProbe.cpp
@@ -148,7 +148,8 @@ void PseudoProbeVerifier::verifyProbeFactors(
148
auto &PrevProbeFactors = FunctionProbeFactors[F->getName()];
149
for (const auto &I : ProbeFactors) {
150
float CurProbeFactor = I.second;
151
- if (PrevProbeFactors.count(I.first)) {
+ auto [It, Inserted] = PrevProbeFactors.try_emplace(I.first);
152
+ if (!Inserted) {
153
float PrevProbeFactor = PrevProbeFactors[I.first];
154
if (std::abs(CurProbeFactor - PrevProbeFactor) >
155
DistributionFactorVariance) {
@@ -163,7 +164,7 @@ void PseudoProbeVerifier::verifyProbeFactors(
163
164
}
165
166
// Update
- PrevProbeFactors[I.first] = I.second;
167
+ It->second = I.second;
168
169
170
0 commit comments