Skip to content

Commit 4edd74a

Browse files
committed
BlockFrequencyInfoImpl.h - use const references to avoid FrequencyData copies. NFCI.
1 parent 71b89b1 commit 4edd74a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,8 +1449,8 @@ void BlockFrequencyInfoImpl<BT>::verifyMatch(
14491449
BlockNode Node = Entry.second;
14501450
if (OtherValidNodes.count(BB)) {
14511451
BlockNode OtherNode = OtherValidNodes[BB];
1452-
auto Freq = Freqs[Node.Index];
1453-
auto OtherFreq = Other.Freqs[OtherNode.Index];
1452+
const auto &Freq = Freqs[Node.Index];
1453+
const auto &OtherFreq = Other.Freqs[OtherNode.Index];
14541454
if (Freq.Integer != OtherFreq.Integer) {
14551455
Match = false;
14561456
dbgs() << "Freq mismatch: " << bfi_detail::getBlockName(BB) << " "

0 commit comments

Comments
 (0)