File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
llvm/include/llvm/Analysis Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1571,7 +1571,8 @@ void BlockFrequencyInfoImpl<BT>::initTransitionProbabilities(
1571
1571
SmallPtrSet<const BlockT *, 2 > UniqueSuccs;
1572
1572
for (const auto SI : children<const BlockT *>(BB)) {
1573
1573
// Ignore cold blocks
1574
- if (!BlockIndex.contains (SI))
1574
+ auto BlockIndexIt = BlockIndex.find (SI);
1575
+ if (BlockIndexIt == BlockIndex.end ())
1575
1576
continue ;
1576
1577
// Ignore parallel edges between BB and SI blocks
1577
1578
if (!UniqueSuccs.insert (SI).second )
@@ -1583,7 +1584,7 @@ void BlockFrequencyInfoImpl<BT>::initTransitionProbabilities(
1583
1584
1584
1585
auto EdgeProb =
1585
1586
Scaled64::getFraction (EP.getNumerator (), EP.getDenominator ());
1586
- size_t Dst = BlockIndex. find (SI) ->second ;
1587
+ size_t Dst = BlockIndexIt ->second ;
1587
1588
Succs[Src].push_back (std::make_pair (Dst, EdgeProb));
1588
1589
SumProb[Src] += EdgeProb;
1589
1590
}
You can’t perform that action at this time.
0 commit comments