Lines Matching refs:MF

33   bool runOnMachineFunction(MachineFunction &MF) override;
34 bool addCatches(MachineFunction &MF);
35 bool replaceFuncletReturns(MachineFunction &MF);
36 bool removeUnnecessaryUnreachables(MachineFunction &MF);
37 bool addExceptionExtraction(MachineFunction &MF);
38 bool restoreStackPointer(MachineFunction &MF);
61 MachineFunction *MF = MI->getParent()->getParent();
77 if (MBB == &MF->front())
102 bool WebAssemblyLateEHPrepare::runOnMachineFunction(MachineFunction &MF) {
105 << MF.getName() << '\n');
107 if (MF.getTarget().getMCAsmInfo()->getExceptionHandlingType() !=
112 if (MF.getFunction().hasPersonalityFn()) {
113 Changed |= addCatches(MF);
114 Changed |= replaceFuncletReturns(MF);
116 Changed |= removeUnnecessaryUnreachables(MF);
117 if (MF.getFunction().hasPersonalityFn()) {
118 Changed |= addExceptionExtraction(MF);
119 Changed |= restoreStackPointer(MF);
125 bool WebAssemblyLateEHPrepare::addCatches(MachineFunction &MF) {
127 const auto &TII = *MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo();
128 MachineRegisterInfo &MRI = MF.getRegInfo();
129 for (auto &MBB : MF) {
143 bool WebAssemblyLateEHPrepare::replaceFuncletReturns(MachineFunction &MF) {
145 const auto &TII = *MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo();
147 for (auto &MBB : MF) {
185 MachineFunction &MF) {
187 for (auto &MBB : MF) {
235 bool WebAssemblyLateEHPrepare::addExceptionExtraction(MachineFunction &MF) {
236 const auto &TII = *MF.getSubtarget<WebAssemblySubtarget>().getInstrInfo();
237 MachineRegisterInfo &MRI = MF.getRegInfo();
238 auto *EHInfo = MF.getWasmEHFuncInfo();
241 for (auto &MBB : MF) {
259 for (auto &MBB : MF) {
298 auto *ThenMBB = MF.CreateMachineBasicBlock();
299 auto *ElseMBB = MF.CreateMachineBasicBlock();
300 MF.insert(std::next(MachineFunction::iterator(EHPad)), ElseMBB);
301 MF.insert(std::next(MachineFunction::iterator(ElseMBB)), ThenMBB);
308 const char *CPPExnSymbol = MF.createExternalSymbolName("__cpp_exception");
340 MF.getFunction().getParent()->getFunction(
364 bool WebAssemblyLateEHPrepare::restoreStackPointer(MachineFunction &MF) {
366 MF.getSubtarget().getFrameLowering());
367 if (!FrameLowering->needsPrologForEH(MF))
371 for (auto &MBB : MF) {
387 FrameLowering->writeSPToGlobal(WebAssembly::SP32, MF, MBB, InsertPos,