Lines Matching refs:IBI
106 bool SimplifyIndirectBr(IndirectBrInst *IBI);
453 } else if (IndirectBrInst *IBI = dyn_cast<IndirectBrInst>(TI)) {
454 Cond = dyn_cast<Instruction>(IBI->getAddress());
2567 static bool SimplifyIndirectBrOnSelect(IndirectBrInst *IBI, SelectInst *SI) {
2579 return SimplifyTerminatorOnSelect(IBI, SI->getCondition(), TrueBB, FalseBB,
3826 bool SimplifyCFGOpt::SimplifyIndirectBr(IndirectBrInst *IBI) {
3827 BasicBlock *BB = IBI->getParent();
3832 for (unsigned i = 0, e = IBI->getNumDestinations(); i != e; ++i) {
3833 BasicBlock *Dest = IBI->getDestination(i);
3836 IBI->removeDestination(i);
3842 if (IBI->getNumDestinations() == 0) {
3844 new UnreachableInst(IBI->getContext(), IBI);
3845 EraseTerminatorInstAndDCECond(IBI);
3849 if (IBI->getNumDestinations() == 1) {
3851 BranchInst::Create(IBI->getDestination(0), IBI);
3852 EraseTerminatorInstAndDCECond(IBI);
3856 if (SelectInst *SI = dyn_cast<SelectInst>(IBI->getAddress())) {
3857 if (SimplifyIndirectBrOnSelect(IBI, SI))
4106 } else if (IndirectBrInst *IBI =
4108 if (SimplifyIndirectBr(IBI)) return true;