[llvm] [X86] Avoid repeated hash lookups (NFC) (PR #131069)

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 12 20:56:47 PDT 2025


https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/131069

None

>From dcaf894ecdde68875fcf744c78d39b63c856827d Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Wed, 12 Mar 2025 09:10:18 -0700
Subject: [PATCH] [X86] Avoid repeated hash lookups (NFC)

---
 llvm/lib/Target/X86/X86PreTileConfig.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Target/X86/X86PreTileConfig.cpp b/llvm/lib/Target/X86/X86PreTileConfig.cpp
index d176778afef92..f3800d360fdd9 100644
--- a/llvm/lib/Target/X86/X86PreTileConfig.cpp
+++ b/llvm/lib/Target/X86/X86PreTileConfig.cpp
@@ -327,7 +327,7 @@ bool X86PreTileConfig::runOnMachineFunction(MachineFunction &MF) {
     MachineBasicBlock *MBB = CfgLiveInBBs.pop_back_val();
     for (auto *Pred : MBB->predecessors()) {
       auto &Info = BBVisitedInfo[Pred];
-      if (BBVisitedInfo[Pred].LastCall) {
+      if (Info.LastCall) {
         CfgNeedInsert.insert(Info.LastCall);
       } else if (!Info.NeedTileCfgLiveIn) {
         Info.NeedTileCfgLiveIn = true;



More information about the llvm-commits mailing list