Lines Matching refs:IV

366       DAGRootTracker(LoopReroll *Parent, Loop *L, Instruction *IV,  in DAGRootTracker()
373 PreserveLCSSA(PreserveLCSSA), IV(IV), IVToIncMap(IncrMap), in DAGRootTracker()
429 Instruction *IV; member
464 bool isLoopControlIV(Loop *L, Instruction *IV);
468 bool reroll(Instruction *IV, Loop *L, BasicBlock *Header,
491 bool LoopReroll::isLoopControlIV(Loop *L, Instruction *IV) { in isLoopControlIV() argument
492 unsigned IVUses = IV->getNumUses(); in isLoopControlIV()
496 for (auto *User : IV->users()) { in isLoopControlIV()
523 if (PN != IV) in isLoopControlIV()
551 for (Instruction &IV : L->getHeader()->phis()) { in collectPossibleIVs()
552 if (!IV.getType()->isIntegerTy() && !IV.getType()->isPointerTy()) in collectPossibleIVs()
556 dyn_cast<SCEVAddRecExpr>(SE->getSCEV(&IV))) { in collectPossibleIVs()
563 IVToIncMap[&IV] = IncSCEV->getValue()->getSExtValue(); in collectPossibleIVs()
564 LLVM_DEBUG(dbgs() << "LRR: Possible IV: " << IV << " = " << *PHISCEV in collectPossibleIVs()
567 if (isLoopControlIV(L, &IV)) { in collectPossibleIVs()
568 LoopControlIVs.push_back(&IV); in collectPossibleIVs()
569 LLVM_DEBUG(dbgs() << "LRR: Loop control only IV: " << IV in collectPossibleIVs()
572 PossibleIVs.push_back(&IV); in collectPossibleIVs()
733 static bool isLoopIncrement(User *U, Instruction *IV) { in isLoopIncrement() argument
742 if (PN && PN == IV) in isLoopIncrement()
755 if (isLoopIncrement(I, IV)) { in collectPossibleRoots()
831 if (I != IV && findRootsBase(I, SubsumedInsts)) in findRootsRecursive()
945 Inc = IVToIncMap[IV]; in findRoots()
949 for (auto *IVU : IV->users()) { in findRoots()
950 if (isLoopIncrement(IVU, IV)) in findRoots()
953 findRootsRecursive(IV, SmallInstructionSet()); in findRoots()
954 LoopIncs.push_back(IV); in findRoots()
956 if (!findRootsBase(IV, SmallInstructionSet())) in findRoots()
1401 LLVM_DEBUG(dbgs() << "LRR: Matched all iteration increments for " << *IV in validate()
1598 bool LoopReroll::reroll(Instruction *IV, Loop *L, BasicBlock *Header, in reroll() argument
1601 DAGRootTracker DAGRoots(this, L, IV, SE, AA, TLI, DT, LI, PreserveLCSSA, in reroll()
1606 LLVM_DEBUG(dbgs() << "LRR: Found all root induction increments for: " << *IV in reroll()