We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ad4f1a commit 19a7fe0Copy full SHA for 19a7fe0
llvm/lib/CodeGen/MachineBlockPlacement.cpp
@@ -3178,11 +3178,11 @@ bool MachineBlockPlacement::maybeTailDuplicateBlock(
3178
// Conservative default.
3179
bool InWorkList = true;
3180
// Remove from the Chain and Chain Map
3181
- if (BlockToChain.count(RemBB)) {
3182
- BlockChain *Chain = BlockToChain[RemBB];
+ if (auto It = BlockToChain.find(RemBB); It != BlockToChain.end()) {
+ BlockChain *Chain = It->second;
3183
InWorkList = Chain->UnscheduledPredecessors == 0;
3184
Chain->remove(RemBB);
3185
- BlockToChain.erase(RemBB);
+ BlockToChain.erase(It);
3186
}
3187
3188
// Handle the unplaced block iterator
0 commit comments