Lines Matching defs:NewBB
263 MachineBasicBlock *NewBB = MF->CreateMachineBasicBlock(BB);
264 MF->insert(++OrigMBB.getIterator(), NewBB);
267 NewBB->setSectionID(OrigMBB.getSectionID());
268 NewBB->setIsEndSection(OrigMBB.isEndSection());
272 BlockInfo.insert(BlockInfo.begin() + NewBB->getNumber(), BasicBlockInfo());
274 return NewBB;
286 MachineBasicBlock *NewBB =
288 MF->insert(++OrigBB->getIterator(), NewBB);
291 NewBB->setSectionID(OrigBB->getSectionID());
292 NewBB->setIsEndSection(OrigBB->isEndSection());
295 // Splice the instructions starting with MI over to NewBB.
296 NewBB->splice(NewBB->end(), OrigBB, MI.getIterator(), OrigBB->end());
298 // Add an unconditional branch from OrigBB to NewBB.
302 TII->insertUnconditionalBranch(*OrigBB, NewBB, DebugLoc());
305 BlockInfo.insert(BlockInfo.begin() + NewBB->getNumber(), BasicBlockInfo());
307 NewBB->transferSuccessors(OrigBB);
308 OrigBB->addSuccessor(NewBB);
313 OrigBB->updateTerminator(NewBB);
324 BlockInfo[NewBB->getNumber()].Size = computeBlockSize(*NewBB);
327 adjustBlockOffsets(*OrigBB, std::next(NewBB->getIterator()));
331 computeAndAddLiveIns(LiveRegs, *NewBB);
335 return NewBB;
369 MachineBasicBlock *NewBB = nullptr;
395 auto updateOffsetAndLiveness = [&](MachineBasicBlock *NewBB) {
396 assert(NewBB != nullptr && "can't populate offset for nullptr");
401 adjustBlockOffsets(*std::prev(NewBB->getIterator()),
402 std::next(NewBB->getIterator()));
406 computeAndAddLiveIns(LiveRegs, *NewBB);
427 NewBB =
430 if (isBlockInRange(MI, *NewBB)) {
432 << NewBB->back());
434 insertUncondBranch(NewBB, TBB);
437 MBB->replaceSuccessor(TBB, NewBB);
438 NewBB->addSuccessor(TBB);
442 insertBranch(MBB, NewBB, FBB, Cond);
444 TrampolineInsertionPoint = NewBB;
445 updateOffsetAndLiveness(NewBB);
453 TrampolineInsertionPoint->setIsEndSection(NewBB->isEndSection());
454 MF->erase(NewBB);
455 NewBB = nullptr;
487 NewBB = createNewBlockAfter(*MBB);
489 insertUncondBranch(NewBB, FBB);
492 MBB->replaceSuccessor(FBB, NewBB);
493 NewBB->addSuccessor(FBB);
494 updateOffsetAndLiveness(NewBB);
523 // beq NewBB
525 // NewBB:
529 NewBB = createNewBlockAfter(*MBB);
530 insertUncondBranch(NewBB, TBB);
533 << printMBBReference(*NewBB)
540 MBB->replaceSuccessor(TBB, NewBB);
541 NewBB->addSuccessor(TBB);
545 insertBranch(MBB, NewBB, FBB, Cond);
547 updateOffsetAndLiveness(NewBB);
616 MachineBasicBlock *NewBB = createNewBlockAfter(*TrampolineInsertionPoint);
617 TII->insertUnconditionalBranch(*NewBB, DestBB, DebugLoc());
618 BlockInfo[NewBB->getNumber()].Size = computeBlockSize(*NewBB);
620 std::next(NewBB->getIterator()));
622 // New trampolines should be inserted after NewBB.
623 TrampolineInsertionPoint = NewBB;
626 BranchBB->replaceSuccessor(DestBB, NewBB);
627 NewBB->addSuccessor(DestBB);
629 DestBB = NewBB;