Skip to content

Commit d1af9ca

Browse files
[AsmPrinter] Avoid repeated map lookups (NFC) (#126431)
1 parent aa066e3 commit d1af9ca

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,10 @@ static void handleNewDebugValue(InlinedEntity Var, const MachineInstr &DV,
414414
dropRegDescribedVar(RegVars, I.first, Var);
415415

416416
// Drop all entries that have ended, and mark the new entry as live.
417+
auto &Entries = LiveEntries[Var];
417418
for (auto Index : IndicesToErase)
418-
LiveEntries[Var].erase(Index);
419-
LiveEntries[Var].insert(NewIndex);
419+
Entries.erase(Index);
420+
Entries.insert(NewIndex);
420421
}
421422
}
422423

0 commit comments

Comments
 (0)