Lines Matching refs:MBB

76   bool expandInstr(MachineBasicBlock &MBB, Iter I);
77 void expandLoadCCond(MachineBasicBlock &MBB, Iter I);
78 void expandStoreCCond(MachineBasicBlock &MBB, Iter I);
79 void expandLoadACC(MachineBasicBlock &MBB, Iter I, unsigned RegSize);
80 void expandStoreACC(MachineBasicBlock &MBB, Iter I, unsigned MFHiOpc,
82 bool expandCopy(MachineBasicBlock &MBB, Iter I);
83 bool expandCopyACC(MachineBasicBlock &MBB, Iter I, unsigned MFHiOpc,
85 bool expandBuildPairF64(MachineBasicBlock &MBB,
87 bool expandExtractElementF64(MachineBasicBlock &MBB,
108 for (auto &MBB : MF) { in expand() local
109 for (Iter I = MBB.begin(), End = MBB.end(); I != End;) in expand()
110 Expanded |= expandInstr(MBB, I++); in expand()
116 bool ExpandPseudo::expandInstr(MachineBasicBlock &MBB, Iter I) { in expandInstr() argument
119 expandLoadCCond(MBB, I); in expandInstr()
122 expandStoreCCond(MBB, I); in expandInstr()
126 expandLoadACC(MBB, I, 4); in expandInstr()
129 expandLoadACC(MBB, I, 8); in expandInstr()
132 expandStoreACC(MBB, I, Mips::PseudoMFHI, Mips::PseudoMFLO, 4); in expandInstr()
135 expandStoreACC(MBB, I, Mips::MFHI_DSP, Mips::MFLO_DSP, 4); in expandInstr()
138 expandStoreACC(MBB, I, Mips::PseudoMFHI64, Mips::PseudoMFLO64, 8); in expandInstr()
141 if (expandBuildPairF64(MBB, I, false)) in expandInstr()
142 MBB.erase(I); in expandInstr()
145 if (expandBuildPairF64(MBB, I, true)) in expandInstr()
146 MBB.erase(I); in expandInstr()
149 if (expandExtractElementF64(MBB, I, false)) in expandInstr()
150 MBB.erase(I); in expandInstr()
153 if (expandExtractElementF64(MBB, I, true)) in expandInstr()
154 MBB.erase(I); in expandInstr()
157 if (!expandCopy(MBB, I)) in expandInstr()
164 MBB.erase(I); in expandInstr()
168 void ExpandPseudo::expandLoadCCond(MachineBasicBlock &MBB, Iter I) { in expandLoadCCond() argument
178 TII.loadRegFromStack(MBB, I, VR, FI, RC, &RegInfo, 0); in expandLoadCCond()
179 BuildMI(MBB, I, I->getDebugLoc(), TII.get(TargetOpcode::COPY), Dst) in expandLoadCCond()
183 void ExpandPseudo::expandStoreCCond(MachineBasicBlock &MBB, Iter I) { in expandStoreCCond() argument
193 BuildMI(MBB, I, I->getDebugLoc(), TII.get(TargetOpcode::COPY), VR) in expandStoreCCond()
195 TII.storeRegToStack(MBB, I, VR, true, FI, RC, &RegInfo, 0); in expandStoreCCond()
198 void ExpandPseudo::expandLoadACC(MachineBasicBlock &MBB, Iter I, in expandLoadACC() argument
216 TII.loadRegFromStack(MBB, I, VR0, FI, RC, &RegInfo, 0); in expandLoadACC()
217 BuildMI(MBB, I, DL, Desc, Lo).addReg(VR0, RegState::Kill); in expandLoadACC()
218 TII.loadRegFromStack(MBB, I, VR1, FI, RC, &RegInfo, RegSize); in expandLoadACC()
219 BuildMI(MBB, I, DL, Desc, Hi).addReg(VR1, RegState::Kill); in expandLoadACC()
222 void ExpandPseudo::expandStoreACC(MachineBasicBlock &MBB, Iter I, in expandStoreACC() argument
239 BuildMI(MBB, I, DL, TII.get(MFLoOpc), VR0).addReg(Src); in expandStoreACC()
240 TII.storeRegToStack(MBB, I, VR0, true, FI, RC, &RegInfo, 0); in expandStoreACC()
241 BuildMI(MBB, I, DL, TII.get(MFHiOpc), VR1).addReg(Src, SrcKill); in expandStoreACC()
242 TII.storeRegToStack(MBB, I, VR1, true, FI, RC, &RegInfo, RegSize); in expandStoreACC()
245 bool ExpandPseudo::expandCopy(MachineBasicBlock &MBB, Iter I) { in expandCopy() argument
252 return expandCopyACC(MBB, I, Opcodes.first, Opcodes.second); in expandCopy()
255 bool ExpandPseudo::expandCopyACC(MachineBasicBlock &MBB, Iter I, in expandCopyACC() argument
273 BuildMI(MBB, I, DL, TII.get(MFLoOpc), VR0).addReg(Src); in expandCopyACC()
274 BuildMI(MBB, I, DL, TII.get(TargetOpcode::COPY), DstLo) in expandCopyACC()
276 BuildMI(MBB, I, DL, TII.get(MFHiOpc), VR1).addReg(Src, SrcKill); in expandCopyACC()
277 BuildMI(MBB, I, DL, TII.get(TargetOpcode::COPY), DstHi) in expandCopyACC()
287 bool ExpandPseudo::expandBuildPairF64(MachineBasicBlock &MBB, in expandBuildPairF64() argument
327 TII.storeRegToStack(MBB, I, LoReg, I->getOperand(1).isKill(), FI, RC, in expandBuildPairF64()
329 TII.storeRegToStack(MBB, I, HiReg, I->getOperand(2).isKill(), FI, RC, in expandBuildPairF64()
331 TII.loadRegFromStack(MBB, I, DstReg, FI, RC2, &RegInfo, 0); in expandBuildPairF64()
343 bool ExpandPseudo::expandExtractElementF64(MachineBasicBlock &MBB, in expandExtractElementF64() argument
351 BuildMI(MBB, I, I->getDebugLoc(), TII.get(Mips::IMPLICIT_DEF), DstReg); in expandExtractElementF64()
391 TII.storeRegToStack(MBB, I, SrcReg, Op1.isKill(), FI, RC, &RegInfo, 0); in expandExtractElementF64()
392 TII.loadRegFromStack(MBB, I, DstReg, FI, RC2, &RegInfo, Offset); in expandExtractElementF64()
403 MachineBasicBlock &MBB) const { in emitPrologue()
412 MachineBasicBlock::iterator MBBI = MBB.begin(); in emitPrologue()
435 TII.adjustStackPtr(SP, -StackSize, MBB, MBBI); in emitPrologue()
440 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
444 emitInterruptPrologueStub(MF, MBB); in emitPrologue()
474 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
479 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
490 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
495 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
501 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
510 if (!MBB.isLiveIn(ABI.GetEhDataReg(I))) in emitPrologue()
511 MBB.addLiveIn(ABI.GetEhDataReg(I)); in emitPrologue()
512 TII.storeRegToStackSlot(MBB, MBBI, ABI.GetEhDataReg(I), false, in emitPrologue()
522 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
530 BuildMI(MBB, MBBI, dl, TII.get(MOVE), FP).addReg(SP).addReg(ZERO) in emitPrologue()
536 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
547 BuildMI(MBB, MBBI, dl, TII.get(ADDiu), VR).addReg(ZERO) .addImm(MaxAlign); in emitPrologue()
548 BuildMI(MBB, MBBI, dl, TII.get(AND), SP).addReg(SP).addReg(VR); in emitPrologue()
553 BuildMI(MBB, MBBI, dl, TII.get(MOVE), BP) in emitPrologue()
562 MachineFunction &MF, MachineBasicBlock &MBB) const { in emitInterruptPrologueStub()
564 MachineBasicBlock::iterator MBBI = MBB.begin(); in emitInterruptPrologueStub()
565 DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); in emitInterruptPrologueStub()
598 MBB.addLiveIn(Mips::COP013); in emitInterruptPrologueStub()
599 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MFC0), Mips::K0) in emitInterruptPrologueStub()
604 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::EXT), Mips::K0) in emitInterruptPrologueStub()
612 MBB.addLiveIn(Mips::COP014); in emitInterruptPrologueStub()
613 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MFC0), Mips::K1) in emitInterruptPrologueStub()
618 STI.getInstrInfo()->storeRegToStack(MBB, MBBI, Mips::K1, false, in emitInterruptPrologueStub()
623 MBB.addLiveIn(Mips::COP012); in emitInterruptPrologueStub()
624 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MFC0), Mips::K1) in emitInterruptPrologueStub()
629 STI.getInstrInfo()->storeRegToStack(MBB, MBBI, Mips::K1, false, in emitInterruptPrologueStub()
658 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::INS), Mips::K1) in emitInterruptPrologueStub()
666 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::INS), Mips::K1) in emitInterruptPrologueStub()
675 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::INS), Mips::K1) in emitInterruptPrologueStub()
683 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MTC0), Mips::COP012) in emitInterruptPrologueStub()
690 MachineBasicBlock &MBB) const { in emitEpilogue()
691 MachineBasicBlock::iterator MBBI = MBB.getFirstTerminator(); in emitEpilogue()
700 DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); in emitEpilogue()
716 BuildMI(MBB, I, DL, TII.get(MOVE), SP).addReg(FP).addReg(ZERO); in emitEpilogue()
730 TII.loadRegFromStackSlot(MBB, I, ABI.GetEhDataReg(J), in emitEpilogue()
736 emitInterruptEpilogueStub(MF, MBB); in emitEpilogue()
745 TII.adjustStackPtr(SP, StackSize, MBB, MBBI); in emitEpilogue()
749 MachineFunction &MF, MachineBasicBlock &MBB) const { in emitInterruptEpilogueStub()
750 MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr(); in emitInterruptEpilogueStub()
752 DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); in emitInterruptEpilogueStub()
758 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::DI), Mips::ZERO); in emitInterruptEpilogueStub()
759 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::EHB)); in emitInterruptEpilogueStub()
762 STI.getInstrInfo()->loadRegFromStackSlot(MBB, MBBI, Mips::K1, in emitInterruptEpilogueStub()
765 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MTC0), Mips::COP014) in emitInterruptEpilogueStub()
770 STI.getInstrInfo()->loadRegFromStackSlot(MBB, MBBI, Mips::K1, in emitInterruptEpilogueStub()
773 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MTC0), Mips::COP012) in emitInterruptEpilogueStub()
794 spillCalleeSavedRegisters(MachineBasicBlock &MBB, in spillCalleeSavedRegisters() argument
798 MachineFunction *MF = MBB.getParent(); in spillCalleeSavedRegisters()
811 MBB.addLiveIn(Reg); in spillCalleeSavedRegisters()
817 const Function &Func = MBB.getParent()->getFunction(); in spillCalleeSavedRegisters()
829 BuildMI(MBB, MI, DL, TII.get(Op), Mips::K0) in spillCalleeSavedRegisters()
836 TII.storeRegToStackSlot(MBB, MI, Reg, IsKill, in spillCalleeSavedRegisters()