Skip to content

Commit 72918fd

Browse files
[GlobalISel] Avoid repeated hash lookups (NFC) (#124393)
1 parent 0cc74a8 commit 72918fd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/CodeGen/GlobalISel/CSEInfo.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,7 @@ MachineInstr *GISelCSEInfo::getMachineInstrIfExists(FoldingSetNodeID &ID,
181181

182182
void GISelCSEInfo::countOpcodeHit(unsigned Opc) {
183183
#ifndef NDEBUG
184-
if (OpcodeHitTable.count(Opc))
185-
OpcodeHitTable[Opc] += 1;
186-
else
187-
OpcodeHitTable[Opc] = 1;
184+
++OpcodeHitTable[Opc];
188185
#endif
189186
// Else do nothing.
190187
}

0 commit comments

Comments
 (0)