Lines Matching refs:Succ

192       for (BasicBlock *Succ : SI->successors()) {
194 if (Succ == TheOnlyDest)
197 Succ->removePredecessor(BB);
606 /// almost-empty BB ending in an unconditional branch to Succ, into Succ.
608 /// Assumption: Succ is the single successor for BB.
610 static bool CanPropagatePredecessorsForPHIs(BasicBlock *BB, BasicBlock *Succ) {
611 assert(*succ_begin(BB) == Succ && "Succ is not successor of BB!");
614 << Succ->getName() << "\n");
617 if (Succ->getSinglePredecessor()) return true;
622 // Look at all the phi nodes in Succ, to see if they present a conflict when
624 for (BasicBlock::iterator I = Succ->begin(); isa<PHINode>(I); ++I) {
638 << Succ->getName() << " is conflicting with "
654 << Succ->getName() << " is conflicting with regard to common "
767 // Note that, since we are merging phi nodes and BB and Succ might
808 BasicBlock *Succ = cast<BranchInst>(BB->getTerminator())->getSuccessor(0);
809 if (BB == Succ) return false;
812 // phi nodes in BB or Succ. If not, we can safely merge.
813 if (!CanPropagatePredecessorsForPHIs(BB, Succ)) return false;
815 // Check for cases where Succ has multiple predecessors and a PHI node in BB
818 // BB dominates Succ, which is non-trivial to calculate in the case where
819 // Succ has multiple predecessors. Also, it requires checking whether
824 // Note that if this check finds a live use, BB dominates Succ, so BB is
827 if (!Succ->getSinglePredecessor()) {
844 if (isa<PHINode>(Succ->begin())) {
851 for (BasicBlock::iterator I = Succ->begin(); isa<PHINode>(I); ++I) {
858 if (Succ->getSinglePredecessor()) {
859 // BB is the only predecessor of Succ, so Succ will end up with exactly
864 Succ->getInstList().splice(Succ->getFirstNonPHI()->getIterator(),
874 // Everything that jumped to BB now goes to Succ.
875 BB->replaceAllUsesWith(Succ);
876 if (!Succ->hasName()) Succ->takeName(BB);