Lines Matching refs:MBBI

42                          MachineBasicBlock::iterator &MBBI,  in emitSPUpdate()  argument
46 emitThumbRegPlusImmediate(MBB, MBBI, dl, ARM::SP, ARM::SP, NumBytes, TII, in emitSPUpdate()
87 MachineBasicBlock::iterator MBBI = MBB.begin(); in emitPrologue() local
121 emitSPUpdate(MBB, MBBI, TII, dl, *RegInfo, -ArgRegsSaveSize, in emitPrologue()
126 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
133 emitSPUpdate(MBB, MBBI, TII, dl, *RegInfo, -(NumBytes - ArgRegsSaveSize), in emitPrologue()
138 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
172 if (MBBI != MBB.end() && MBBI->getOpcode() == ARM::tPUSH) { in emitPrologue()
173 ++MBBI; in emitPrologue()
191 if (tryFoldSPUpdateIntoPushPop(STI, MF, &*std::prev(MBBI), NumBytes)) { in emitPrologue()
201 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
229 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
240 AddDefaultPred(BuildMI(MBB, MBBI, dl, TII.get(ARM::tADDrSPi), FramePtr) in emitPrologue()
247 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
254 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
266 emitSPUpdate(MBB, MBBI, TII, dl, *RegInfo, -NumBytes, in emitPrologue()
272 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
296 AddDefaultPred(BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVr), BasePtr) in emitPrologue()
323 MachineBasicBlock::iterator MBBI = MBB.getFirstTerminator(); in emitEpilogue() local
324 DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); in emitEpilogue()
341 emitSPUpdate(MBB, MBBI, TII, dl, *RegInfo, NumBytes - ArgRegsSaveSize); in emitEpilogue()
344 if (MBBI != MBB.begin()) { in emitEpilogue()
346 --MBBI; in emitEpilogue()
347 while (MBBI != MBB.begin() && isCSRestore(*MBBI, CSRegs)); in emitEpilogue()
348 if (!isCSRestore(*MBBI, CSRegs)) in emitEpilogue()
349 ++MBBI; in emitEpilogue()
366 emitThumbRegPlusImmediate(MBB, MBBI, dl, ARM::R4, FramePtr, -NumBytes, in emitEpilogue()
368 AddDefaultPred(BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVr), in emitEpilogue()
372 AddDefaultPred(BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVr), in emitEpilogue()
376 if (MBBI != MBB.end() && MBBI->getOpcode() == ARM::tBX_RET && in emitEpilogue()
377 &MBB.front() != &*MBBI && std::prev(MBBI)->getOpcode() == ARM::tPOP) { in emitEpilogue()
378 MachineBasicBlock::iterator PMBBI = std::prev(MBBI); in emitEpilogue()
381 } else if (!tryFoldSPUpdateIntoPushPop(STI, MF, &*MBBI, NumBytes)) in emitEpilogue()
382 emitSPUpdate(MBB, MBBI, TII, dl, *RegInfo, NumBytes); in emitEpilogue()
431 auto MBBI = MBB.getFirstTerminator(); in emitPopSpecialFixUp() local
434 if (MBBI != MBB.end() && MBBI->getOpcode() != ARM::tB) in emitPopSpecialFixUp()
435 CanRestoreDirectly = (MBBI->getOpcode() == ARM::tBX_RET || in emitPopSpecialFixUp()
436 MBBI->getOpcode() == ARM::tPOP_RET); in emitPopSpecialFixUp()
438 auto MBBI_prev = MBBI; in emitPopSpecialFixUp()
443 MBBI = MBBI_prev; // Replace the final tPOP with a tPOP_RET. in emitPopSpecialFixUp()
450 if (!DoIt || MBBI->getOpcode() == ARM::tPOP_RET) in emitPopSpecialFixUp()
454 BuildMI(MBB, MBBI, MBBI->getDebugLoc(), TII.get(ARM::tPOP_RET))); in emitPopSpecialFixUp()
456 for (auto MO: MBBI->operands()) in emitPopSpecialFixUp()
461 MBB.erase(MBBI); in emitPopSpecialFixUp()
479 if (MBBI != MBB.end()) { in emitPopSpecialFixUp()
480 dl = MBBI->getDebugLoc(); in emitPopSpecialFixUp()
482 while (InstUpToMBBI != MBBI) in emitPopSpecialFixUp()
526 AddDefaultPred(BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVr)) in emitPopSpecialFixUp()
531 if (MBBI != MBB.end() && MBBI->getOpcode() == ARM::tPOP_RET) { in emitPopSpecialFixUp()
536 BuildMI(MBB, MBBI, MBBI->getDebugLoc(), TII.get(ARM::tPOP))); in emitPopSpecialFixUp()
538 for (auto MO: MBBI->operands()) in emitPopSpecialFixUp()
549 MBB.erase(MBBI); in emitPopSpecialFixUp()
550 MBBI = AddDefaultPred(BuildMI(MBB, MBB.end(), dl, TII.get(ARM::tBX_RET))); in emitPopSpecialFixUp()
554 AddDefaultPred(BuildMI(MBB, MBBI, dl, TII.get(ARM::tPOP))) in emitPopSpecialFixUp()
557 emitSPUpdate(MBB, MBBI, TII, dl, *RegInfo, ArgRegsSaveSize); in emitPopSpecialFixUp()
559 AddDefaultPred(BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVr)) in emitPopSpecialFixUp()
564 AddDefaultPred(BuildMI(MBB, MBBI, dl, TII.get(ARM::tMOVr)) in emitPopSpecialFixUp()