Lines Matching refs:MBB
75 bool expandInstr(MachineBasicBlock &MBB, Iter I);
76 void expandLoadCCond(MachineBasicBlock &MBB, Iter I);
77 void expandStoreCCond(MachineBasicBlock &MBB, Iter I);
78 void expandLoadACC(MachineBasicBlock &MBB, Iter I, unsigned RegSize);
79 void expandStoreACC(MachineBasicBlock &MBB, Iter I, unsigned MFHiOpc,
81 bool expandCopy(MachineBasicBlock &MBB, Iter I);
82 bool expandCopyACC(MachineBasicBlock &MBB, Iter I, unsigned MFHiOpc,
84 bool expandBuildPairF64(MachineBasicBlock &MBB,
86 bool expandExtractElementF64(MachineBasicBlock &MBB,
107 for (auto &MBB : MF) { in expand() local
108 for (Iter I = MBB.begin(), End = MBB.end(); I != End;) in expand()
109 Expanded |= expandInstr(MBB, I++); in expand()
115 bool ExpandPseudo::expandInstr(MachineBasicBlock &MBB, Iter I) { in expandInstr() argument
118 expandLoadCCond(MBB, I); in expandInstr()
121 expandStoreCCond(MBB, I); in expandInstr()
125 expandLoadACC(MBB, I, 4); in expandInstr()
128 expandLoadACC(MBB, I, 8); in expandInstr()
131 expandStoreACC(MBB, I, Mips::PseudoMFHI, Mips::PseudoMFLO, 4); in expandInstr()
134 expandStoreACC(MBB, I, Mips::MFHI_DSP, Mips::MFLO_DSP, 4); in expandInstr()
137 expandStoreACC(MBB, I, Mips::PseudoMFHI64, Mips::PseudoMFLO64, 8); in expandInstr()
140 if (expandBuildPairF64(MBB, I, false)) in expandInstr()
141 MBB.erase(I); in expandInstr()
144 if (expandBuildPairF64(MBB, I, true)) in expandInstr()
145 MBB.erase(I); in expandInstr()
148 if (expandExtractElementF64(MBB, I, false)) in expandInstr()
149 MBB.erase(I); in expandInstr()
152 if (expandExtractElementF64(MBB, I, true)) in expandInstr()
153 MBB.erase(I); in expandInstr()
156 if (!expandCopy(MBB, I)) in expandInstr()
163 MBB.erase(I); in expandInstr()
167 void ExpandPseudo::expandLoadCCond(MachineBasicBlock &MBB, Iter I) { in expandLoadCCond() argument
177 TII.loadRegFromStack(MBB, I, VR, FI, RC, &RegInfo, 0); in expandLoadCCond()
178 BuildMI(MBB, I, I->getDebugLoc(), TII.get(TargetOpcode::COPY), Dst) in expandLoadCCond()
182 void ExpandPseudo::expandStoreCCond(MachineBasicBlock &MBB, Iter I) { in expandStoreCCond() argument
192 BuildMI(MBB, I, I->getDebugLoc(), TII.get(TargetOpcode::COPY), VR) in expandStoreCCond()
194 TII.storeRegToStack(MBB, I, VR, true, FI, RC, &RegInfo, 0); in expandStoreCCond()
197 void ExpandPseudo::expandLoadACC(MachineBasicBlock &MBB, Iter I, in expandLoadACC() argument
215 TII.loadRegFromStack(MBB, I, VR0, FI, RC, &RegInfo, 0); in expandLoadACC()
216 BuildMI(MBB, I, DL, Desc, Lo).addReg(VR0, RegState::Kill); in expandLoadACC()
217 TII.loadRegFromStack(MBB, I, VR1, FI, RC, &RegInfo, RegSize); in expandLoadACC()
218 BuildMI(MBB, I, DL, Desc, Hi).addReg(VR1, RegState::Kill); in expandLoadACC()
221 void ExpandPseudo::expandStoreACC(MachineBasicBlock &MBB, Iter I, in expandStoreACC() argument
238 BuildMI(MBB, I, DL, TII.get(MFLoOpc), VR0).addReg(Src); in expandStoreACC()
239 TII.storeRegToStack(MBB, I, VR0, true, FI, RC, &RegInfo, 0); in expandStoreACC()
240 BuildMI(MBB, I, DL, TII.get(MFHiOpc), VR1).addReg(Src, SrcKill); in expandStoreACC()
241 TII.storeRegToStack(MBB, I, VR1, true, FI, RC, &RegInfo, RegSize); in expandStoreACC()
244 bool ExpandPseudo::expandCopy(MachineBasicBlock &MBB, Iter I) { in expandCopy() argument
251 return expandCopyACC(MBB, I, Opcodes.first, Opcodes.second); in expandCopy()
254 bool ExpandPseudo::expandCopyACC(MachineBasicBlock &MBB, Iter I, in expandCopyACC() argument
272 BuildMI(MBB, I, DL, TII.get(MFLoOpc), VR0).addReg(Src); in expandCopyACC()
273 BuildMI(MBB, I, DL, TII.get(TargetOpcode::COPY), DstLo) in expandCopyACC()
275 BuildMI(MBB, I, DL, TII.get(MFHiOpc), VR1).addReg(Src, SrcKill); in expandCopyACC()
276 BuildMI(MBB, I, DL, TII.get(TargetOpcode::COPY), DstHi) in expandCopyACC()
286 bool ExpandPseudo::expandBuildPairF64(MachineBasicBlock &MBB, in expandBuildPairF64() argument
326 TII.storeRegToStack(MBB, I, LoReg, I->getOperand(1).isKill(), FI, RC, in expandBuildPairF64()
328 TII.storeRegToStack(MBB, I, HiReg, I->getOperand(2).isKill(), FI, RC, in expandBuildPairF64()
330 TII.loadRegFromStack(MBB, I, DstReg, FI, RC2, &RegInfo, 0); in expandBuildPairF64()
342 bool ExpandPseudo::expandExtractElementF64(MachineBasicBlock &MBB, in expandExtractElementF64() argument
350 BuildMI(MBB, I, I->getDebugLoc(), TII.get(Mips::IMPLICIT_DEF), DstReg); in expandExtractElementF64()
390 TII.storeRegToStack(MBB, I, SrcReg, Op1.isKill(), FI, RC, &RegInfo, 0); in expandExtractElementF64()
391 TII.loadRegFromStack(MBB, I, DstReg, FI, RC2, &RegInfo, Offset); in expandExtractElementF64()
402 MachineBasicBlock &MBB) const { in emitPrologue()
411 MachineBasicBlock::iterator MBBI = MBB.begin(); in emitPrologue()
434 TII.adjustStackPtr(SP, -StackSize, MBB, MBBI); in emitPrologue()
439 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
443 emitInterruptPrologueStub(MF, MBB); in emitPrologue()
473 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
478 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
489 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
494 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
500 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
509 if (!MBB.isLiveIn(ABI.GetEhDataReg(I))) in emitPrologue()
510 MBB.addLiveIn(ABI.GetEhDataReg(I)); in emitPrologue()
511 TII.storeRegToStackSlot(MBB, MBBI, ABI.GetEhDataReg(I), false, in emitPrologue()
521 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
529 BuildMI(MBB, MBBI, dl, TII.get(MOVE), FP).addReg(SP).addReg(ZERO) in emitPrologue()
535 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
546 BuildMI(MBB, MBBI, dl, TII.get(ADDiu), VR).addReg(ZERO).addImm(MaxAlign); in emitPrologue()
547 BuildMI(MBB, MBBI, dl, TII.get(AND), SP).addReg(SP).addReg(VR); in emitPrologue()
552 BuildMI(MBB, MBBI, dl, TII.get(MOVE), BP) in emitPrologue()
561 MachineFunction &MF, MachineBasicBlock &MBB) const { in emitInterruptPrologueStub()
563 MachineBasicBlock::iterator MBBI = MBB.begin(); in emitInterruptPrologueStub()
564 DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); in emitInterruptPrologueStub()
597 MBB.addLiveIn(Mips::COP013); in emitInterruptPrologueStub()
598 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MFC0), Mips::K0) in emitInterruptPrologueStub()
603 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::EXT), Mips::K0) in emitInterruptPrologueStub()
611 MBB.addLiveIn(Mips::COP014); in emitInterruptPrologueStub()
612 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MFC0), Mips::K1) in emitInterruptPrologueStub()
617 STI.getInstrInfo()->storeRegToStack(MBB, MBBI, Mips::K1, false, in emitInterruptPrologueStub()
622 MBB.addLiveIn(Mips::COP012); in emitInterruptPrologueStub()
623 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MFC0), Mips::K1) in emitInterruptPrologueStub()
628 STI.getInstrInfo()->storeRegToStack(MBB, MBBI, Mips::K1, false, in emitInterruptPrologueStub()
657 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::INS), Mips::K1) in emitInterruptPrologueStub()
665 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::INS), Mips::K1) in emitInterruptPrologueStub()
674 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::INS), Mips::K1) in emitInterruptPrologueStub()
682 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MTC0), Mips::COP012) in emitInterruptPrologueStub()
689 MachineBasicBlock &MBB) const { in emitEpilogue()
690 MachineBasicBlock::iterator MBBI = MBB.getFirstTerminator(); in emitEpilogue()
699 DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); in emitEpilogue()
715 BuildMI(MBB, I, DL, TII.get(MOVE), SP).addReg(FP).addReg(ZERO); in emitEpilogue()
729 TII.loadRegFromStackSlot(MBB, I, ABI.GetEhDataReg(J), in emitEpilogue()
735 emitInterruptEpilogueStub(MF, MBB); in emitEpilogue()
744 TII.adjustStackPtr(SP, StackSize, MBB, MBBI); in emitEpilogue()
748 MachineFunction &MF, MachineBasicBlock &MBB) const { in emitInterruptEpilogueStub()
749 MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr(); in emitInterruptEpilogueStub()
751 DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); in emitInterruptEpilogueStub()
757 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::DI), Mips::ZERO); in emitInterruptEpilogueStub()
758 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::EHB)); in emitInterruptEpilogueStub()
761 STI.getInstrInfo()->loadRegFromStackSlot(MBB, MBBI, Mips::K1, in emitInterruptEpilogueStub()
764 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MTC0), Mips::COP014) in emitInterruptEpilogueStub()
769 STI.getInstrInfo()->loadRegFromStackSlot(MBB, MBBI, Mips::K1, in emitInterruptEpilogueStub()
772 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MTC0), Mips::COP012) in emitInterruptEpilogueStub()
794 MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, in spillCalleeSavedRegisters() argument
796 MachineFunction *MF = MBB.getParent(); in spillCalleeSavedRegisters()
809 MBB.addLiveIn(Reg); in spillCalleeSavedRegisters()
815 const Function &Func = MBB.getParent()->getFunction(); in spillCalleeSavedRegisters()
827 BuildMI(MBB, MI, DL, TII.get(Op), Mips::K0) in spillCalleeSavedRegisters()
834 TII.storeRegToStackSlot(MBB, MI, Reg, IsKill, in spillCalleeSavedRegisters()