[llvm] b4061a5 - [AMDGPU] Avoid repeated hash lookups (NFC) (#132583)

via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 22 23:13:28 PDT 2025


Author: Kazu Hirata
Date: 2025-03-22T23:13:24-07:00
New Revision: b4061a5a80a37ed5c500b2f0ef25e0328e5b60a8

URL: https://github.com/llvm/llvm-project/commit/b4061a5a80a37ed5c500b2f0ef25e0328e5b60a8
DIFF: https://github.com/llvm/llvm-project/commit/b4061a5a80a37ed5c500b2f0ef25e0328e5b60a8.diff

LOG: [AMDGPU] Avoid repeated hash lookups (NFC) (#132583)

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp b/llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp
index d760cd3115eaa..ec9922db9af12 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;
+      const 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