Lines Matching refs:MBB
57 bool expandInstr(MachineBasicBlock &MBB, Iter I);
58 void expandLoadCCond(MachineBasicBlock &MBB, Iter I);
59 void expandStoreCCond(MachineBasicBlock &MBB, Iter I);
60 void expandLoadACC(MachineBasicBlock &MBB, Iter I, unsigned RegSize);
61 void expandStoreACC(MachineBasicBlock &MBB, Iter I, unsigned MFHiOpc,
63 bool expandCopy(MachineBasicBlock &MBB, Iter I);
64 bool expandCopyACC(MachineBasicBlock &MBB, Iter I, unsigned MFHiOpc,
66 bool expandBuildPairF64(MachineBasicBlock &MBB,
68 bool expandExtractElementF64(MachineBasicBlock &MBB,
88 for (auto &MBB : MF) { in expand() local
89 for (Iter I = MBB.begin(), End = MBB.end(); I != End;) in expand()
90 Expanded |= expandInstr(MBB, I++); in expand()
96 bool ExpandPseudo::expandInstr(MachineBasicBlock &MBB, Iter I) { in expandInstr() argument
99 expandLoadCCond(MBB, I); in expandInstr()
102 expandStoreCCond(MBB, I); in expandInstr()
106 expandLoadACC(MBB, I, 4); in expandInstr()
109 expandLoadACC(MBB, I, 8); in expandInstr()
112 expandStoreACC(MBB, I, Mips::PseudoMFHI, Mips::PseudoMFLO, 4); in expandInstr()
115 expandStoreACC(MBB, I, Mips::MFHI_DSP, Mips::MFLO_DSP, 4); in expandInstr()
118 expandStoreACC(MBB, I, Mips::PseudoMFHI64, Mips::PseudoMFLO64, 8); in expandInstr()
121 if (expandBuildPairF64(MBB, I, false)) in expandInstr()
122 MBB.erase(I); in expandInstr()
125 if (expandBuildPairF64(MBB, I, true)) in expandInstr()
126 MBB.erase(I); in expandInstr()
129 if (expandExtractElementF64(MBB, I, false)) in expandInstr()
130 MBB.erase(I); in expandInstr()
133 if (expandExtractElementF64(MBB, I, true)) in expandInstr()
134 MBB.erase(I); in expandInstr()
137 if (!expandCopy(MBB, I)) in expandInstr()
144 MBB.erase(I); in expandInstr()
148 void ExpandPseudo::expandLoadCCond(MachineBasicBlock &MBB, Iter I) { in expandLoadCCond() argument
158 TII.loadRegFromStack(MBB, I, VR, FI, RC, &RegInfo, 0); in expandLoadCCond()
159 BuildMI(MBB, I, I->getDebugLoc(), TII.get(TargetOpcode::COPY), Dst) in expandLoadCCond()
163 void ExpandPseudo::expandStoreCCond(MachineBasicBlock &MBB, Iter I) { in expandStoreCCond() argument
173 BuildMI(MBB, I, I->getDebugLoc(), TII.get(TargetOpcode::COPY), VR) in expandStoreCCond()
175 TII.storeRegToStack(MBB, I, VR, true, FI, RC, &RegInfo, 0); in expandStoreCCond()
178 void ExpandPseudo::expandLoadACC(MachineBasicBlock &MBB, Iter I, in expandLoadACC() argument
196 TII.loadRegFromStack(MBB, I, VR0, FI, RC, &RegInfo, 0); in expandLoadACC()
197 BuildMI(MBB, I, DL, Desc, Lo).addReg(VR0, RegState::Kill); in expandLoadACC()
198 TII.loadRegFromStack(MBB, I, VR1, FI, RC, &RegInfo, RegSize); in expandLoadACC()
199 BuildMI(MBB, I, DL, Desc, Hi).addReg(VR1, RegState::Kill); in expandLoadACC()
202 void ExpandPseudo::expandStoreACC(MachineBasicBlock &MBB, Iter I, in expandStoreACC() argument
219 BuildMI(MBB, I, DL, TII.get(MFLoOpc), VR0).addReg(Src); in expandStoreACC()
220 TII.storeRegToStack(MBB, I, VR0, true, FI, RC, &RegInfo, 0); in expandStoreACC()
221 BuildMI(MBB, I, DL, TII.get(MFHiOpc), VR1).addReg(Src, SrcKill); in expandStoreACC()
222 TII.storeRegToStack(MBB, I, VR1, true, FI, RC, &RegInfo, RegSize); in expandStoreACC()
225 bool ExpandPseudo::expandCopy(MachineBasicBlock &MBB, Iter I) { in expandCopy() argument
232 return expandCopyACC(MBB, I, Opcodes.first, Opcodes.second); in expandCopy()
235 bool ExpandPseudo::expandCopyACC(MachineBasicBlock &MBB, Iter I, in expandCopyACC() argument
252 BuildMI(MBB, I, DL, TII.get(MFLoOpc), VR0).addReg(Src); in expandCopyACC()
253 BuildMI(MBB, I, DL, TII.get(TargetOpcode::COPY), DstLo) in expandCopyACC()
255 BuildMI(MBB, I, DL, TII.get(MFHiOpc), VR1).addReg(Src, SrcKill); in expandCopyACC()
256 BuildMI(MBB, I, DL, TII.get(TargetOpcode::COPY), DstHi) in expandCopyACC()
266 bool ExpandPseudo::expandBuildPairF64(MachineBasicBlock &MBB, in expandBuildPairF64() argument
302 TII.storeRegToStack(MBB, I, LoReg, I->getOperand(1).isKill(), FI, RC, in expandBuildPairF64()
304 TII.storeRegToStack(MBB, I, HiReg, I->getOperand(2).isKill(), FI, RC, in expandBuildPairF64()
306 TII.loadRegFromStack(MBB, I, DstReg, FI, RC2, &RegInfo, 0); in expandBuildPairF64()
318 bool ExpandPseudo::expandExtractElementF64(MachineBasicBlock &MBB, in expandExtractElementF64() argument
326 BuildMI(MBB, I, I->getDebugLoc(), TII.get(Mips::IMPLICIT_DEF), DstReg); in expandExtractElementF64()
363 TII.storeRegToStack(MBB, I, SrcReg, Op1.isKill(), FI, RC, &RegInfo, 0); in expandExtractElementF64()
364 TII.loadRegFromStack(MBB, I, DstReg, FI, RC2, &RegInfo, Offset); in expandExtractElementF64()
375 MachineBasicBlock &MBB) const { in emitPrologue()
376 assert(&MF.front() == &MBB && "Shrink-wrapping not yet supported"); in emitPrologue()
385 MachineBasicBlock::iterator MBBI = MBB.begin(); in emitPrologue()
409 TII.adjustStackPtr(SP, -StackSize, MBB, MBBI); in emitPrologue()
414 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
418 emitInterruptPrologueStub(MF, MBB); in emitPrologue()
448 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
453 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
464 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
469 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
475 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
484 if (!MBB.isLiveIn(ABI.GetEhDataReg(I))) in emitPrologue()
485 MBB.addLiveIn(ABI.GetEhDataReg(I)); in emitPrologue()
486 TII.storeRegToStackSlot(MBB, MBBI, ABI.GetEhDataReg(I), false, in emitPrologue()
496 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
504 BuildMI(MBB, MBBI, dl, TII.get(MOVE), FP).addReg(SP).addReg(ZERO) in emitPrologue()
510 BuildMI(MBB, MBBI, dl, TII.get(TargetOpcode::CFI_INSTRUCTION)) in emitPrologue()
521 BuildMI(MBB, MBBI, dl, TII.get(ADDiu), VR).addReg(ZERO) .addImm(MaxAlign); in emitPrologue()
522 BuildMI(MBB, MBBI, dl, TII.get(AND), SP).addReg(SP).addReg(VR); in emitPrologue()
527 BuildMI(MBB, MBBI, dl, TII.get(MOVE), BP) in emitPrologue()
536 MachineFunction &MF, MachineBasicBlock &MBB) const { in emitInterruptPrologueStub()
539 MachineBasicBlock::iterator MBBI = MBB.begin(); in emitInterruptPrologueStub()
540 DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); in emitInterruptPrologueStub()
573 MBB.addLiveIn(Mips::COP013); in emitInterruptPrologueStub()
574 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MFC0), Mips::K0) in emitInterruptPrologueStub()
579 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::EXT), Mips::K0) in emitInterruptPrologueStub()
587 MBB.addLiveIn(Mips::COP014); in emitInterruptPrologueStub()
588 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MFC0), Mips::K1) in emitInterruptPrologueStub()
593 STI.getInstrInfo()->storeRegToStack(MBB, MBBI, Mips::K1, false, in emitInterruptPrologueStub()
598 MBB.addLiveIn(Mips::COP012); in emitInterruptPrologueStub()
599 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MFC0), Mips::K1) in emitInterruptPrologueStub()
604 STI.getInstrInfo()->storeRegToStack(MBB, MBBI, Mips::K1, false, in emitInterruptPrologueStub()
633 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::INS), Mips::K1) in emitInterruptPrologueStub()
641 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::INS), Mips::K1) in emitInterruptPrologueStub()
650 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::INS), Mips::K1) in emitInterruptPrologueStub()
658 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MTC0), Mips::COP012) in emitInterruptPrologueStub()
665 MachineBasicBlock &MBB) const { in emitEpilogue()
666 MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr(); in emitEpilogue()
691 BuildMI(MBB, I, DL, TII.get(MOVE), SP).addReg(FP).addReg(ZERO); in emitEpilogue()
705 TII.loadRegFromStackSlot(MBB, I, ABI.GetEhDataReg(J), in emitEpilogue()
711 emitInterruptEpilogueStub(MF, MBB); in emitEpilogue()
720 TII.adjustStackPtr(SP, StackSize, MBB, MBBI); in emitEpilogue()
724 MachineFunction &MF, MachineBasicBlock &MBB) const { in emitInterruptEpilogueStub()
726 MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr(); in emitInterruptEpilogueStub()
728 DebugLoc DL = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); in emitInterruptEpilogueStub()
734 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::DI), Mips::ZERO); in emitInterruptEpilogueStub()
735 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::EHB)); in emitInterruptEpilogueStub()
738 STI.getInstrInfo()->loadRegFromStackSlot(MBB, MBBI, Mips::K1, in emitInterruptEpilogueStub()
741 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MTC0), Mips::COP014) in emitInterruptEpilogueStub()
746 STI.getInstrInfo()->loadRegFromStackSlot(MBB, MBBI, Mips::K1, in emitInterruptEpilogueStub()
749 BuildMI(MBB, MBBI, DL, STI.getInstrInfo()->get(Mips::MTC0), Mips::COP012) in emitInterruptEpilogueStub()
770 spillCalleeSavedRegisters(MachineBasicBlock &MBB, in spillCalleeSavedRegisters() argument
774 MachineFunction *MF = MBB.getParent(); in spillCalleeSavedRegisters()
794 const Function *Func = MBB.getParent()->getFunction(); in spillCalleeSavedRegisters()
806 BuildMI(MBB, MI, DL, TII.get(Op), Mips::K0) in spillCalleeSavedRegisters()