Lines Matching refs:Ret
495 static bool eliminateRecursiveTailCall(CallInst *CI, ReturnInst *Ret, in eliminateRecursiveTailCall() argument
518 for (++BBI; &*BBI != Ret; ++BBI) { in eliminateRecursiveTailCall()
539 if (Ret->getNumOperands() == 1 && Ret->getReturnValue() != CI && in eliminateRecursiveTailCall()
540 !isa<UndefValue>(Ret->getReturnValue()) && in eliminateRecursiveTailCall()
546 if (!isDynamicConstant(Ret->getReturnValue(), CI, Ret)) in eliminateRecursiveTailCall()
550 AccumulatorRecursionEliminationInitVal = getCommonReturnValue(Ret, CI); in eliminateRecursiveTailCall()
555 BasicBlock *BB = Ret->getParent(); in eliminateRecursiveTailCall()
650 AccPN->addIncoming(Ret->getReturnValue(), BB); in eliminateRecursiveTailCall()
664 BranchInst *NewBI = BranchInst::Create(OldEntry, Ret); in eliminateRecursiveTailCall()
667 BB->getInstList().erase(Ret); // Remove return. in eliminateRecursiveTailCall()
673 static bool foldReturnAndProcessPred(BasicBlock *BB, ReturnInst *Ret, in foldReturnAndProcessPred() argument
700 ReturnInst *RI = FoldReturnIntoUncondBranch(Ret, BB, Pred); in foldReturnAndProcessPred()
720 static bool processReturningBlock(ReturnInst *Ret, BasicBlock *&OldEntry, in processReturningBlock() argument
725 CallInst *CI = findTRECandidate(Ret, CannotTailCallElimCallsMarkedTail, TTI); in processReturningBlock()
729 return eliminateRecursiveTailCall(CI, Ret, OldEntry, TailCallsAreMarkedTail, in processReturningBlock()
766 if (ReturnInst *Ret = dyn_cast<ReturnInst>(BB->getTerminator())) { in eliminateTailRecursion() local
768 processReturningBlock(Ret, OldEntry, TailCallsAreMarkedTail, in eliminateTailRecursion()
770 if (!Change && BB->getFirstNonPHIOrDbg() == Ret) in eliminateTailRecursion()
772 foldReturnAndProcessPred(BB, Ret, OldEntry, TailCallsAreMarkedTail, in eliminateTailRecursion()