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() {
14091409 auto Node = getNode (&BB);
14101410 if (!Node.isValid ())
14111411 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
14151415 Freqs[Node.Index ].Scaled = Scaled64::getZero ();
1416- }
14171416 }
14181417}
14191418
@@ -1764,8 +1763,8 @@ void BlockFrequencyInfoImpl<BT>::verifyMatch(
17641763 for (auto &Entry : ValidNodes) {
17651764 const BlockT *BB = Entry.first ;
17661765 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 ;
17691768 const auto &Freq = Freqs[Node.Index ];
17701769 const auto &OtherFreq = Other.Freqs [OtherNode.Index ];
17711770 if (Freq.Integer != OtherFreq.Integer ) {
You can’t perform that action at this time.
0 commit comments