Lines Matching refs:SuccToSinkTo
61 bool IsAcceptableTarget(Instruction *Inst, BasicBlock *SuccToSinkTo) const;
189 BasicBlock *SuccToSinkTo) const { in IsAcceptableTarget()
191 assert(SuccToSinkTo && "Candidate sink target is null"); in IsAcceptableTarget()
195 if (Inst->getParent() == SuccToSinkTo) in IsAcceptableTarget()
200 if (SuccToSinkTo->getTerminator()->isExceptional()) in IsAcceptableTarget()
207 if (SuccToSinkTo->getUniquePredecessor() != Inst->getParent()) { in IsAcceptableTarget()
215 if (!DT->dominates(Inst->getParent(), SuccToSinkTo)) in IsAcceptableTarget()
219 Loop *succ = LI->getLoopFor(SuccToSinkTo); in IsAcceptableTarget()
227 return AllUsesDominatedByBlock(Inst, SuccToSinkTo); in IsAcceptableTarget()
255 BasicBlock *SuccToSinkTo = nullptr; in SinkInstruction() local
262 I != E && SuccToSinkTo == nullptr; ++I) { in SinkInstruction()
266 SuccToSinkTo = Candidate; in SinkInstruction()
272 E = succ_end(Inst->getParent()); I != E && !SuccToSinkTo; ++I) { in SinkInstruction()
274 SuccToSinkTo = *I; in SinkInstruction()
278 if (!SuccToSinkTo) in SinkInstruction()
284 SuccToSinkTo->printAsOperand(dbgs(), false); in SinkInstruction()
288 Inst->moveBefore(&*SuccToSinkTo->getFirstInsertionPt()); in SinkInstruction()