Skip to content

Commit 7e7a362

Browse files
[Hexagon] Avoid repeated map lookups (NFC) (llvm#127304)
1 parent 05209f1 commit 7e7a362

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)