Lines Matching refs:MBB
44 bool expandMBB(MachineBasicBlock &MBB);
45 bool expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
47 bool expandCCOp(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
49 bool expandVSetVL(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI);
50 bool expandVMSET_VMCLR(MachineBasicBlock &MBB,
52 bool expandRV32ZdinxStore(MachineBasicBlock &MBB,
54 bool expandRV32ZdinxLoad(MachineBasicBlock &MBB,
59 for (auto &MBB : MF) in getInstSizeInBytes() local
60 for (auto &MI : MBB) in getInstSizeInBytes()
78 for (auto &MBB : MF) in runOnMachineFunction() local
79 Modified |= expandMBB(MBB); in runOnMachineFunction()
88 bool RISCVExpandPseudo::expandMBB(MachineBasicBlock &MBB) { in expandMBB() argument
91 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in expandMBB()
94 Modified |= expandMI(MBB, MBBI, NMBBI); in expandMBB()
101 bool RISCVExpandPseudo::expandMI(MachineBasicBlock &MBB, in expandMI() argument
109 return expandRV32ZdinxStore(MBB, MBBI); in expandMI()
111 return expandRV32ZdinxLoad(MBB, MBBI); in expandMI()
141 return expandCCOp(MBB, MBBI, NextMBBI); in expandMI()
145 return expandVSetVL(MBB, MBBI); in expandMI()
154 return expandVMSET_VMCLR(MBB, MBBI, RISCV::VMXOR_MM); in expandMI()
163 return expandVMSET_VMCLR(MBB, MBBI, RISCV::VMXNOR_MM); in expandMI()
169 bool RISCVExpandPseudo::expandCCOp(MachineBasicBlock &MBB, in expandCCOp() argument
173 MachineFunction *MF = MBB.getParent(); in expandCCOp()
177 MachineBasicBlock *TrueBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); in expandCCOp()
178 MachineBasicBlock *MergeBB = MF->CreateMachineBasicBlock(MBB.getBasicBlock()); in expandCCOp()
180 MF->insert(++MBB.getIterator(), TrueBB); in expandCCOp()
190 BuildMI(MBB, MBBI, DL, TII->getBrCond(CC)) in expandCCOp()
244 MergeBB->splice(MergeBB->end(), &MBB, MI, MBB.end()); in expandCCOp()
245 MergeBB->transferSuccessors(&MBB); in expandCCOp()
247 MBB.addSuccessor(TrueBB); in expandCCOp()
248 MBB.addSuccessor(MergeBB); in expandCCOp()
250 NextMBBI = MBB.end(); in expandCCOp()
261 bool RISCVExpandPseudo::expandVSetVL(MachineBasicBlock &MBB, in expandVSetVL() argument
282 BuildMI(MBB, MBBI, DL, Desc) in expandVSetVL()
291 bool RISCVExpandPseudo::expandVMSET_VMCLR(MachineBasicBlock &MBB, in expandVMSET_VMCLR() argument
297 BuildMI(MBB, MBBI, DL, Desc, DstReg) in expandVMSET_VMCLR()
307 bool RISCVExpandPseudo::expandRV32ZdinxStore(MachineBasicBlock &MBB, in expandRV32ZdinxStore() argument
318 MachineFunction *MF = MBB.getParent(); in expandRV32ZdinxStore()
322 BuildMI(MBB, MBBI, DL, TII->get(RISCV::SW)) in expandRV32ZdinxStore()
334 BuildMI(MBB, MBBI, DL, TII->get(RISCV::SW)) in expandRV32ZdinxStore()
341 BuildMI(MBB, MBBI, DL, TII->get(RISCV::SW)) in expandRV32ZdinxStore()
354 bool RISCVExpandPseudo::expandRV32ZdinxLoad(MachineBasicBlock &MBB, in expandRV32ZdinxLoad() argument
365 MachineFunction *MF = MBB.getParent(); in expandRV32ZdinxLoad()
374 BuildMI(MBB, MBBI, DL, TII->get(RISCV::LW), Lo) in expandRV32ZdinxLoad()
384 BuildMI(MBB, MBBI, DL, TII->get(RISCV::LW), Hi) in expandRV32ZdinxLoad()
391 BuildMI(MBB, MBBI, DL, TII->get(RISCV::LW), Hi) in expandRV32ZdinxLoad()
399 BuildMI(MBB, MBBI, DL, TII->get(RISCV::LW), Lo) in expandRV32ZdinxLoad()
428 bool expandMBB(MachineBasicBlock &MBB);
429 bool expandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
431 bool expandAuipcInstPair(MachineBasicBlock &MBB,
435 bool expandLoadLocalAddress(MachineBasicBlock &MBB,
438 bool expandLoadGlobalAddress(MachineBasicBlock &MBB,
441 bool expandLoadTLSIEAddress(MachineBasicBlock &MBB,
444 bool expandLoadTLSGDAddress(MachineBasicBlock &MBB,
447 bool expandLoadTLSDescAddress(MachineBasicBlock &MBB,
454 for (auto &MBB : MF) in getInstSizeInBytes() local
455 for (auto &MI : MBB) in getInstSizeInBytes()
473 for (auto &MBB : MF) in runOnMachineFunction() local
474 Modified |= expandMBB(MBB); in runOnMachineFunction()
483 bool RISCVPreRAExpandPseudo::expandMBB(MachineBasicBlock &MBB) { in expandMBB() argument
486 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end(); in expandMBB()
489 Modified |= expandMI(MBB, MBBI, NMBBI); in expandMBB()
496 bool RISCVPreRAExpandPseudo::expandMI(MachineBasicBlock &MBB, in expandMI() argument
502 return expandLoadLocalAddress(MBB, MBBI, NextMBBI); in expandMI()
504 return expandLoadGlobalAddress(MBB, MBBI, NextMBBI); in expandMI()
506 return expandLoadTLSIEAddress(MBB, MBBI, NextMBBI); in expandMI()
508 return expandLoadTLSGDAddress(MBB, MBBI, NextMBBI); in expandMI()
510 return expandLoadTLSDescAddress(MBB, MBBI, NextMBBI); in expandMI()
516 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandAuipcInstPair() argument
519 MachineFunction *MF = MBB.getParent(); in expandAuipcInstPair()
532 BuildMI(MBB, MBBI, DL, TII->get(RISCV::AUIPC), ScratchReg).add(Symbol); in expandAuipcInstPair()
536 BuildMI(MBB, MBBI, DL, TII->get(SecondOpcode), DestReg) in expandAuipcInstPair()
548 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadLocalAddress() argument
550 return expandAuipcInstPair(MBB, MBBI, NextMBBI, RISCVII::MO_PCREL_HI, in expandLoadLocalAddress()
555 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadGlobalAddress() argument
558 return expandAuipcInstPair(MBB, MBBI, NextMBBI, RISCVII::MO_GOT_HI, in expandLoadGlobalAddress()
563 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadTLSIEAddress() argument
566 return expandAuipcInstPair(MBB, MBBI, NextMBBI, RISCVII::MO_TLS_GOT_HI, in expandLoadTLSIEAddress()
571 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadTLSGDAddress() argument
573 return expandAuipcInstPair(MBB, MBBI, NextMBBI, RISCVII::MO_TLS_GD_HI, in expandLoadTLSGDAddress()
578 MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, in expandLoadTLSDescAddress() argument
580 MachineFunction *MF = MBB.getParent(); in expandLoadTLSDescAddress()
598 BuildMI(MBB, MBBI, DL, TII->get(RISCV::AUIPC), ScratchReg).add(Symbol); in expandLoadTLSDescAddress()
601 BuildMI(MBB, MBBI, DL, TII->get(SecondOpcode), DestReg) in expandLoadTLSDescAddress()
605 BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADDI), RISCV::X10) in expandLoadTLSDescAddress()
609 BuildMI(MBB, MBBI, DL, TII->get(RISCV::PseudoTLSDESCCall), RISCV::X5) in expandLoadTLSDescAddress()
614 BuildMI(MBB, MBBI, DL, TII->get(RISCV::ADD), FinalReg) in expandLoadTLSDescAddress()