Skip to content

Commit e73d453

Browse files
[SPIRV] Avoid repeated hash lookups (NFC) (#109243)
1 parent 2d7d74d commit e73d453

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,7 @@ class SPIRVGlobalRegistry {
255255

256256
// Add a record about forward function call.
257257
void addForwardCall(const Function *F, MachineInstr *MI) {
258-
auto It = ForwardCalls.find(F);
259-
if (It == ForwardCalls.end())
260-
ForwardCalls[F] = {MI};
261-
else
262-
It->second.insert(MI);
258+
ForwardCalls[F].insert(MI);
263259
}
264260

265261
// Map a Function to the vector of machine instructions that represents

0 commit comments

Comments
 (0)