Lines Matching defs:BI

361       auto *BI = dyn_cast<BranchInst>(BB.getTerminator());
362 if (BI && BI->isUnconditional()) {
363 BasicBlock *Succ = BI->getSuccessor(0);
977 if (BranchInst *BI = dyn_cast<BranchInst>(Terminator)) {
979 if (BI->isUnconditional()) return false;
980 Condition = BI->getCondition();
1147 auto *BI = dyn_cast<BranchInst>(BB->getTerminator());
1148 if (!BI || !BI->isConditional())
1151 Value *Cond = BI->getCondition();
1189 BasicBlock *KeepSucc = BI->getSuccessor(*Implication ? 0 : 1);
1190 BasicBlock *RemoveSucc = BI->getSuccessor(*Implication ? 1 : 0);
1192 BranchInst *UncondBI = BranchInst::Create(KeepSucc, BI->getIterator());
1193 UncondBI->setDebugLoc(BI->getDebugLoc());
1195 BI->eraseFromParent();
1589 else if (BranchInst *BI = dyn_cast<BranchInst>(BB->getTerminator())) {
1591 DestBB = BI->getSuccessor(cast<ConstantInt>(Val)->isZero());
1999 /// Clone instructions in range [BI, BE) to NewBB. For PHI nodes, we only clone
2004 BasicBlock::iterator BI,
2054 BasicBlock *RangeBB = BI->getParent();
2059 for (; PHINode *PN = dyn_cast<PHINode>(BI); ++BI) {
2071 identifyNoAliasScopesToClone(BI, BE, NoAliasScopes);
2083 for (; BI != BE; ++BI) {
2084 Instruction *New = BI->clone();
2085 New->setName(BI->getName());
2087 ValueMapping[&*BI] = New;
2090 CloneAndRemapDbgInfo(New, &*BI);
2675 BasicBlock::iterator BI = BB->begin();
2676 for (; PHINode *PN = dyn_cast<PHINode>(BI); ++BI)
2680 for (; BI != BB->end(); ++BI) {
2681 Instruction *New = BI->clone();
2701 ValueMapping[&*BI] = IV;
2707 OldPredBranch->cloneDebugInfoFrom(&*BI, std::nullopt, true);
2710 ValueMapping[&*BI] = New;
2714 New->setName(BI->getName());
2716 New->cloneDebugInfoFrom(&*BI);
2772 auto *BI = BranchInst::Create(NewBB, BB, SI->getCondition(), Pred);
2773 BI->applyMergedLocation(PredTerm->getDebugLoc(), SI->getDebugLoc());
2774 BI->copyMetadata(*SI, {LLVMContext::MD_prof});
2810 for (BasicBlock::iterator BI = BB->begin();
2811 PHINode *Phi = dyn_cast<PHINode>(BI); ++BI)
2924 for (BasicBlock::iterator BI = BB->begin();
2925 PHINode *PN = dyn_cast<PHINode>(BI); ++BI) {
3039 if (auto *BI = dyn_cast<BranchInst>(Parent->getTerminator()))
3041 if (isGuard(&I) && threadGuard(BB, cast<IntrinsicInst>(&I), BI))
3051 BranchInst *BI) {
3052 assert(BI->getNumSuccessors() == 2 && "Wrong number of successors?");
3053 assert(BI->isConditional() && "Unconditional branch has 2 successors?");
3055 Value *BranchCond = BI->getCondition();
3056 BasicBlock *TrueDest = BI->getSuccessor(0);
3057 BasicBlock *FalseDest = BI->getSuccessor(1);
3103 for (auto BI = BB->begin(); &*BI != AfterGuard; ++BI)
3104 if (!isa<PHINode>(&*BI))
3105 ToRemove.push_back(&*BI);