reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
1392 MachineFunction &MF = *MBB->getParent(); 1395 MachineFunction::iterator FallThrough = MBB->getIterator(); 1401 auto MBBEHScope = EHScopeMembership.find(MBB); 1412 if (IsEmptyBlock(MBB) && !MBB->isEHPad() && !MBB->hasAddressTaken() && 1412 if (IsEmptyBlock(MBB) && !MBB->isEHPad() && !MBB->hasAddressTaken() && 1412 if (IsEmptyBlock(MBB) && !MBB->isEHPad() && !MBB->hasAddressTaken() && 1414 salvageDebugInfoFromEmptyBlock(TII, *MBB); 1416 if (MBB->pred_empty()) return MadeChange; 1425 } else if (MBB->isSuccessor(&*FallThrough)) { 1428 while (!MBB->pred_empty()) { 1429 MachineBasicBlock *Pred = *(MBB->pred_end()-1); 1430 Pred->ReplaceUsesOfBlockWith(MBB, &*FallThrough); 1435 MJTI->ReplaceMBBInJumpTables(MBB, &*FallThrough); 1443 MachineBasicBlock &PrevBB = *std::prev(MachineFunction::iterator(MBB)); 1461 if (PriorTBB != MBB) 1475 if (PriorCond.empty() && !PriorTBB && MBB->pred_size() == 1 && 1477 !MBB->hasAddressTaken() && !MBB->isEHPad()) { 1477 !MBB->hasAddressTaken() && !MBB->isEHPad()) { 1479 << "From MBB: " << *MBB); 1484 MachineBasicBlock::iterator MBBIter = MBB->begin(); 1487 while (PrevBBIter != PrevBB.begin() && MBBIter != MBB->end() 1496 PrevBB.splice(PrevBB.end(), MBB, MBB->begin(), MBB->end()); 1496 PrevBB.splice(PrevBB.end(), MBB, MBB->begin(), MBB->end()); 1496 PrevBB.splice(PrevBB.end(), MBB, MBB->begin(), MBB->end()); 1499 PrevBB.transferSuccessors(MBB); 1506 if (PriorTBB == MBB && !PriorFBB) { 1515 if (PriorFBB == MBB) { 1527 if (PriorTBB == MBB) { 1547 if (MBB->succ_empty() && !PriorCond.empty() && !PriorFBB && 1549 !MBB->canFallThrough()) { 1558 !IsBetterFallthrough(PriorTBB, MBB)) 1565 LLVM_DEBUG(dbgs() << "\nMoving MBB: " << *MBB 1570 TII->insertBranch(PrevBB, MBB, nullptr, NewPriorCond, dl); 1573 MBB->moveAfter(&MF.back()); 1582 if (!IsEmptyBlock(MBB) && MBB->pred_size() == 1 && 1582 if (!IsEmptyBlock(MBB) && MBB->pred_size() == 1 && 1587 MachineInstr &TailCall = *MBB->getFirstNonDebugInstr(); 1589 MachineBasicBlock *Pred = *MBB->pred_begin(); 1595 if (PredAnalyzable && !PredCond.empty() && PredTBB == MBB && 1606 Pred->removeSuccessor(MBB); 1623 TII->analyzeBranch(*MBB, CurTBB, CurFBB, CurCond, true); 1626 MadeChange |= MBB->CorrectExtraCFGEdges(CurTBB, CurFBB, !CurCond.empty()); 1633 if (CurTBB && CurFBB && CurFBB == MBB && CurTBB != MBB) { 1633 if (CurTBB && CurFBB && CurFBB == MBB && CurTBB != MBB) { 1636 DebugLoc dl = getBranchDebugLoc(*MBB); 1637 TII->removeBranch(*MBB); 1638 TII->insertBranch(*MBB, CurFBB, CurTBB, NewCond, dl); 1648 IsBranchOnlyBlock(MBB) && CurTBB != MBB && 1648 IsBranchOnlyBlock(MBB) && CurTBB != MBB && 1649 !MBB->hasAddressTaken() && !MBB->isEHPad()) { 1649 !MBB->hasAddressTaken() && !MBB->isEHPad()) { 1650 DebugLoc dl = getBranchDebugLoc(*MBB); 1654 TII->removeBranch(*MBB); 1658 if (IsEmptyBlock(MBB)) { 1661 MBB->erase(MBB->begin(), MBB->end()); 1661 MBB->erase(MBB->begin(), MBB->end()); 1661 MBB->erase(MBB->begin(), MBB->end()); 1668 if (MBB->empty()) { 1671 !PrevBB.isSuccessor(MBB)) { 1674 if (!PredHasNoFallThrough && PrevBB.isSuccessor(MBB) && 1675 PriorTBB != MBB && PriorFBB != MBB) { 1675 PriorTBB != MBB && PriorFBB != MBB) { 1679 PriorTBB = MBB; 1682 PriorFBB = MBB; 1693 while(PI != MBB->pred_size()) { 1694 MachineBasicBlock *PMBB = *(MBB->pred_begin() + PI); 1695 if (PMBB == MBB) { 1701 PMBB->ReplaceUsesOfBlockWith(MBB, CurTBB); 1723 MJTI->ReplaceMBBInJumpTables(MBB, CurTBB); 1733 TII->insertBranch(*MBB, CurTBB, nullptr, CurCond, dl); 1743 bool CurFallsThru = MBB->canFallThrough(); 1745 if (!MBB->isEHPad()) { 1748 for (MachineBasicBlock *PredBB : MBB->predecessors()) { 1752 if (PredBB != MBB && !PredBB->canFallThrough() && 1755 (!CurFallsThru || MBB->getNumber() >= PredBB->getNumber())) { 1767 MachineBasicBlock *NextBB = &*std::next(MBB->getIterator()); 1769 TII->insertBranch(*MBB, NextBB, nullptr, CurCond, DebugLoc()); 1771 MBB->moveAfter(PredBB); 1780 for (MachineBasicBlock *SuccBB : MBB->successors()) { 1788 if (SuccBB != MBB && &*SuccPrev != MBB && 1788 if (SuccBB != MBB && &*SuccPrev != MBB && 1791 MBB->moveBefore(SuccBB); 1817 MBB->moveAfter(&MF.back());