Lines Matching refs:MBB
75 MachineBasicBlock *MBB = WL.pop_back_val(); in getMatchingEHPad() local
76 if (!Visited.insert(MBB).second) in getMatchingEHPad()
78 if (MBB->isEHPad()) { in getMatchingEHPad()
79 if (EHPad && EHPad != MBB) in getMatchingEHPad()
81 EHPad = MBB; in getMatchingEHPad()
84 if (MBB == &MF->front()) in getMatchingEHPad()
86 for (auto *Pred : MBB->predecessors()) in getMatchingEHPad()
100 MachineBasicBlock *MBB = WL.pop_back_val(); in eraseDeadBBsAndChildren() local
101 if (Deleted.count(MBB) || !MBB->pred_empty()) in eraseDeadBBsAndChildren()
103 SmallVector<MachineBasicBlock *, 4> Succs(MBB->successors()); in eraseDeadBBsAndChildren()
104 WL.append(MBB->succ_begin(), MBB->succ_end()); in eraseDeadBBsAndChildren()
106 MBB->removeSuccessor(Succ); in eraseDeadBBsAndChildren()
109 Deleted.insert(MBB); in eraseDeadBBsAndChildren()
110 MBB->eraseFromParent(); in eraseDeadBBsAndChildren()
141 for (auto &MBB : MF) in removeUnreachableEHPads() local
142 if (MBB.isEHPad() && MBB.pred_empty()) in removeUnreachableEHPads()
143 ToDelete.push_back(&MBB); in removeUnreachableEHPads()
153 for (auto &MBB : MF) { in recordCatchRetBBs() local
154 auto Pos = MBB.getFirstTerminator(); in recordCatchRetBBs()
155 if (Pos == MBB.end()) in recordCatchRetBBs()
159 CatchRetBBs.insert(&MBB); in recordCatchRetBBs()
178 for (auto &MBB : MF) in hoistCatches() local
179 for (auto &MI : MBB) in hoistCatches()
205 for (auto &MBB : MF) { in addCatchAlls() local
206 if (!MBB.isEHPad()) in addCatchAlls()
208 auto InsertPos = MBB.begin(); in addCatchAlls()
210 while (InsertPos != MBB.end() && InsertPos->isEHLabel()) in addCatchAlls()
214 if (InsertPos == MBB.end() || in addCatchAlls()
217 BuildMI(MBB, InsertPos, in addCatchAlls()
218 InsertPos == MBB.end() ? DebugLoc() : InsertPos->getDebugLoc(), in addCatchAlls()
231 for (auto &MBB : MF) { in replaceFuncletReturns() local
232 auto Pos = MBB.getFirstTerminator(); in replaceFuncletReturns()
233 if (Pos == MBB.end()) in replaceFuncletReturns()
241 if (!MBB.isLayoutSuccessor(TBB)) in replaceFuncletReturns()
242 BuildMI(MBB, TI, TI->getDebugLoc(), TII.get(WebAssembly::BR)) in replaceFuncletReturns()
279 BuildMI(MBB, TI, TI->getDebugLoc(), TII.get(WebAssembly::RETHROW)) in replaceFuncletReturns()
294 for (auto &MBB : MF) { in removeUnnecessaryUnreachables() local
295 for (auto &MI : MBB) { in removeUnnecessaryUnreachables()
305 MBB.erase(std::next(MI.getIterator()), MBB.end()); in removeUnnecessaryUnreachables()
306 SmallVector<MachineBasicBlock *, 8> Succs(MBB.successors()); in removeUnnecessaryUnreachables()
309 MBB.removeSuccessor(Succ); in removeUnnecessaryUnreachables()
327 for (auto &MBB : MF) { in restoreStackPointer() local
328 if (!MBB.isEHPad()) in restoreStackPointer()
338 auto InsertPos = MBB.begin(); in restoreStackPointer()
340 while (InsertPos != MBB.end() && InsertPos->isEHLabel()) in restoreStackPointer()
342 assert(InsertPos != MBB.end() && in restoreStackPointer()
346 FrameLowering->writeSPToGlobal(FrameLowering->getSPReg(MF), MF, MBB, in restoreStackPointer()
347 InsertPos, MBB.begin()->getDebugLoc()); in restoreStackPointer()