[llvm] be6a5dc - [Analysis] Avoid repeated hash lookups (NFC) (#110453)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 30 06:49:53 PDT 2024
Author: Kazu Hirata
Date: 2024-09-30T06:49:50-07:00
New Revision: be6a5dc9a5b9d2944caae8bd107061e15329c690
URL: https://github.com/llvm/llvm-project/commit/be6a5dc9a5b9d2944caae8bd107061e15329c690
DIFF: https://github.com/llvm/llvm-project/commit/be6a5dc9a5b9d2944caae8bd107061e15329c690.diff
LOG: [Analysis] Avoid repeated hash lookups (NFC) (#110453)
Added:
Modified:
llvm/lib/Analysis/ReplayInlineAdvisor.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/ReplayInlineAdvisor.cpp b/llvm/lib/Analysis/ReplayInlineAdvisor.cpp
index 2ca02eb1741712..6db5737ef4268b 100644
--- a/llvm/lib/Analysis/ReplayInlineAdvisor.cpp
+++ b/llvm/lib/Analysis/ReplayInlineAdvisor.cpp
@@ -114,7 +114,7 @@ std::unique_ptr<InlineAdvice> ReplayInlineAdvisor::getAdviceImpl(CallBase &CB) {
// Replay decision, if it has one
auto Iter = InlineSitesFromRemarks.find(Combined);
if (Iter != InlineSitesFromRemarks.end()) {
- if (InlineSitesFromRemarks[Combined]) {
+ if (Iter->second) {
LLVM_DEBUG(dbgs() << "Replay Inliner: Inlined " << Callee << " @ "
<< CallSiteLoc << "\n");
return std::make_unique<DefaultInlineAdvice>(
More information about the llvm-commits
mailing list