Skip to content

Commit 709f77d

Browse files
kazutakahiratagithub-actions[bot]
authored andcommitted
Automerge: [Hexagon] Avoid repeated map lookups (NFC) (#127304)
2 parents 1fd746c + 7e7a362 commit 709f77d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Target/Hexagon/RDFCopy.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ bool CopyPropagation::run() {
133133
for (NodeId I : Copies) {
134134
dbgs() << "Instr: " << *DFG.addr<StmtNode*>(I).Addr->getCode();
135135
dbgs() << " eq: {";
136-
if (CopyMap.count(I)) {
137-
for (auto J : CopyMap.at(I))
136+
if (auto It = CopyMap.find(I); It != CopyMap.end()) {
137+
for (auto J : It->second)
138138
dbgs() << ' ' << Print<RegisterRef>(J.first, DFG) << '='
139139
<< Print<RegisterRef>(J.second, DFG);
140140
}

0 commit comments

Comments
 (0)