Lines Matching refs:MachineBasicBlock
67 unsigned postOffset(const MachineBasicBlock &MBB) const { in postOffset()
91 MachineBasicBlock *createNewBlockAfter(MachineBasicBlock &BB);
93 MachineBasicBlock *splitBlockBeforeInstr(MachineInstr &MI,
94 MachineBasicBlock *DestBB);
95 void adjustBlockOffsets(MachineBasicBlock &Start);
96 bool isBlockInRange(const MachineInstr &MI, const MachineBasicBlock &BB) const;
100 uint64_t computeBlockSize(const MachineBasicBlock &MBB) const;
127 for (MachineBasicBlock &MBB : *MF) { in INITIALIZE_PASS()
157 for (MachineBasicBlock &MBB : *MF) in scanFunction()
165 uint64_t BranchRelaxation::computeBlockSize(const MachineBasicBlock &MBB) const { in computeBlockSize()
176 const MachineBasicBlock *MBB = MI.getParent(); in getInstrOffset()
184 for (MachineBasicBlock::const_iterator I = MBB->begin(); &*I != &MI; ++I) { in getInstrOffset()
192 void BranchRelaxation::adjustBlockOffsets(MachineBasicBlock &Start) { in adjustBlockOffsets()
206 MachineBasicBlock *BranchRelaxation::createNewBlockAfter(MachineBasicBlock &BB) { in createNewBlockAfter()
208 MachineBasicBlock *NewBB = in createNewBlockAfter()
221 MachineBasicBlock *BranchRelaxation::splitBlockBeforeInstr(MachineInstr &MI, in splitBlockBeforeInstr()
222 MachineBasicBlock *DestBB) { in splitBlockBeforeInstr()
223 MachineBasicBlock *OrigBB = MI.getParent(); in splitBlockBeforeInstr()
226 MachineBasicBlock *NewBB = in splitBlockBeforeInstr()
276 const MachineInstr &MI, const MachineBasicBlock &DestBB) const { in isBlockInRange()
297 MachineBasicBlock *MBB = MI.getParent(); in fixupConditionalBranch()
298 MachineBasicBlock *TBB = nullptr, *FBB = nullptr; in fixupConditionalBranch()
299 MachineBasicBlock *NewBB = nullptr; in fixupConditionalBranch()
302 auto insertUncondBranch = [&](MachineBasicBlock *MBB, in fixupConditionalBranch()
303 MachineBasicBlock *DestBB) { in fixupConditionalBranch()
309 auto insertBranch = [&](MachineBasicBlock *MBB, MachineBasicBlock *TBB, in fixupConditionalBranch()
310 MachineBasicBlock *FBB, in fixupConditionalBranch()
317 auto removeBranch = [&](MachineBasicBlock *MBB) { in fixupConditionalBranch()
324 auto finalizeBlockChanges = [&](MachineBasicBlock *MBB, in fixupConditionalBranch()
325 MachineBasicBlock *NewBB) { in fixupConditionalBranch()
379 MachineBasicBlock &NextBB = *std::next(MachineFunction::iterator(MBB)); in fixupConditionalBranch()
434 MachineBasicBlock *MBB = MI.getParent(); in fixupUnconditionalBranch()
437 MachineBasicBlock *DestBB = TII->getBranchDestBlock(MI); in fixupUnconditionalBranch()
446 MachineBasicBlock *BranchBB = MBB; in fixupUnconditionalBranch()
454 for (const MachineBasicBlock *Succ : MBB->successors()) { in fixupUnconditionalBranch()
455 for (const MachineBasicBlock::RegisterMaskPair &LiveIn : Succ->liveins()) in fixupUnconditionalBranch()
479 MachineBasicBlock &MBB = *I; in relaxBranchInstructions()
482 MachineBasicBlock::iterator Last = MBB.getLastNonDebugInstr(); in relaxBranchInstructions()
494 if (MachineBasicBlock *DestBB = TII->getBranchDestBlock(*Last)) { in relaxBranchInstructions()
504 MachineBasicBlock::iterator Next; in relaxBranchInstructions()
505 for (MachineBasicBlock::iterator J = MBB.getFirstTerminator(); in relaxBranchInstructions()
518 MachineBasicBlock *DestBB = TII->getBranchDestBlock(MI); in relaxBranchInstructions()