Lines Matching refs:MBBI
149 MachineBasicBlock::iterator &MBBI, in findDeadCallerSavedReg() argument
159 unsigned Opc = MBBI->getOpcode(); in findDeadCallerSavedReg()
177 for (unsigned i = 0, e = MBBI->getNumOperands(); i != e; ++i) { in findDeadCallerSavedReg()
178 MachineOperand &MO = MBBI->getOperand(i); in findDeadCallerSavedReg()
251 MachineBasicBlock::iterator &MBBI, in emitSPUpdate() argument
257 DebugLoc DL = MBB.findDebugLoc(MBBI); in emitSPUpdate()
268 Reg = findDeadCallerSavedReg(MBB, MBBI, TRI, Is64Bit); in emitSPUpdate()
272 BuildMI(MBB, MBBI, DL, TII.get(Opc), Reg) in emitSPUpdate()
277 MachineInstr *MI = BuildMI(MBB, MBBI, DL, TII.get(Opc), StackPtr) in emitSPUpdate()
291 : findDeadCallerSavedReg(MBB, MBBI, TRI, Is64Bit); in emitSPUpdate()
296 MachineInstr *MI = BuildMI(MBB, MBBI, DL, TII.get(Opc)) in emitSPUpdate()
308 MBB, MBBI, DL, isSub ? -ThisVal : ThisVal, InEpilogue); in emitSPUpdate()
319 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in BuildStackAdjustment() argument
349 MI = addRegOffset(BuildMI(MBB, MBBI, DL, in BuildStackAdjustment()
358 MI = BuildMI(MBB, MBBI, DL, TII.get(Opc), StackPtr) in BuildStackAdjustment()
367 MachineBasicBlock::iterator &MBBI, in mergeSPUpdates() argument
369 if ((doMergeWithPrevious && MBBI == MBB.begin()) || in mergeSPUpdates()
370 (!doMergeWithPrevious && MBBI == MBB.end())) in mergeSPUpdates()
373 MachineBasicBlock::iterator PI = doMergeWithPrevious ? std::prev(MBBI) : MBBI; in mergeSPUpdates()
375 : std::next(MBBI); in mergeSPUpdates()
391 if (!doMergeWithPrevious) MBBI = NI; in mergeSPUpdates()
401 if (!doMergeWithPrevious) MBBI = NI; in mergeSPUpdates()
408 if (!doMergeWithPrevious) MBBI = NI; in mergeSPUpdates()
415 MachineBasicBlock::iterator MBBI, in BuildCFI() argument
420 BuildMI(MBB, MBBI, DL, TII.get(TargetOpcode::CFI_INSTRUCTION)) in BuildCFI()
425 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in emitCalleeSavedFrameMoves() argument
443 BuildCFI(MBB, MBBI, DL, in emitCalleeSavedFrameMoves()
450 MachineBasicBlock::iterator MBBI, in emitStackProbe() argument
456 return emitStackProbeInlineStub(MF, MBB, MBBI, DL, true); in emitStackProbe()
458 return emitStackProbeInline(MF, MBB, MBBI, DL, false); in emitStackProbe()
461 return emitStackProbeCall(MF, MBB, MBBI, DL, InProlog); in emitStackProbe()
481 MachineBasicBlock::iterator MBBI = std::next(ChkStkStub->getIterator()); in inlineStackProbe() local
482 assert(std::prev(MBBI).operator==(ChkStkStub) && in inlineStackProbe()
484 DebugLoc DL = PrologMBB.findDebugLoc(MBBI); in inlineStackProbe()
485 emitStackProbeInline(MF, PrologMBB, MBBI, DL, true); in inlineStackProbe()
492 MachineBasicBlock::iterator MBBI, const DebugLoc &DL, bool InProlog) const { in emitStackProbeInline() argument
537 MachineBasicBlock::iterator BeforeMBBI = std::prev(MBBI); in emitStackProbeInline()
538 ContinueMBB->splice(ContinueMBB->begin(), &MBB, MBBI, MBB.end()); in emitStackProbeInline()
708 MachineBasicBlock::iterator MBBI, const DebugLoc &DL, bool InProlog) const { in emitStackProbeCall() argument
730 MachineBasicBlock::iterator ExpansionMBBI = std::prev(MBBI); in emitStackProbeCall()
737 BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64ri), X86::R11) in emitStackProbeCall()
739 CI = BuildMI(MBB, MBBI, DL, TII.get(CallOp)).addReg(X86::R11); in emitStackProbeCall()
741 CI = BuildMI(MBB, MBBI, DL, TII.get(CallOp)).addExternalSymbol(Symbol); in emitStackProbeCall()
756 BuildMI(MBB, MBBI, DL, TII.get(X86::SUB64rr), X86::RSP) in emitStackProbeCall()
763 for (++ExpansionMBBI; ExpansionMBBI != MBBI; ++ExpansionMBBI) in emitStackProbeCall()
767 return &*MBBI; in emitStackProbeCall()
772 MachineBasicBlock::iterator MBBI, const DebugLoc &DL, bool InProlog) const { in emitStackProbeInlineStub() argument
776 BuildMI(MBB, MBBI, DL, TII.get(X86::CALLpcrel32)) in emitStackProbeInlineStub()
779 return &*MBBI; in emitStackProbeInlineStub()
809 MachineBasicBlock::iterator MBBI, in BuildStackAlignAND() argument
814 MachineInstr *MI = BuildMI(MBB, MBBI, DL, TII.get(AndOp), Reg) in BuildStackAlignAND()
911 MachineBasicBlock::iterator MBBI = MBB.begin(); in emitPrologue() local
983 BuildStackAdjustment(MBB, MBBI, DL, TailCallReturnAddrDelta, in emitPrologue()
1017 addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(MOVmr)), StackPtr, true, 16) in emitPrologue()
1046 BuildMI(MBB, MBBI, DL, TII.get(Is64Bit ? X86::PUSH64r : X86::PUSH32r)) in emitPrologue()
1054 BuildCFI(MBB, MBBI, DL, in emitPrologue()
1059 BuildCFI(MBB, MBBI, DL, MCCFIInstruction::createOffset( in emitPrologue()
1064 BuildMI(MBB, MBBI, DL, TII.get(X86::SEH_PushReg)) in emitPrologue()
1071 BuildMI(MBB, MBBI, DL, in emitPrologue()
1081 BuildCFI(MBB, MBBI, DL, MCCFIInstruction::createDefCfaRegister( in emitPrologue()
1107 while (MBBI != MBB.end() && in emitPrologue()
1108 MBBI->getFlag(MachineInstr::FrameSetup) && in emitPrologue()
1109 (MBBI->getOpcode() == X86::PUSH32r || in emitPrologue()
1110 MBBI->getOpcode() == X86::PUSH64r)) { in emitPrologue()
1112 unsigned Reg = MBBI->getOperand(0).getReg(); in emitPrologue()
1113 ++MBBI; in emitPrologue()
1119 BuildCFI(MBB, MBBI, DL, in emitPrologue()
1125 BuildMI(MBB, MBBI, DL, TII.get(X86::SEH_PushReg)).addImm(Reg).setMIFlag( in emitPrologue()
1135 BuildStackAlignAND(MBB, MBBI, DL, StackPtr, MaxAlign); in emitPrologue()
1141 NumBytes -= mergeSPUpdates(MBB, MBBI, true); in emitPrologue()
1166 BuildMI(MBB, MBBI, DL, TII.get(X86::PUSH32r)) in emitPrologue()
1175 BuildMI(MBB, MBBI, DL, TII.get(X86::MOV32ri), X86::EAX) in emitPrologue()
1179 BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64ri32), X86::RAX) in emitPrologue()
1183 BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64ri), X86::RAX) in emitPrologue()
1190 BuildMI(MBB, MBBI, DL, TII.get(X86::MOV32ri), X86::EAX) in emitPrologue()
1196 emitStackProbe(MF, MBB, MBBI, DL, true); in emitPrologue()
1204 MBB.insert(MBBI, MI); in emitPrologue()
1207 emitSPUpdate(MBB, MBBI, -(int64_t)NumBytes, /*InEpilogue=*/false); in emitPrologue()
1211 BuildMI(MBB, MBBI, DL, TII.get(X86::SEH_StackAlloc)) in emitPrologue()
1226 addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64rm), Establisher), in emitPrologue()
1233 addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64mr)), StackPtr, in emitPrologue()
1252 addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(X86::LEA64r), FramePtr), in emitPrologue()
1255 BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64rr), FramePtr) in emitPrologue()
1260 BuildMI(MBB, MBBI, DL, TII.get(X86::SEH_SetFrame)) in emitPrologue()
1269 MBBI = restoreWin32EHStackPointers(MBB, MBBI, DL); in emitPrologue()
1278 addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(X86::MOV32mr)), FrameReg, in emitPrologue()
1284 while (MBBI != MBB.end() && MBBI->getFlag(MachineInstr::FrameSetup)) { in emitPrologue()
1285 const MachineInstr &FrameInstr = *MBBI; in emitPrologue()
1286 ++MBBI; in emitPrologue()
1296 BuildMI(MBB, MBBI, DL, TII.get(X86::SEH_SaveXMM)) in emitPrologue()
1306 BuildMI(MBB, MBBI, DL, TII.get(X86::SEH_EndPrologue)) in emitPrologue()
1316 addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64mr)), StackPtr, false, in emitPrologue()
1329 BuildStackAlignAND(MBB, MBBI, DL, SPOrEstablisher, MaxAlign); in emitPrologue()
1343 BuildMI(MBB, MBBI, DL, TII.get(Opc), BasePtr) in emitPrologue()
1350 addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(Opm)), in emitPrologue()
1366 addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(Opm)), UsedReg, true, Offset) in emitPrologue()
1377 BuildCFI(MBB, MBBI, DL, MCCFIInstruction::createDefCfaOffset( in emitPrologue()
1383 emitCalleeSavedFrameMoves(MBB, MBBI, DL); in emitPrologue()
1395 BuildMI(MBB, MBBI, DL, TII.get(X86::CLD)) in emitPrologue()
1482 MachineBasicBlock::iterator MBBI = MBB.getFirstTerminator(); in emitEpilogue() local
1483 unsigned RetOpcode = MBBI->getOpcode(); in emitEpilogue()
1485 if (MBBI != MBB.end()) in emitEpilogue()
1486 DL = MBBI->getDebugLoc(); in emitEpilogue()
1496 bool IsFunclet = isFuncletReturnInstr(*MBBI); in emitEpilogue()
1505 if (MBBI->getOpcode() == X86::CATCHRET) { in emitEpilogue()
1513 TargetMBB = MBBI->getOperand(0).getMBB(); in emitEpilogue()
1516 BuildMI(MBB, MBBI, DL, TII.get(Is64Bit ? X86::POP64r : X86::POP32r), in emitEpilogue()
1519 } else if (MBBI->getOpcode() == X86::CLEANUPRET) { in emitEpilogue()
1522 BuildMI(MBB, MBBI, DL, TII.get(Is64Bit ? X86::POP64r : X86::POP32r), in emitEpilogue()
1536 BuildMI(MBB, MBBI, DL, in emitEpilogue()
1545 while (MBBI != MBB.begin()) { in emitEpilogue()
1546 MachineBasicBlock::iterator PI = std::prev(MBBI); in emitEpilogue()
1554 --MBBI; in emitEpilogue()
1556 MachineBasicBlock::iterator FirstCSPop = MBBI; in emitEpilogue()
1579 if (MBBI != MBB.end()) in emitEpilogue()
1580 DL = MBBI->getDebugLoc(); in emitEpilogue()
1585 NumBytes += mergeSPUpdates(MBB, MBBI, true); in emitEpilogue()
1594 MBBI = FirstCSPop; in emitEpilogue()
1608 addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(Opc), StackPtr), in emitEpilogue()
1610 --MBBI; in emitEpilogue()
1613 BuildMI(MBB, MBBI, DL, TII.get(Opc), StackPtr) in emitEpilogue()
1615 --MBBI; in emitEpilogue()
1619 emitSPUpdate(MBB, MBBI, NumBytes, /*InEpilogue=*/true); in emitEpilogue()
1620 --MBBI; in emitEpilogue()
1630 BuildMI(MBB, MBBI, DL, TII.get(X86::SEH_Epilogue)); in emitEpilogue()
1637 MBBI = MBB.getFirstTerminator(); in emitEpilogue()
1640 Offset += mergeSPUpdates(MBB, MBBI, true); in emitEpilogue()
1641 emitSPUpdate(MBB, MBBI, Offset, /*InEpilogue=*/true); in emitEpilogue()
2497 MachineBasicBlock::iterator MBBI, in adjustStackWithPops() argument
2514 if (MBBI == MBB.begin()) in adjustStackWithPops()
2516 MachineBasicBlock::iterator Prev = std::prev(MBBI); in adjustStackWithPops()
2561 BuildMI(MBB, MBBI, DL, in adjustStackWithPops()
2719 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in restoreWin32EHStackPointers() argument
2740 addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(X86::MOV32rm), X86::ESP), in restoreWin32EHStackPointers()
2753 BuildMI(MBB, MBBI, DL, TII.get(ADDri), FramePtr) in restoreWin32EHStackPointers()
2763 addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(X86::LEA32r), BasePtr), in restoreWin32EHStackPointers()
2771 addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(X86::MOV32rm), FramePtr), in restoreWin32EHStackPointers()
2777 return MBBI; in restoreWin32EHStackPointers()
2979 auto MBBI = MBB.begin(); in processFunctionBeforeFrameFinalized() local
2980 while (MBBI != MBB.end() && MBBI->getFlag(MachineInstr::FrameSetup)) in processFunctionBeforeFrameFinalized()
2981 ++MBBI; in processFunctionBeforeFrameFinalized()
2983 DebugLoc DL = MBB.findDebugLoc(MBBI); in processFunctionBeforeFrameFinalized()
2984 addFrameReference(BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64mi32)), in processFunctionBeforeFrameFinalized()