File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
llvm/include/llvm/Analysis Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -1409,11 +1409,10 @@ template <class BT> void BlockFrequencyInfoImpl<BT>::applyIterativeInference() {
1409
1409
auto Node = getNode (&BB);
1410
1410
if (!Node.isValid ())
1411
1411
continue ;
1412
- if (BlockIndex.count (&BB)) {
1413
- Freqs[Node.Index ].Scaled = Freq[BlockIndex[&BB] ];
1414
- } else {
1412
+ if (auto It = BlockIndex.find (&BB); It != BlockIndex. end ())
1413
+ Freqs[Node.Index ].Scaled = Freq[It-> second ];
1414
+ else
1415
1415
Freqs[Node.Index ].Scaled = Scaled64::getZero ();
1416
- }
1417
1416
}
1418
1417
}
1419
1418
@@ -1764,8 +1763,8 @@ void BlockFrequencyInfoImpl<BT>::verifyMatch(
1764
1763
for (auto &Entry : ValidNodes) {
1765
1764
const BlockT *BB = Entry.first ;
1766
1765
BlockNode Node = Entry.second ;
1767
- if (OtherValidNodes.count (BB)) {
1768
- BlockNode OtherNode = OtherValidNodes[BB] ;
1766
+ if (auto It = OtherValidNodes.find (BB); It != OtherValidNodes. end ( )) {
1767
+ BlockNode OtherNode = It-> second ;
1769
1768
const auto &Freq = Freqs[Node.Index ];
1770
1769
const auto &OtherFreq = Other.Freqs [OtherNode.Index ];
1771
1770
if (Freq.Integer != OtherFreq.Integer ) {
You can’t perform that action at this time.
0 commit comments