Lines Matching refs:MachineBasicBlock

68     unsigned postOffset(const MachineBasicBlock &MBB) const {  in postOffset()
85 MachineBasicBlock *TrampolineInsertionPoint = nullptr;
86 SmallDenseSet<std::pair<MachineBasicBlock *, MachineBasicBlock *>>
99 MachineBasicBlock *createNewBlockAfter(MachineBasicBlock &OrigMBB);
100 MachineBasicBlock *createNewBlockAfter(MachineBasicBlock &OrigMBB,
103 MachineBasicBlock *splitBlockBeforeInstr(MachineInstr &MI,
104 MachineBasicBlock *DestBB);
105 void adjustBlockOffsets(MachineBasicBlock &Start);
106 bool isBlockInRange(const MachineInstr &MI, const MachineBasicBlock &BB) const;
110 uint64_t computeBlockSize(const MachineBasicBlock &MBB) const;
137 for (MachineBasicBlock &MBB : *MF) { in INITIALIZE_PASS()
144 for (MachineBasicBlock &MBB : *MF) { in INITIALIZE_PASS()
145 for (MachineBasicBlock::iterator J = MBB.getFirstTerminator(); in INITIALIZE_PASS()
152 MachineBasicBlock *DestBB = TII->getBranchDestBlock(MI); in INITIALIZE_PASS()
185 for (MachineBasicBlock &MBB : *MF) { in scanFunction()
202 uint64_t BranchRelaxation::computeBlockSize(const MachineBasicBlock &MBB) const { in computeBlockSize()
213 const MachineBasicBlock *MBB = MI.getParent(); in getInstrOffset()
221 for (MachineBasicBlock::const_iterator I = MBB->begin(); &*I != &MI; ++I) { in getInstrOffset()
229 void BranchRelaxation::adjustBlockOffsets(MachineBasicBlock &Start) { in adjustBlockOffsets()
243 MachineBasicBlock *
244 BranchRelaxation::createNewBlockAfter(MachineBasicBlock &OrigBB) { in createNewBlockAfter()
250 MachineBasicBlock *
251 BranchRelaxation::createNewBlockAfter(MachineBasicBlock &OrigMBB, in createNewBlockAfter()
254 MachineBasicBlock *NewBB = MF->CreateMachineBasicBlock(BB); in createNewBlockAfter()
271 MachineBasicBlock *
273 MachineBasicBlock *DestBB) { in splitBlockBeforeInstr()
274 MachineBasicBlock *OrigBB = MI.getParent(); in splitBlockBeforeInstr()
277 MachineBasicBlock *NewBB = in splitBlockBeforeInstr()
332 const MachineInstr &MI, const MachineBasicBlock &DestBB) const { in isBlockInRange()
336 const MachineBasicBlock *SrcBB = MI.getParent(); in isBlockInRange()
358 MachineBasicBlock *MBB = MI.getParent(); in fixupConditionalBranch()
359 MachineBasicBlock *TBB = nullptr, *FBB = nullptr; in fixupConditionalBranch()
360 MachineBasicBlock *NewBB = nullptr; in fixupConditionalBranch()
363 auto insertUncondBranch = [&](MachineBasicBlock *MBB, in fixupConditionalBranch()
364 MachineBasicBlock *DestBB) { in fixupConditionalBranch()
370 auto insertBranch = [&](MachineBasicBlock *MBB, MachineBasicBlock *TBB, in fixupConditionalBranch()
371 MachineBasicBlock *FBB, in fixupConditionalBranch()
378 auto removeBranch = [&](MachineBasicBlock *MBB) { in fixupConditionalBranch()
385 auto finalizeBlockChanges = [&](MachineBasicBlock *MBB, in fixupConditionalBranch()
386 MachineBasicBlock *NewBB) { in fixupConditionalBranch()
484 MachineBasicBlock &NextBB = *std::next(MachineFunction::iterator(MBB)); in fixupConditionalBranch()
539 MachineBasicBlock *MBB = MI.getParent(); in fixupUnconditionalBranch()
542 MachineBasicBlock *DestBB = TII->getBranchDestBlock(MI); in fixupUnconditionalBranch()
554 MachineBasicBlock *BranchBB = MBB; in fixupUnconditionalBranch()
562 for (const MachineBasicBlock *Succ : MBB->successors()) { in fixupUnconditionalBranch()
563 for (const MachineBasicBlock::RegisterMaskPair &LiveIn : Succ->liveins()) in fixupUnconditionalBranch()
580 MachineBasicBlock *RestoreBB = createNewBlockAfter(MF->back(), in fixupUnconditionalBranch()
601 MachineBasicBlock *NewBB = createNewBlockAfter(*TrampolineInsertionPoint); in fixupUnconditionalBranch()
622 MachineBasicBlock *PrevBB = &*std::prev(DestBB->getIterator()); in fixupUnconditionalBranch()
661 for (MachineBasicBlock &MBB : *MF) { in relaxBranchInstructions()
663 MachineBasicBlock::iterator Last = MBB.getLastNonDebugInstr(); in relaxBranchInstructions()
675 if (MachineBasicBlock *DestBB = TII->getBranchDestBlock(*Last)) { in relaxBranchInstructions()
686 MachineBasicBlock::iterator Next; in relaxBranchInstructions()
687 for (MachineBasicBlock::iterator J = MBB.getFirstTerminator(); in relaxBranchInstructions()
700 MachineBasicBlock *DestBB = TII->getBranchDestBlock(MI); in relaxBranchInstructions()