Skip to content

Commit d07dc5a

Browse files
[AMDGPU] Avoid repeated hash lookups (NFC) (#110788)
1 parent 91e3fb3 commit d07dc5a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Target/AMDGPU/AMDGPUIGroupLP.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2123,13 +2123,13 @@ bool MFMASmallGemmSingleWaveOpt::applyIGLPStrategy(
21232123
continue;
21242124
}
21252125

2126-
if (!VMEMLookup.contains(MI)) {
2126+
auto [It, Inserted] = VMEMLookup.try_emplace(MI, *I);
2127+
if (Inserted) {
21272128
MissedAny = true;
2128-
VMEMLookup[MI] = *I;
21292129
continue;
21302130
}
21312131

2132-
Cand = VMEMLookup[MI];
2132+
Cand = It->second;
21332133
if (llvm::is_contained(Counted, Cand)) {
21342134
MissedAny = true;
21352135
break;

0 commit comments

Comments
 (0)