Lines Matching full:ibr
112 if (auto *IBr = dyn_cast<IndirectBrInst>(BB.getTerminator())) { in runImpl() local
115 if (IBr->getNumSuccessors() == 0) { in runImpl()
116 (void)new UnreachableInst(F.getContext(), IBr->getIterator()); in runImpl()
117 IBr->eraseFromParent(); in runImpl()
121 IndirectBrs.push_back(IBr); in runImpl()
122 for (BasicBlock *SuccBB : IBr->successors()) in runImpl()
181 for (auto *IBr : IndirectBrs) { in runImpl() local
183 for (BasicBlock *SuccBB : IBr->successors()) in runImpl()
184 Updates.push_back({DominatorTree::Delete, IBr->getParent(), SuccBB}); in runImpl()
186 (void)new UnreachableInst(F.getContext(), IBr->getIterator()); in runImpl()
187 IBr->eraseFromParent(); in runImpl()
202 for (auto *IBr : IndirectBrs) { in runImpl() local
204 cast<IntegerType>(DL.getIntPtrType(IBr->getAddress()->getType())); in runImpl()
209 auto GetSwitchValue = [CommonITy](IndirectBrInst *IBr) { in runImpl() argument
210 return CastInst::CreatePointerCast(IBr->getAddress(), CommonITy, in runImpl()
211 Twine(IBr->getAddress()->getName()) + in runImpl()
213 IBr->getIterator()); in runImpl()
221 IndirectBrInst *IBr = IndirectBrs[0]; in runImpl() local
222 SwitchBB = IBr->getParent(); in runImpl()
223 SwitchValue = GetSwitchValue(IBr); in runImpl()
226 for (BasicBlock *SuccBB : IBr->successors()) in runImpl()
227 Updates.push_back({DominatorTree::Delete, IBr->getParent(), SuccBB}); in runImpl()
231 IBr->eraseFromParent(); in runImpl()
245 for (auto *IBr : IndirectBrs) { in runImpl() local
246 SwitchPN->addIncoming(GetSwitchValue(IBr), IBr->getParent()); in runImpl()
247 BranchInst::Create(SwitchBB, IBr->getIterator()); in runImpl()
249 Updates.push_back({DominatorTree::Insert, IBr->getParent(), SwitchBB}); in runImpl()
250 for (BasicBlock *SuccBB : IBr->successors()) in runImpl()
251 Updates.push_back({DominatorTree::Delete, IBr->getParent(), SuccBB}); in runImpl()
253 IBr->eraseFromParent(); in runImpl()