[llvm] [AMDGPU] Avoid repeated hash lookups (NFC) (PR #132583)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 22 20:42:33 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/132583
None
>From acaf13e19b85b36b9b17fb16350a3101800dec7c Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sat, 22 Mar 2025 08:48:41 -0700
Subject: [PATCH] [AMDGPU] Avoid repeated hash lookups (NFC)
---
llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp b/llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp
index d760cd3115eaa..c6c8211618620 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp
@@ -146,9 +146,10 @@ bool AMDGPUSetWavePriority::runOnMachineFunction(MachineFunction &MF) {
bool SuccsMayReachVMEMLoad = false;
unsigned NumFollowingVALUInsts = 0;
for (const MachineBasicBlock *Succ : MBB->successors()) {
- SuccsMayReachVMEMLoad |= MBBInfos[Succ].MayReachVMEMLoad;
+ MBBInfo &SuccInfo = MBBInfos[Succ];
+ SuccsMayReachVMEMLoad |= SuccInfo.MayReachVMEMLoad;
NumFollowingVALUInsts =
- std::max(NumFollowingVALUInsts, MBBInfos[Succ].NumVALUInstsAtStart);
+ std::max(NumFollowingVALUInsts, SuccInfo.NumVALUInstsAtStart);
}
MBBInfo &Info = MBBInfos[MBB];
if (AtStart)
More information about the llvm-commits
mailing list