[llvm] d7db094 - [AMDGPU] Avoid repeated hash lookups (NFC) (#109506)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 21 00:02:23 PDT 2024
Author: Kazu Hirata
Date: 2024-09-21T00:02:19-07:00
New Revision: d7db094340600828a0a62374627f324fb66af020
URL: https://github.com/llvm/llvm-project/commit/d7db094340600828a0a62374627f324fb66af020
DIFF: https://github.com/llvm/llvm-project/commit/d7db094340600828a0a62374627f324fb66af020.diff
LOG: [AMDGPU] Avoid repeated hash lookups (NFC) (#109506)
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp b/llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp
index 36dfebacaed686..3767a6b379f81c 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULateCodeGenPrepare.cpp
@@ -296,9 +296,8 @@ bool LiveRegOptimizer::optimizeLiveType(
// Collect all uses of PHINodes and any use the crosses BB boundaries.
if (UseInst->getParent() != II->getParent() || isa<PHINode>(II)) {
Uses.insert(UseInst);
- if (!Defs.count(II) && !isa<PHINode>(II)) {
+ if (!isa<PHINode>(II))
Defs.insert(II);
- }
}
}
}
More information about the llvm-commits
mailing list