Lines Matching refs:TheLoop
139 static void collectCastInstrs(Loop *TheLoop, Instruction *Exit, in collectCastInstrs() argument
174 if (TheLoop->contains(I) && !Visited.count(I)) in collectCastInstrs()
214 PHINode *Phi, RecurKind Kind, Loop *TheLoop, FastMathFlags FuncFMF, in AddReductionVar() argument
221 if (Phi->getParent() != TheLoop->getHeader()) in AddReductionVar()
226 Value *RdxStart = Phi->getIncomingValueForBlock(TheLoop->getLoopPreheader()); in AddReductionVar()
340 if (!SE->isLoopInvariant(PtrScev, TheLoop)) { in AddReductionVar()
376 isRecurrenceInstr(TheLoop, Phi, Cur, Kind, ReduxDesc, FuncFMF); in AddReductionVar()
445 if (!TheLoop->contains(Parent)) { in AddReductionVar()
488 !isAnyOfPattern(TheLoop, Phi, UI, IgnoredVal) in AddReductionVar()
588 collectCastInstrs(TheLoop, ExitInstruction, RecurrenceType, CastInsts, in AddReductionVar()
838 bool RecurrenceDescriptor::isReductionPHI(PHINode *Phi, Loop *TheLoop, in isReductionPHI() argument
843 BasicBlock *Header = TheLoop->getHeader(); in isReductionPHI()
851 if (AddReductionVar(Phi, RecurKind::Add, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
856 if (AddReductionVar(Phi, RecurKind::Mul, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
861 if (AddReductionVar(Phi, RecurKind::Or, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
866 if (AddReductionVar(Phi, RecurKind::And, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
871 if (AddReductionVar(Phi, RecurKind::Xor, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
876 if (AddReductionVar(Phi, RecurKind::SMax, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
881 if (AddReductionVar(Phi, RecurKind::SMin, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
886 if (AddReductionVar(Phi, RecurKind::UMax, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
891 if (AddReductionVar(Phi, RecurKind::UMin, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
896 if (AddReductionVar(Phi, RecurKind::IAnyOf, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
902 if (AddReductionVar(Phi, RecurKind::FMul, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
907 if (AddReductionVar(Phi, RecurKind::FAdd, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
912 if (AddReductionVar(Phi, RecurKind::FMax, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
917 if (AddReductionVar(Phi, RecurKind::FMin, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
922 if (AddReductionVar(Phi, RecurKind::FAnyOf, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
928 if (AddReductionVar(Phi, RecurKind::FMulAdd, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
933 if (AddReductionVar(Phi, RecurKind::FMaximum, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
938 if (AddReductionVar(Phi, RecurKind::FMinimum, TheLoop, FMF, RedDes, DB, AC, DT, in isReductionPHI()
947 bool RecurrenceDescriptor::isFixedOrderRecurrence(PHINode *Phi, Loop *TheLoop, in isFixedOrderRecurrence() argument
951 if (Phi->getParent() != TheLoop->getHeader() || in isFixedOrderRecurrence()
957 auto *Preheader = TheLoop->getLoopPreheader(); in isFixedOrderRecurrence()
958 auto *Latch = TheLoop->getLoopLatch(); in isFixedOrderRecurrence()
984 if (!Previous || !TheLoop->contains(Previous) || isa<PHINode>(Previous)) in isFixedOrderRecurrence()
1275 bool InductionDescriptor::isFPInductionPHI(PHINode *Phi, const Loop *TheLoop, in isFPInductionPHI() argument
1282 if (TheLoop->getHeader() != Phi->getParent()) in isFPInductionPHI()
1290 if (TheLoop->contains(Phi->getIncomingBlock(0))) { in isFPInductionPHI()
1294 assert(TheLoop->contains(Phi->getIncomingBlock(1)) && in isFPInductionPHI()
1319 if (TheLoop->contains(I)) in isFPInductionPHI()
1433 bool InductionDescriptor::isInductionPHI(PHINode *Phi, const Loop *TheLoop, in isInductionPHI() argument
1447 return isFPInductionPHI(Phi, TheLoop, PSE.getSE(), D); in isInductionPHI()
1471 return isInductionPHI(Phi, TheLoop, PSE.getSE(), D, AR, &Casts); in isInductionPHI()
1474 return isInductionPHI(Phi, TheLoop, PSE.getSE(), D, AR); in isInductionPHI()
1478 PHINode *Phi, const Loop *TheLoop, ScalarEvolution *SE, in isInductionPHI() argument
1495 if (AR->getLoop() != TheLoop) { in isInductionPHI()
1520 if (!ConstStep && !SE->isLoopInvariant(Step, TheLoop)) in isInductionPHI()