[CodeGen] Avoid repeated hash lookups (NFC) (#140838)

This commit is contained in:
Kazu Hirata 2025-05-20 21:39:17 -07:00 committed by GitHub
parent adbe155eee
commit 51b288d9cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -521,11 +521,9 @@ void StackMaps::recordStackMapOpers(const MCSymbol &MILabel,
MFI.hasVarSizedObjects() || RegInfo->hasStackRealignment(*(AP.MF));
uint64_t FrameSize = HasDynamicFrameSize ? UINT64_MAX : MFI.getStackSize();
auto CurrentIt = FnInfos.find(AP.CurrentFnSym);
if (CurrentIt != FnInfos.end())
auto [CurrentIt, Inserted] = FnInfos.try_emplace(AP.CurrentFnSym, FrameSize);
if (!Inserted)
CurrentIt->second.RecordCount++;
else
FnInfos.insert(std::make_pair(AP.CurrentFnSym, FunctionInfo(FrameSize)));
}
void StackMaps::recordStackMap(const MCSymbol &L, const MachineInstr &MI) {