[llvm] [AMDGPU] Avoid repeated hash lookups (NFC) (PR #128298)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 21 23:55:35 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-amdgpu
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/128298.diff
1 Files Affected:
- (modified) llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp (+4-3)
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp b/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
index 3293602db0901..fd20636a31ff5 100644
--- a/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
+++ b/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
@@ -1760,9 +1760,10 @@ bool SIWholeQuadMode::run(MachineFunction &MF) {
for (MachineInstr *MI : SetInactiveInstrs) {
if (LowerToCopyInstrs.contains(MI))
continue;
- if (Instructions[MI].MarkedStates & StateStrict) {
- Instructions[MI].Needs |= StateStrictWWM;
- Instructions[MI].Disabled &= ~StateStrictWWM;
+ auto &Info = Instructions[MI];
+ if (Info.MarkedStates & StateStrict) {
+ Info.Needs |= StateStrictWWM;
+ Info.Disabled &= ~StateStrictWWM;
Blocks[MI->getParent()].Needs |= StateStrictWWM;
} else {
LLVM_DEBUG(dbgs() << "Has no WWM marking: " << *MI);
``````````
</details>
https://github.com/llvm/llvm-project/pull/128298
More information about the llvm-commits
mailing list