Lines Matching refs:MBB
78 void splitMBB(MachineBasicBlock *MBB);
81 void replaceBranch(MachineBasicBlock &MBB, Iter Br, DebugLoc DL,
112 assert(false && "This instruction does not have an MBB operand.");
126 // Split MBB if it has two direct jumps/branches.
127 void MipsLongBranch::splitMBB(MachineBasicBlock *MBB) {
128 ReverseIter End = MBB->rend();
129 ReverseIter LastBr = getNonDebugInstr(MBB->rbegin(), End);
131 // Return if MBB has no branch instructions.
138 // MBB has only one branch instruction if FirstBr is not a branch
146 // Create a new MBB. Move instructions in MBB to the newly created MBB.
148 MF->CreateMachineBasicBlock(MBB->getBasicBlock());
152 NewMBB->transferSuccessors(MBB);
154 MBB->addSuccessor(NewMBB);
155 MBB->addSuccessor(Tgt);
156 MF->insert(std::next(MachineFunction::iterator(MBB)), NewMBB);
158 NewMBB->splice(NewMBB->end(), MBB, (++LastBr).base(), MBB->end());
175 MachineBasicBlock *MBB = MF->getBlockNumbered(I);
177 // Compute size of MBB.
178 for (MachineBasicBlock::instr_iterator MI = MBB->instr_begin();
179 MI != MBB->instr_end(); ++MI)
182 // Search for MBB's branch instruction.
183 ReverseIter End = MBB->rend();
184 ReverseIter Br = getNonDebugInstr(MBB->rbegin(), End);
217 void MipsLongBranch::replaceBranch(MachineBasicBlock &MBB, Iter Br,
224 MachineInstrBuilder MIB = BuildMI(MBB, Br, DL, NewDesc);
230 assert(MO.isMBB() && "MBB operand expected.");
250 MachineBasicBlock *MBB = I.Br->getParent(), *TgtMBB = getTargetMBB(*I.Br);
252 const BasicBlock *BB = MBB->getBasicBlock();
253 MachineFunction::iterator FallThroughMBB = ++MachineFunction::iterator(MBB);
260 MBB->removeSuccessor(TgtMBB);
261 MBB->addSuccessor(LongBrMBB);
434 replaceBranch(*MBB, I.Br, DL, FallThroughMBB);
438 MachineBasicBlock &MBB = F.front();
439 MachineBasicBlock::iterator I = MBB.begin();
440 DebugLoc DL = MBB.findDebugLoc(MBB.begin());
441 BuildMI(MBB, I, DL, TII->get(Mips::LUi), Mips::V0)
443 BuildMI(MBB, I, DL, TII->get(Mips::ADDiu), Mips::V0)
445 MBB.removeLiveIn(Mips::V0);
472 // Skip if this MBB doesn't have a branch or the branch has already been