• Home
  • Raw
  • Download

Lines Matching refs:Phi

627   for (const RewritePhi &Phi : RewritePhiSet) {  in rewriteLoopExitValues()  local
628 PHINode *PN = Phi.PN; in rewriteLoopExitValues()
629 Value *ExitVal = Phi.Val; in rewriteLoopExitValues()
633 if (ReplaceExitValue == OnlyCheapRepl && !LoopCanBeDel && Phi.HighCost) { in rewriteLoopExitValues()
640 Instruction *Inst = cast<Instruction>(PN->getIncomingValue(Phi.Ith)); in rewriteLoopExitValues()
641 PN->setIncomingValue(Phi.Ith, ExitVal); in rewriteLoopExitValues()
766 for (const RewritePhi &Phi : RewritePhiSet) { in canLoopBeDeleted() local
767 unsigned i = Phi.Ith; in canLoopBeDeleted()
768 if (Phi.PN == P && (Phi.PN)->getIncomingValue(i) == Incoming) { in canLoopBeDeleted()
1602 PHINode *Phi = dyn_cast<PHINode>(IncI->getOperand(0)); in getLoopPhiForCounter() local
1603 if (Phi && Phi->getParent() == L->getHeader()) { in getLoopPhiForCounter()
1605 return Phi; in getLoopPhiForCounter()
1612 Phi = dyn_cast<PHINode>(IncI->getOperand(1)); in getLoopPhiForCounter()
1613 if (Phi && Phi->getParent() == L->getHeader()) { in getLoopPhiForCounter()
1615 return Phi; in getLoopPhiForCounter()
1657 PHINode *Phi = dyn_cast<PHINode>(LHS); in needsLFTR() local
1658 if (!Phi) in needsLFTR()
1659 Phi = getLoopPhiForCounter(LHS, L, DT); in needsLFTR()
1661 if (!Phi) in needsLFTR()
1665 int Idx = Phi->getBasicBlockIndex(L->getLoopLatch()); in needsLFTR()
1670 Value *IncV = Phi->getIncomingValue(Idx); in needsLFTR()
1671 return Phi != getLoopPhiForCounter(IncV, L, DT); in needsLFTR()
1718 static bool AlmostDeadIV(PHINode *Phi, BasicBlock *LatchBlock, Value *Cond) { in AlmostDeadIV() argument
1719 int LatchIdx = Phi->getBasicBlockIndex(LatchBlock); in AlmostDeadIV()
1720 Value *IncV = Phi->getIncomingValue(LatchIdx); in AlmostDeadIV()
1722 for (User *U : Phi->users()) in AlmostDeadIV()
1726 if (U != Cond && U != Phi) return false; in AlmostDeadIV()
1758 PHINode *Phi = cast<PHINode>(I); in FindLoopCounter() local
1759 if (!SE->isSCEVable(Phi->getType())) in FindLoopCounter()
1763 if (BECount->getType()->isPointerTy() && !Phi->getType()->isPointerTy()) in FindLoopCounter()
1766 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(SE->getSCEV(Phi)); in FindLoopCounter()
1781 int LatchIdx = Phi->getBasicBlockIndex(LatchBlock); in FindLoopCounter()
1782 Value *IncV = Phi->getIncomingValue(LatchIdx); in FindLoopCounter()
1783 if (getLoopPhiForCounter(IncV, L, DT) != Phi) in FindLoopCounter()
1788 if (!hasConcreteDef(Phi)) { in FindLoopCounter()
1793 if (Phi != getLoopPhiForCounter(Cond->getOperand(0), L, DT) && in FindLoopCounter()
1794 Phi != getLoopPhiForCounter(Cond->getOperand(1), L, DT)) { in FindLoopCounter()
1803 if (AlmostDeadIV(Phi, LatchBlock, Cond)) in FindLoopCounter()
1818 BestPhi = Phi; in FindLoopCounter()