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 19e5a52 commit 76f2fa8Copy full SHA for 76f2fa8
llvm/include/llvm/Transforms/Utils/SampleProfileInference.h
@@ -247,9 +247,10 @@ FlowFunction SampleProfileInference<BT>::createFlowFunction(
247
// Create FlowBlocks
248
for (const auto *BB : BasicBlocks) {
249
FlowBlock Block;
250
- if (SampleBlockWeights.contains(BB)) {
+ auto It = SampleBlockWeights.find(BB);
251
+ if (It != SampleBlockWeights.end()) {
252
Block.HasUnknownWeight = false;
- Block.Weight = SampleBlockWeights[BB];
253
+ Block.Weight = It->second;
254
} else {
255
Block.HasUnknownWeight = true;
256
Block.Weight = 0;
0 commit comments