[llvm] 4405451 - [AsmPrinter] Avoid repeated map lookups (NFC) (#127576)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 18 08:39:18 PST 2025
Author: Kazu Hirata
Date: 2025-02-18T08:39:14-08:00
New Revision: 4405451a22b98fe10a0d7d844dc8223bae468470
URL: https://github.com/llvm/llvm-project/commit/4405451a22b98fe10a0d7d844dc8223bae468470
DIFF: https://github.com/llvm/llvm-project/commit/4405451a22b98fe10a0d7d844dc8223bae468470.diff
LOG: [AsmPrinter] Avoid repeated map lookups (NFC) (#127576)
Added:
Modified:
llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp b/llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
index c9efec37b0bc6..d87649c4e6567 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DbgEntityHistoryCalculator.cpp
@@ -362,8 +362,9 @@ static void clobberRegEntries(InlinedEntity Var, unsigned RegNo,
FellowRegisters.push_back(Reg);
// Drop all entries that have ended.
+ auto &Entries = LiveEntries[Var];
for (auto Index : IndicesToErase)
- LiveEntries[Var].erase(Index);
+ Entries.erase(Index);
}
/// Add a new debug value for \p Var. Closes all overlapping debug values.
More information about the llvm-commits
mailing list