Lines Matching refs:MachineBasicBlock
12 #include "llvm/CodeGen/MachineBasicBlock.h"
68 unsigned postOffset(const MachineBasicBlock &MBB) const {
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 void adjustBlockOffsets(MachineBasicBlock &Start,
109 const MachineBasicBlock &BB) const;
113 uint64_t computeBlockSize(const MachineBasicBlock &MBB) const;
140 for (MachineBasicBlock &MBB : *MF) {
147 for (MachineBasicBlock &MBB : *MF) {
148 for (MachineBasicBlock::iterator J = MBB.getFirstTerminator();
155 MachineBasicBlock *DestBB = TII->getBranchDestBlock(MI);
188 for (MachineBasicBlock &MBB : *MF) {
206 BranchRelaxation::computeBlockSize(const MachineBasicBlock &MBB) const {
217 const MachineBasicBlock *MBB = MI.getParent();
225 for (MachineBasicBlock::const_iterator I = MBB->begin(); &*I != &MI; ++I) {
233 void BranchRelaxation::adjustBlockOffsets(MachineBasicBlock &Start) {
237 void BranchRelaxation::adjustBlockOffsets(MachineBasicBlock &Start,
251 /// Insert a new empty MachineBasicBlock and insert it after \p OrigMBB
252 MachineBasicBlock *
253 BranchRelaxation::createNewBlockAfter(MachineBasicBlock &OrigBB) {
257 /// Insert a new empty MachineBasicBlock with \p BB as its BasicBlock
259 MachineBasicBlock *
260 BranchRelaxation::createNewBlockAfter(MachineBasicBlock &OrigMBB,
263 MachineBasicBlock *NewBB = MF->CreateMachineBasicBlock(BB);
280 MachineBasicBlock *
282 MachineBasicBlock *DestBB) {
283 MachineBasicBlock *OrigBB = MI.getParent();
286 MachineBasicBlock *NewBB =
341 const MachineBasicBlock &DestBB) const {
345 const MachineBasicBlock *SrcBB = MI.getParent();
367 MachineBasicBlock *MBB = MI.getParent();
368 MachineBasicBlock *TBB = nullptr, *FBB = nullptr;
369 MachineBasicBlock *NewBB = nullptr;
372 auto insertUncondBranch = [&](MachineBasicBlock *MBB,
373 MachineBasicBlock *DestBB) {
379 auto insertBranch = [&](MachineBasicBlock *MBB, MachineBasicBlock *TBB,
380 MachineBasicBlock *FBB,
387 auto removeBranch = [&](MachineBasicBlock *MBB) {
395 auto updateOffsetAndLiveness = [&](MachineBasicBlock *NewBB) {
499 MachineBasicBlock &NextBB = *std::next(MachineFunction::iterator(MBB));
552 MachineBasicBlock *MBB = MI.getParent();
555 MachineBasicBlock *DestBB = TII->getBranchDestBlock(MI);
567 MachineBasicBlock *BranchBB = MBB;
575 for (const MachineBasicBlock *Succ : MBB->successors()) {
576 for (const MachineBasicBlock::RegisterMaskPair &LiveIn : Succ->liveins())
593 MachineBasicBlock *RestoreBB =
616 MachineBasicBlock *NewBB = createNewBlockAfter(*TrampolineInsertionPoint);
639 MachineBasicBlock *PrevBB = &*std::prev(DestBB->getIterator());
678 for (MachineBasicBlock &MBB : *MF) {
680 MachineBasicBlock::iterator Last = MBB.getLastNonDebugInstr();
692 if (MachineBasicBlock *DestBB = TII->getBranchDestBlock(*Last)) {
703 MachineBasicBlock::iterator Next;
704 for (MachineBasicBlock::iterator J = MBB.getFirstTerminator();
717 MachineBasicBlock *DestBB = TII->getBranchDestBlock(MI);