Skip to content

Commit 46176d0

Browse files
author
git apple-llvm automerger
committed
Merge commit '19a7fe03b4f5' from llvm.org/main into next
2 parents a37c632 + 19a7fe0 commit 46176d0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/CodeGen/MachineBlockPlacement.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3178,11 +3178,11 @@ bool MachineBlockPlacement::maybeTailDuplicateBlock(
31783178
// Conservative default.
31793179
bool InWorkList = true;
31803180
// Remove from the Chain and Chain Map
3181-
if (BlockToChain.count(RemBB)) {
3182-
BlockChain *Chain = BlockToChain[RemBB];
3181+
if (auto It = BlockToChain.find(RemBB); It != BlockToChain.end()) {
3182+
BlockChain *Chain = It->second;
31833183
InWorkList = Chain->UnscheduledPredecessors == 0;
31843184
Chain->remove(RemBB);
3185-
BlockToChain.erase(RemBB);
3185+
BlockToChain.erase(It);
31863186
}
31873187

31883188
// Handle the unplaced block iterator

0 commit comments

Comments
 (0)