Lines Matching refs:MBBI
90 MachineBasicBlock::iterator &MBBI,
107 unsigned Opc = MBBI->getOpcode();
121 for (unsigned i = 0, e = MBBI->getNumOperands(); i != e; ++i) {
122 MachineOperand &MO = MBBI->getOperand(i);
146 void emitSPUpdate(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI,
161 DebugLoc DL = MBB.findDebugLoc(MBBI);
169 : findDeadCallerSavedReg(MBB, MBBI, TRI, Is64Bit);
174 MachineInstr *MI = BuildMI(MBB, MBBI, DL, TII.get(Opc))
186 MI = addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(Opc), StackPtr),
189 MI = BuildMI(MBB, MBBI, DL, TII.get(Opc), StackPtr)
204 void mergeSPUpdatesUp(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI,
206 if (MBBI == MBB.begin()) return;
208 MachineBasicBlock::iterator PI = prior(MBBI);
229 MachineBasicBlock::iterator &MBBI,
234 if (MBBI == MBB.end()) return;
236 MachineBasicBlock::iterator NI = llvm::next(MBBI);
246 MBBI = NI;
253 MBBI = NI;
262 MachineBasicBlock::iterator &MBBI,
265 if ((doMergeWithPrevious && MBBI == MBB.begin()) ||
266 (!doMergeWithPrevious && MBBI == MBB.end()))
269 MachineBasicBlock::iterator PI = doMergeWithPrevious ? prior(MBBI) : MBBI;
270 MachineBasicBlock::iterator NI = doMergeWithPrevious ? 0 : llvm::next(MBBI);
280 if (!doMergeWithPrevious) MBBI = NI;
286 if (!doMergeWithPrevious) MBBI = NI;
514 MBBI = MBB.begin(), MBBE = MBB.end(); MBBI != MBBE; ++MBBI) {
515 MachineInstr &MI = *MBBI;
647 MachineBasicBlock::iterator MBBI = MBB.begin();
711 BuildMI(MBB, MBBI, DL,
755 BuildMI(MBB, MBBI, DL, TII.get(Is64Bit ? X86::PUSH64r : X86::PUSH32r))
762 BuildMI(MBB, MBBI, DL, TII.get(X86::PROLOG_LABEL))
777 BuildMI(MBB, MBBI, DL,
785 BuildMI(MBB, MBBI, DL, TII.get(X86::PROLOG_LABEL))
806 while (MBBI != MBB.end() &&
807 (MBBI->getOpcode() == X86::PUSH32r ||
808 MBBI->getOpcode() == X86::PUSH64r)) {
810 MBBI->setFlag(MachineInstr::FrameSetup);
811 ++MBBI;
816 BuildMI(MBB, MBBI, DL, TII.get(X86::PROLOG_LABEL)).addSym(Label);
837 BuildMI(MBB, MBBI, DL,
850 NumBytes -= mergeSPUpdates(MBB, MBBI, StackPtr, true);
854 mergeSPUpdatesDown(MBB, MBBI, StackPtr, &NumBytes);
891 BuildMI(MBB, MBBI, DL, TII.get(X86::PUSH32r))
899 BuildMI(MBB, MBBI, DL, TII.get(X86::MOV64ri), X86::RAX)
905 BuildMI(MBB, MBBI, DL, TII.get(X86::MOV32ri), X86::EAX)
910 BuildMI(MBB, MBBI, DL,
920 BuildMI(MBB, MBBI, DL, TII.get(X86::SUB64rr), StackPtr)
932 MBB.insert(MBBI, MI);
935 emitSPUpdate(MBB, MBBI, StackPtr, -(int64_t)NumBytes, Is64Bit, IsLP64,
945 BuildMI(MBB, MBBI, DL, TII.get(Opc), BasePtr)
953 BuildMI(MBB, MBBI, DL, TII.get(X86::PROLOG_LABEL))
980 MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr();
981 assert(MBBI != MBB.end() && "Returning block has no instructions");
982 unsigned RetOpcode = MBBI->getOpcode();
983 DebugLoc DL = MBBI->getDebugLoc();
1038 BuildMI(MBB, MBBI, DL,
1045 while (MBBI != MBB.begin()) {
1046 MachineBasicBlock::iterator PI = prior(MBBI);
1053 --MBBI;
1055 MachineBasicBlock::iterator FirstCSPop = MBBI;
1057 DL = MBBI->getDebugLoc();
1062 mergeSPUpdatesUp(MBB, MBBI, StackPtr, &NumBytes);
1069 MBBI = FirstCSPop;
1072 addRegOffset(BuildMI(MBB, MBBI, DL, TII.get(Opc), StackPtr),
1076 BuildMI(MBB, MBBI, DL, TII.get(Opc), StackPtr)
1081 emitSPUpdate(MBB, MBBI, StackPtr, NumBytes, Is64Bit, IsLP64, UseLEA,
1087 MBBI = MBB.getLastNonDebugInstr();
1088 MachineOperand &DestAddr = MBBI->getOperand(0);
1090 BuildMI(MBB, MBBI, DL,
1099 MBBI = MBB.getLastNonDebugInstr();
1100 MachineOperand &JumpTarget = MBBI->getOperand(0);
1101 MachineOperand &StackAdjust = MBBI->getOperand(isMem ? 5 : 1);
1116 Offset += mergeSPUpdates(MBB, MBBI, StackPtr, true);
1117 emitSPUpdate(MBB, MBBI, StackPtr, Offset, Is64Bit, IsLP64,
1124 BuildMI(MBB, MBBI, DL, TII.get((RetOpcode == X86::TCRETURNdi)
1136 BuildMI(MBB, MBBI, DL, TII.get((RetOpcode == X86::TCRETURNmi)
1139 MIB.addOperand(MBBI->getOperand(i));
1141 BuildMI(MBB, MBBI, DL, TII.get(X86::TAILJMPr64)).
1144 BuildMI(MBB, MBBI, DL, TII.get(X86::TAILJMPr)).
1148 MachineInstr *NewMI = prior(MBBI);
1149 NewMI->copyImplicitOps(MF, MBBI);
1152 MBB.erase(MBBI);
1157 MBBI = MBB.getLastNonDebugInstr();
1160 delta += mergeSPUpdates(MBB, MBBI, StackPtr, true);
1161 emitSPUpdate(MBB, MBBI, StackPtr, delta, Is64Bit, IsLP64, UseLEA, TII,
1641 for (MachineFunction::iterator MBBI = MF.begin(), MBBE = MF.end();
1642 MBBI != MBBE; ++MBBI)
1643 for (MachineBasicBlock::iterator MI = MBBI->begin(), ME = MBBI->end();