Home | History | Annotate | Download | only in Utils

Lines Matching refs:Succ

177         BasicBlock *Succ = SI->getSuccessor(i);
178 if (Succ == TheOnlyDest)
181 Succ->removePredecessor(BB);
536 /// almost-empty BB ending in an unconditional branch to Succ, into succ.
538 /// Assumption: Succ is the single successor for BB.
540 static bool CanPropagatePredecessorsForPHIs(BasicBlock *BB, BasicBlock *Succ) {
541 assert(*succ_begin(BB) == Succ && "Succ is not successor of BB!");
544 << Succ->getName() << "\n");
547 if (Succ->getSinglePredecessor()) return true;
552 // Look at all the phi nodes in Succ, to see if they present a conflict when
554 for (BasicBlock::iterator I = Succ->begin(); isa<PHINode>(I); ++I) {
568 << Succ->getName() << " is conflicting with "
584 << Succ->getName() << " is conflicting with regard to common "
697 // Note that, since we are merging phi nodes and BB and Succ might
738 BasicBlock *Succ = cast<BranchInst>(BB->getTerminator())->getSuccessor(0);
739 if (BB == Succ) return false;
742 // phi nodes in BB or Succ. If not, we can safely merge.
743 if (!CanPropagatePredecessorsForPHIs(BB, Succ)) return false;
745 // Check for cases where Succ has multiple predecessors and a PHI node in BB
748 // BB dominates Succ, which is non-trivial to calculate in the case where
749 // Succ has multiple predecessors. Also, it requires checking whether
754 // Note that if this check finds a live use, BB dominates Succ, so BB is
757 if (!Succ->getSinglePredecessor()) {
775 if (isa<PHINode>(Succ->begin())) {
776 // If there is more than one pred of succ, and there are PHI nodes in
782 for (BasicBlock::iterator I = Succ->begin(); isa<PHINode>(I); ++I) {
789 if (Succ->getSinglePredecessor()) {
790 // BB is the only predecessor of Succ, so Succ will end up with exactly
795 Succ->getInstList().splice(Succ->getFirstNonPHI(), BB->getInstList());
804 // Everything that jumped to BB now goes to Succ.
805 BB->replaceAllUsesWith(Succ);
806 if (!Succ->hasName()) Succ->takeName(BB);