We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57a90ed commit 9710e84Copy full SHA for 9710e84
llvm/lib/CodeGen/StackMaps.cpp
@@ -521,11 +521,9 @@ void StackMaps::recordStackMapOpers(const MCSymbol &MILabel,
521
MFI.hasVarSizedObjects() || RegInfo->hasStackRealignment(*(AP.MF));
522
uint64_t FrameSize = HasDynamicFrameSize ? UINT64_MAX : MFI.getStackSize();
523
524
- auto CurrentIt = FnInfos.find(AP.CurrentFnSym);
525
- if (CurrentIt != FnInfos.end())
+ auto [CurrentIt, Inserted] = FnInfos.try_emplace(AP.CurrentFnSym, FrameSize);
+ if (!Inserted)
526
CurrentIt->second.RecordCount++;
527
- else
528
- FnInfos.insert(std::make_pair(AP.CurrentFnSym, FunctionInfo(FrameSize)));
529
}
530
531
void StackMaps::recordStackMap(const MCSymbol &L, const MachineInstr &MI) {
0 commit comments