Lines Matching refs:MBB
43 bool expandMBB(MachineBasicBlock &MBB);
44 bool expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
46 bool expandAuipcInstPair(MachineBasicBlock &MBB,
50 bool expandLoadLocalAddress(MachineBasicBlock &MBB,
53 bool expandLoadAddress(MachineBasicBlock &MBB,
56 bool expandLoadTLSIEAddress(MachineBasicBlock &MBB,
59 bool expandLoadTLSGDAddress(MachineBasicBlock &MBB,
62 bool expandVSetVL(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI);
63 bool expandVMSET_VMCLR(MachineBasicBlock &MBB,
65 bool expandVSPILL(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI);
66 bool expandVRELOAD(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI);
74 for (auto &MBB : MF) in runOnMachineFunction() local
75 Modified |= expandMBB(MBB); in runOnMachineFunction()
79 bool RISCVExpandPseudo::expandMBB(MachineBasicBlock &MBB) { in expandMBB() argument
82 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in expandMBB()
85 Modified |= expandMI(MBB, MBBI, NMBBI); in expandMBB()
92 bool RISCVExpandPseudo::expandMI(MachineBasicBlock &MBB, in expandMI() argument
100 return expandLoadLocalAddress(MBB, MBBI, NextMBBI); in expandMI()
102 return expandLoadAddress(MBB, MBBI, NextMBBI); in expandMI()
104 return expandLoadTLSIEAddress(MBB, MBBI, NextMBBI); in expandMI()
106 return expandLoadTLSGDAddress(MBB, MBBI, NextMBBI); in expandMI()
110 return expandVSetVL(MBB, MBBI); in expandMI()
119 return expandVMSET_VMCLR(MBB, MBBI, RISCV::VMXOR_MM); in expandMI()
128 return expandVMSET_VMCLR(MBB, MBBI, RISCV::VMXNOR_MM); in expandMI()
140 return expandVSPILL(MBB, MBBI); in expandMI()
152 return expandVRELOAD(MBB, MBBI); in expandMI()
159 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandAuipcInstPair() argument
162 MachineFunction *MF = MBB.getParent(); in expandAuipcInstPair()
169 MachineBasicBlock *NewMBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); in expandAuipcInstPair()
175 MF->insert(++MBB.getIterator(), NewMBB); in expandAuipcInstPair()
184 NewMBB->splice(NewMBB->end(), &MBB, std::next(MBBI), MBB.end()); in expandAuipcInstPair()
186 NewMBB->transferSuccessorsAndUpdatePHIs(&MBB); in expandAuipcInstPair()
188 MBB.addSuccessor(NewMBB); in expandAuipcInstPair()
194 NextMBBI = MBB.end(); in expandAuipcInstPair()
200 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadLocalAddress() argument
202 return expandAuipcInstPair(MBB, MBBI, NextMBBI, RISCVII::MO_PCREL_HI, in expandLoadLocalAddress()
207 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadAddress() argument
209 MachineFunction *MF = MBB.getParent(); in expandLoadAddress()
221 return expandAuipcInstPair(MBB, MBBI, NextMBBI, FlagsHi, SecondOpcode); in expandLoadAddress()
225 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadTLSIEAddress() argument
227 MachineFunction *MF = MBB.getParent(); in expandLoadTLSIEAddress()
231 return expandAuipcInstPair(MBB, MBBI, NextMBBI, RISCVII::MO_TLS_GOT_HI, in expandLoadTLSIEAddress()
236 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadTLSGDAddress() argument
238 return expandAuipcInstPair(MBB, MBBI, NextMBBI, RISCVII::MO_TLS_GD_HI, in expandLoadTLSGDAddress()
242 bool RISCVExpandPseudo::expandVSetVL(MachineBasicBlock &MBB, in expandVSetVL() argument
263 BuildMI(MBB, MBBI, DL, Desc) in expandVSetVL()
272 bool RISCVExpandPseudo::expandVMSET_VMCLR(MachineBasicBlock &MBB, in expandVMSET_VMCLR() argument
278 BuildMI(MBB, MBBI, DL, Desc, DstReg) in expandVMSET_VMCLR()
285 bool RISCVExpandPseudo::expandVSPILL(MachineBasicBlock &MBB, in expandVSPILL() argument
288 MBB.getParent()->getSubtarget().getRegisterInfo(); in expandVSPILL()
321 BuildMI(MBB, MBBI, DL, TII->get(Opcode)) in expandVSPILL()
327 BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADD), Base) in expandVSPILL()
335 bool RISCVExpandPseudo::expandVRELOAD(MachineBasicBlock &MBB, in expandVRELOAD() argument
338 MBB.getParent()->getSubtarget().getRegisterInfo(); in expandVRELOAD()
367 BuildMI(MBB, MBBI, DL, TII->get(Opcode), in expandVRELOAD()
372 BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADD), Base) in expandVRELOAD()