[llvm] c3e334f - [AMDGPU] Avoid repeated hash lookups (NFC) (#131958)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 19 07:13:24 PDT 2025
Author: Kazu Hirata
Date: 2025-03-19T07:13:21-07:00
New Revision: c3e334fc0d9dc12b25cde5839d993f70f56e5e76
URL: https://github.com/llvm/llvm-project/commit/c3e334fc0d9dc12b25cde5839d993f70f56e5e76
DIFF: https://github.com/llvm/llvm-project/commit/c3e334fc0d9dc12b25cde5839d993f70f56e5e76.diff
LOG: [AMDGPU] Avoid repeated hash lookups (NFC) (#131958)
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 c16d33f1453c0..d760cd3115eaa 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSetWavePriority.cpp
@@ -200,12 +200,12 @@ bool AMDGPUSetWavePriority::runOnMachineFunction(MachineFunction &MF) {
}
for (MachineBasicBlock *MBB : PriorityLoweringBlocks) {
- BuildSetprioMI(
- *MBB,
- MBBInfos[MBB].LastVMEMLoad
- ? std::next(MachineBasicBlock::iterator(MBBInfos[MBB].LastVMEMLoad))
- : MBB->begin(),
- LowPriority);
+ MachineInstr *LastVMEMLoad = MBBInfos[MBB].LastVMEMLoad;
+ BuildSetprioMI(*MBB,
+ LastVMEMLoad
+ ? std::next(MachineBasicBlock::iterator(LastVMEMLoad))
+ : MBB->begin(),
+ LowPriority);
}
return true;
More information about the llvm-commits
mailing list