Lines Matching refs:MBB
68 bool EliminatePHINodes(MachineFunction &MF, MachineBasicBlock &MBB);
69 void LowerPHINode(MachineBasicBlock &MBB,
81 bool SplitPHIEdges(MachineFunction &MF, MachineBasicBlock &MBB,
86 bool isLiveIn(unsigned Reg, MachineBasicBlock *MBB);
87 bool isLiveOutPastPHIs(unsigned Reg, MachineBasicBlock *MBB);
183 MachineBasicBlock &MBB) { in EliminatePHINodes() argument
184 if (MBB.empty() || !MBB.front().isPHI()) in EliminatePHINodes()
190 std::prev(MBB.SkipPHIsAndLabels(MBB.begin())); in EliminatePHINodes()
192 while (MBB.front().isPHI()) in EliminatePHINodes()
193 LowerPHINode(MBB, LastPHIIt); in EliminatePHINodes()
221 void PHIElimination::LowerPHINode(MachineBasicBlock &MBB, in LowerPHINode() argument
228 MachineInstr *MPhi = MBB.remove(MBB.begin()); in LowerPHINode()
236 MachineFunction &MF = *MBB.getParent(); in LowerPHINode()
247 BuildMI(MBB, AfterPHIsIt, MPhi->getDebugLoc(), in LowerPHINode()
263 BuildMI(MBB, AfterPHIsIt, MPhi->getDebugLoc(), in LowerPHINode()
282 if (MachineInstr *OldKill = VI.findKill(&MBB)) { in LowerPHINode()
285 DEBUG(MBB.dump()); in LowerPHINode()
312 SlotIndex MBBStartIndex = LIS->getMBBStartIdx(&MBB); in LowerPHINode()
378 findPHICopyInsertPoint(&opBlock, &MBB, SrcReg); in LowerPHINode()
535 for (const auto &MBB : MF) in analyzePHINodes() local
536 for (const auto &BBI : MBB) { in analyzePHINodes()
546 MachineBasicBlock &MBB, in SplitPHIEdges() argument
548 if (MBB.empty() || !MBB.front().isPHI() || MBB.isLandingPad()) in SplitPHIEdges()
551 const MachineLoop *CurLoop = MLI ? MLI->getLoopFor(&MBB) : nullptr; in SplitPHIEdges()
552 bool IsLoopHeader = CurLoop && &MBB == CurLoop->getHeader(); in SplitPHIEdges()
555 for (MachineBasicBlock::iterator BBI = MBB.begin(), BBE = MBB.end(); in SplitPHIEdges()
566 if (PreMBB == &MBB && !SplitAllCriticalEdges) in SplitPHIEdges()
582 << PreMBB->getNumber() << " -> BB#" << MBB.getNumber() in SplitPHIEdges()
593 bool ShouldSplit = !isLiveIn(Reg, &MBB) || SplitAllCriticalEdges; in SplitPHIEdges()
610 if (!PreMBB->SplitCriticalEdge(&MBB, this)) { in SplitPHIEdges()
621 bool PHIElimination::isLiveIn(unsigned Reg, MachineBasicBlock *MBB) { in isLiveIn() argument
625 return LIS->isLiveInToMBB(LIS->getInterval(Reg), MBB); in isLiveIn()
627 return LV->isLiveIn(Reg, *MBB); in isLiveIn()
630 bool PHIElimination::isLiveOutPastPHIs(unsigned Reg, MachineBasicBlock *MBB) { in isLiveOutPastPHIs() argument
640 for (MachineBasicBlock::succ_iterator SI = MBB->succ_begin(), in isLiveOutPastPHIs()
641 SE = MBB->succ_end(); SI != SE; ++SI) { in isLiveOutPastPHIs()
647 return LV->isLiveOut(Reg, *MBB); in isLiveOutPastPHIs()