Lines Matching refs:IBI

129   bool SimplifyIndirectBr(IndirectBrInst *IBI);
514 } else if (IndirectBrInst *IBI = dyn_cast<IndirectBrInst>(TI)) { in EraseTerminatorInstAndDCECond() local
515 Cond = dyn_cast<Instruction>(IBI->getAddress()); in EraseTerminatorInstAndDCECond()
2667 static bool SimplifyIndirectBrOnSelect(IndirectBrInst *IBI, SelectInst *SI) { in SimplifyIndirectBrOnSelect() argument
2679 return SimplifyTerminatorOnSelect(IBI, SI->getCondition(), TrueBB, FalseBB, in SimplifyIndirectBrOnSelect()
4315 bool SimplifyCFGOpt::SimplifyIndirectBr(IndirectBrInst *IBI) { in SimplifyIndirectBr() argument
4316 BasicBlock *BB = IBI->getParent(); in SimplifyIndirectBr()
4321 for (unsigned i = 0, e = IBI->getNumDestinations(); i != e; ++i) { in SimplifyIndirectBr()
4322 BasicBlock *Dest = IBI->getDestination(i); in SimplifyIndirectBr()
4325 IBI->removeDestination(i); in SimplifyIndirectBr()
4331 if (IBI->getNumDestinations() == 0) { in SimplifyIndirectBr()
4333 new UnreachableInst(IBI->getContext(), IBI); in SimplifyIndirectBr()
4334 EraseTerminatorInstAndDCECond(IBI); in SimplifyIndirectBr()
4338 if (IBI->getNumDestinations() == 1) { in SimplifyIndirectBr()
4340 BranchInst::Create(IBI->getDestination(0), IBI); in SimplifyIndirectBr()
4341 EraseTerminatorInstAndDCECond(IBI); in SimplifyIndirectBr()
4345 if (SelectInst *SI = dyn_cast<SelectInst>(IBI->getAddress())) { in SimplifyIndirectBr()
4346 if (SimplifyIndirectBrOnSelect(IBI, SI)) in SimplifyIndirectBr()
4681 } else if (IndirectBrInst *IBI = in run() local
4683 if (SimplifyIndirectBr(IBI)) return true; in run()