Home | History | Annotate | Download | only in Mips

Lines Matching defs:MBB

81     void splitMBB(MachineBasicBlock *MBB);
84 void replaceBranch(MachineBasicBlock &MBB, Iter Br, const DebugLoc &DL,
115 llvm_unreachable("This instruction does not have an MBB operand.");
128 // Split MBB if it has two direct jumps/branches.
129 void MipsLongBranch::splitMBB(MachineBasicBlock *MBB) {
130 ReverseIter End = MBB->rend();
131 ReverseIter LastBr = getNonDebugInstr(MBB->rbegin(), End);
133 // Return if MBB has no branch instructions.
140 // MBB has only one branch instruction if FirstBr is not a branch
148 // Create a new MBB. Move instructions in MBB to the newly created MBB.
150 MF->CreateMachineBasicBlock(MBB->getBasicBlock());
154 NewMBB->transferSuccessors(MBB);
156 MBB->addSuccessor(NewMBB);
157 MBB->addSuccessor(Tgt);
158 MF->insert(std::next(MachineFunction::iterator(MBB)), NewMBB);
160 NewMBB->splice(NewMBB->end(), MBB, (++LastBr).base(), MBB->end());
167 for (auto &MBB : *MF)
168 splitMBB(&MBB);
177 MachineBasicBlock *MBB = MF->getBlockNumbered(I);
179 // Compute size of MBB.
180 for (MachineBasicBlock::instr_iterator MI = MBB->instr_begin();
181 MI != MBB->instr_end(); ++MI)
184 // Search for MBB's branch instruction.
185 ReverseIter End = MBB->rend();
186 ReverseIter Br = getNonDebugInstr(MBB->rbegin(), End);
217 void MipsLongBranch::replaceBranch(MachineBasicBlock &MBB, Iter Br,
221 MBB.getParent()->getSubtarget().getInstrInfo());
225 MachineInstrBuilder MIB = BuildMI(MBB, Br, DL, NewDesc);
231 assert(MO.isMBB() && "MBB operand expected.");
257 MachineBasicBlock *MBB = I.Br->getParent(), *TgtMBB = getTargetMBB(*I.Br);
259 const BasicBlock *BB = MBB->getBasicBlock();
260 MachineFunction::iterator FallThroughMBB = ++MachineFunction::iterator(MBB);
268 MBB->replaceSuccessor(TgtMBB, LongBrMBB);
447 replaceBranch(*MBB, I.Br, DL, &*FallThroughMBB);
451 MachineBasicBlock &MBB = F.front();
452 MachineBasicBlock::iterator I = MBB.begin();
453 DebugLoc DL = MBB.findDebugLoc(MBB.begin());
454 BuildMI(MBB, I, DL, TII->get(Mips::LUi), Mips::V0)
456 BuildMI(MBB, I, DL, TII->get(Mips::ADDiu), Mips::V0)
458 MBB.removeLiveIn(Mips::V0);
488 // Skip if this MBB doesn't have a branch or the branch has already been