aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/PrologEpilogInserter.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-01-27 10:35:52 -0800
committerGitHub <noreply@github.com>2025-01-27 10:35:52 -0800
commit817e777296a508356f55d5e1a06cba714c0fe13b (patch)
tree63b524396e68d93685ac5cbe43bab6791686bf5d /llvm/lib/CodeGen/PrologEpilogInserter.cpp
parente0c5a8553d62124c983e3d8bdc3ea31ed1ea0b96 (diff)
downloadllvm-817e777296a508356f55d5e1a06cba714c0fe13b.zip
llvm-817e777296a508356f55d5e1a06cba714c0fe13b.tar.gz
llvm-817e777296a508356f55d5e1a06cba714c0fe13b.tar.bz2
[CodeGen] Avoid repeated hash lookups (NFC) (#124506)
Diffstat (limited to 'llvm/lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r--llvm/lib/CodeGen/PrologEpilogInserter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/PrologEpilogInserter.cpp b/llvm/lib/CodeGen/PrologEpilogInserter.cpp
index 51e9a06..eb8929c 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();
}