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(
15711571 SmallPtrSet<const BlockT *, 2 > UniqueSuccs;
15721572 for (const auto SI : children<const BlockT *>(BB)) {
15731573 // Ignore cold blocks
1574- if (!BlockIndex.contains (SI))
1574+ auto BlockIndexIt = BlockIndex.find (SI);
1575+ if (BlockIndexIt == BlockIndex.end ())
15751576 continue ;
15761577 // Ignore parallel edges between BB and SI blocks
15771578 if (!UniqueSuccs.insert (SI).second )
@@ -1583,7 +1584,7 @@ void BlockFrequencyInfoImpl<BT>::initTransitionProbabilities(
15831584
15841585 auto EdgeProb =
15851586 Scaled64::getFraction (EP.getNumerator (), EP.getDenominator ());
1586- size_t Dst = BlockIndex. find (SI) ->second ;
1587+ size_t Dst = BlockIndexIt ->second ;
15871588 Succs[Src].push_back (std::make_pair (Dst, EdgeProb));
15881589 SumProb[Src] += EdgeProb;
15891590 }
You can’t perform that action at this time.
0 commit comments