• Home
  • Raw
  • Download

Lines Matching refs:TailBB

304     MachineInstr *MI, MachineBasicBlock *TailBB, MachineBasicBlock *PredBB,  in processPHI()  argument
320 if (isDefLiveOut(DefReg, TailBB, MRI) || RegsUsedByPhi.count(DefReg)) in processPHI()
336 MachineInstr *MI, MachineBasicBlock *TailBB, MachineBasicBlock *PredBB, in duplicateInstruction() argument
354 if (isDefLiveOut(Reg, TailBB, MRI) || UsedByPhi.count(Reg)) in duplicateInstruction()
508 MachineBasicBlock &TailBB) { in shouldTailDuplicate() argument
510 if (TailBB.canFallThrough()) in shouldTailDuplicate()
514 if (TailBB.isSuccessor(&TailBB)) in shouldTailDuplicate()
535 if (!TailBB.empty()) in shouldTailDuplicate()
536 HasIndirectbr = TailBB.back().isIndirectBranch(); in shouldTailDuplicate()
544 for (MachineInstr &MI : TailBB) { in shouldTailDuplicate()
582 for (auto SB : TailBB.successors()) { in shouldTailDuplicate()
586 unsigned Idx = getPHISrcRegOpIdx(&I, &TailBB); in shouldTailDuplicate()
603 return canCompletelyDuplicateBB(TailBB); in shouldTailDuplicate()
607 bool TailDuplicator::isSimpleBB(MachineBasicBlock *TailBB) { in isSimpleBB() argument
608 if (TailBB->succ_size() != 1) in isSimpleBB()
610 if (TailBB->pred_empty()) in isSimpleBB()
612 MachineBasicBlock::iterator I = TailBB->getFirstNonDebugInstr(); in isSimpleBB()
613 if (I == TailBB->end()) in isSimpleBB()
644 MachineBasicBlock *TailBB, SmallVectorImpl<MachineBasicBlock *> &TDBBs, in duplicateSimpleBB() argument
647 SmallPtrSet<MachineBasicBlock *, 8> Succs(TailBB->succ_begin(), in duplicateSimpleBB()
648 TailBB->succ_end()); in duplicateSimpleBB()
649 SmallVector<MachineBasicBlock *, 8> Preds(TailBB->pred_begin(), in duplicateSimpleBB()
650 TailBB->pred_end()); in duplicateSimpleBB()
670 << "From simple Succ: " << *TailBB); in duplicateSimpleBB()
672 MachineBasicBlock *NewTarget = *TailBB->succ_begin(); in duplicateSimpleBB()
686 if (PredFBB == TailBB) in duplicateSimpleBB()
688 if (PredTBB == TailBB) in duplicateSimpleBB()
706 PredBB->replaceSuccessor(TailBB, NewTarget); in duplicateSimpleBB()
708 PredBB->removeSuccessor(TailBB, true); in duplicateSimpleBB()
723 MachineBasicBlock *TailBB, in tailDuplicate() argument
726 DEBUG(dbgs() << "\n*** Tail-duplicating BB#" << TailBB->getNumber() << '\n'); in tailDuplicate()
729 getRegsUsedByPHIs(*TailBB, &UsedByPhi); in tailDuplicate()
732 return duplicateSimpleBB(TailBB, TDBBs, UsedByPhi, Copies); in tailDuplicate()
738 SmallSetVector<MachineBasicBlock *, 8> Preds(TailBB->pred_begin(), in tailDuplicate()
739 TailBB->pred_end()); in tailDuplicate()
745 assert(TailBB != PredBB && in tailDuplicate()
758 if (PredBB->isLayoutSuccessor(TailBB) && PredBB->canFallThrough()) in tailDuplicate()
762 << "From Succ: " << *TailBB); in tailDuplicate()
774 MachineBasicBlock::instr_iterator I = TailBB->instr_begin(); in tailDuplicate()
775 while (I != TailBB->instr_end()) { in tailDuplicate()
781 processPHI(MI, TailBB, PredBB, LocalVRMap, CopyInfos, UsedByPhi, true); in tailDuplicate()
785 duplicateInstruction(MI, TailBB, PredBB, MF, LocalVRMap, UsedByPhi); in tailDuplicate()
793 NumTailDupAdded += TailBB->size() - 1; // subtract one for removed branch in tailDuplicate()
799 for (MachineBasicBlock::succ_iterator I = TailBB->succ_begin(), in tailDuplicate()
800 E = TailBB->succ_end(); in tailDuplicate()
802 PredBB->addSuccessor(*I, MBPI->getEdgeProbability(TailBB, I)); in tailDuplicate()
811 MachineBasicBlock *PrevBB = &*std::prev(TailBB->getIterator()); in tailDuplicate()
818 PriorCond.empty() && !PriorTBB && TailBB->pred_size() == 1 && in tailDuplicate()
819 !TailBB->hasAddressTaken()) { in tailDuplicate()
821 << "From MBB: " << *TailBB); in tailDuplicate()
825 MachineBasicBlock::iterator I = TailBB->begin(); in tailDuplicate()
827 while (I != TailBB->end() && I->isPHI()) { in tailDuplicate()
831 processPHI(MI, TailBB, PrevBB, LocalVRMap, CopyInfos, UsedByPhi, true); in tailDuplicate()
835 while (I != TailBB->end()) { in tailDuplicate()
840 duplicateInstruction(MI, TailBB, PrevBB, MF, LocalVRMap, UsedByPhi); in tailDuplicate()
846 PrevBB->splice(PrevBB->end(), TailBB, TailBB->begin(), TailBB->end()); in tailDuplicate()
850 PrevBB->transferSuccessors(TailBB); in tailDuplicate()
890 MachineBasicBlock::iterator I = TailBB->begin(); in tailDuplicate()
892 while (I != TailBB->end() && I->isPHI()) { in tailDuplicate()
896 processPHI(MI, TailBB, PredBB, LocalVRMap, CopyInfos, UsedByPhi, false); in tailDuplicate()