[llvm] [Analysis] Avoid repeated hash lookups (NFC) (PR #110453)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 29 22:07:19 PDT 2024
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/110453
None
>From 730096211296dccc01caa9ae7f3052a0707e53d3 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sun, 29 Sep 2024 08:58:09 -0700
Subject: [PATCH] [Analysis] Avoid repeated hash lookups (NFC)
---
llvm/lib/Analysis/ReplayInlineAdvisor.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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