assert(classifyEHPersonality(Fn->getPersonalityFn()) ==
EHPersonality::MSVC_CXX);
unsigned FrameReg;
- int FI = MMI.getWinEHFuncInfo(Fn).EHRegNodeFrameIndex;
+ int FI = MF.getWinEHFuncInfo()->EHRegNodeFrameIndex;
int64_t EHRegOffset = getFrameIndexReference(MF, FI, FrameReg);
// ESP is the first field, so no extra displacement is needed.
addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(X86::MOV32mr)), FrameReg,
// and the GC can recover it.
unsigned PSPSlotOffset = getPSPSlotOffsetFromSP(MF);
auto PSPInfo = MachinePointerInfo::getFixedStack(
- MF, MF.getMMI().getWinEHFuncInfo(Fn).PSPSymFrameIdx);
+ MF, MF.getWinEHFuncInfo()->PSPSymFrameIdx);
addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64mr)), StackPtr, false,
PSPSlotOffset)
.addReg(StackPtr)
// frame with only a single offset reported for the entire method.
unsigned
X86FrameLowering::getPSPSlotOffsetFromSP(const MachineFunction &MF) const {
- MachineModuleInfo &MMI = MF.getMMI();
- WinEHFuncInfo &Info = MMI.getWinEHFuncInfo(MF.getFunction());
+ const WinEHFuncInfo &Info = *MF.getWinEHFuncInfo();
// getFrameIndexReferenceFromSP has an out ref parameter for the stack
// pointer register; pass a dummy that we ignore
unsigned SPReg;
MachineFunction &MF = *MBB.getParent();
unsigned FramePtr = TRI->getFrameRegister(MF);
unsigned BasePtr = TRI->getBaseRegister();
- MachineModuleInfo &MMI = MF.getMMI();
- const Function *Fn = MF.getFunction();
- WinEHFuncInfo &FuncInfo = MMI.getWinEHFuncInfo(Fn);
+ WinEHFuncInfo &FuncInfo = *MF.getWinEHFuncInfo();
X86MachineFunctionInfo *X86FI = MF.getInfo<X86MachineFunctionInfo>();
MachineFrameInfo *MFI = MF.getFrameInfo();
int64_t UnwindHelpOffset = MinFixedObjOffset - SlotSize;
int UnwindHelpFI =
MFI->CreateFixedObject(SlotSize, UnwindHelpOffset, /*Immutable=*/false);
- MF.getMMI().getWinEHFuncInfo(Fn).UnwindHelpFrameIdx = UnwindHelpFI;
+ MF.getWinEHFuncInfo()->UnwindHelpFrameIdx = UnwindHelpFI;
// Store -2 into UnwindHelp on function entry. We have to scan forwards past
// other frame setup instructions.