[llvm] 817e777 - [CodeGen] Avoid repeated hash lookups (NFC) (#124506)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 27 10:35:55 PST 2025
Author: Kazu Hirata
Date: 2025-01-27T10:35:52-08:00
New Revision: 817e777296a508356f55d5e1a06cba714c0fe13b
URL: https://github.com/llvm/llvm-project/commit/817e777296a508356f55d5e1a06cba714c0fe13b
DIFF: https://github.com/llvm/llvm-project/commit/817e777296a508356f55d5e1a06cba714c0fe13b.diff
LOG: [CodeGen] Avoid repeated hash lookups (NFC) (#124506)
Added:
Modified:
llvm/lib/CodeGen/PrologEpilogInserter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
index 51e9a067707e28..eb8929cae069e6 100644
--- a/llvm/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
@@ -208,8 +208,8 @@ static void stashEntryDbgValues(MachineBasicBlock &MBB,
}
// Remove stashed debug values from the block.
- if (EntryDbgValues.count(&MBB))
- for (auto *MI : EntryDbgValues[&MBB])
+ if (auto It = EntryDbgValues.find(&MBB); It != EntryDbgValues.end())
+ for (auto *MI : It->second)
MI->removeFromParent();
}
More information about the llvm-commits
mailing list