Home
last modified time | relevance | path

Searched refs:TripCount (Results 1 – 22 of 22) sorted by relevance

/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DLoopCacheAnalysis.cpp112 const SCEV *TripCount = (!isa<SCEVCouldNotCompute>(BackedgeTakenCount) && in computeTripCount() local
117 if (!TripCount) { in computeTripCount()
120 TripCount = SE.getConstant(ElemSize.getType(), DefaultTripCount); in computeTripCount()
123 return TripCount; in computeTripCount()
286 const SCEV *TripCount = computeTripCount(L, *Sizes.back(), SE); in computeRefCost() local
287 assert(TripCount && "Expecting valid TripCount"); in computeRefCost()
288 LLVM_DEBUG(dbgs() << "TripCount=" << *TripCount << "\n"); in computeRefCost()
297 Type *WiderType = SE.getWiderType(Stride->getType(), TripCount->getType()); in computeRefCost()
300 TripCount = SE.getNoopOrZeroExtend(TripCount, WiderType); in computeRefCost()
301 const SCEV *Numerator = SE.getMulExpr(Stride, TripCount); in computeRefCost()
[all …]
H A DLint.cpp360 if (auto *TripCount = dyn_cast<ConstantInt>(I.getArgOperand(1))) in visitCallBase() local
361 Check(!TripCount->isZero(), in visitCallBase()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DLoopUnrollPass.cpp356 const Loop *L, unsigned TripCount, DominatorTree &DT, ScalarEvolution &SE, in analyzeLoopUnrollCost() argument
373 if (!TripCount || TripCount > MaxIterationsCountToAnalyze) in analyzeLoopUnrollCost()
510 for (unsigned Iteration = 0; Iteration < TripCount; ++Iteration) { in analyzeLoopUnrollCost()
667 AddCostRecursively(*OpI, TripCount - 1); in analyzeLoopUnrollCost()
797 const unsigned TripMultiple, const unsigned TripCount, in shouldPragmaUnroll() argument
816 if (PInfo.PragmaFullUnroll && TripCount != 0) { in shouldPragmaUnroll()
820 if (TripCount > PragmaUnrollFullMaxIterations) { in shouldPragmaUnroll()
825 return TripCount; in shouldPragmaUnroll()
828 if (PInfo.PragmaEnableUnroll && !TripCount && MaxTripCount && in shouldPragmaUnroll()
867 shouldPartialUnroll(const unsigned LoopSize, const unsigned TripCount, in shouldPartialUnroll() argument
[all …]
H A DLoopFlatten.cpp305 setLoopComponents(Value *&TC, Value *&TripCount, BinaryOperator *&Increment, in setLoopComponents() argument
307 TripCount = TC; in setLoopComponents()
310 LLVM_DEBUG(dbgs() << "Found trip count: "; TripCount->dump()); in setLoopComponents()
323 PHINode *&InductionPHI, Value *&TripCount, BinaryOperator *&Increment, in verifyTripCount() argument
340 return setLoopComponents(RHS, TripCount, Increment, IterationInstructions); in verifyTripCount()
361 return setLoopComponents(NewRHS, TripCount, Increment, in verifyTripCount()
364 return setLoopComponents(RHS, TripCount, Increment, IterationInstructions); in verifyTripCount()
383 return setLoopComponents(RHS, TripCount, Increment, IterationInstructions); in verifyTripCount()
390 PHINode *&InductionPHI, Value *&TripCount, BinaryOperator *&Increment, in findLoopComponents() argument
464 return verifyTripCount(RHS, L, IterationInstructions, InductionPHI, TripCount, in findLoopComponents()
/freebsd/contrib/llvm-project/llvm/lib/Target/ARM/
H A DMVETailPredication.cpp109 bool TryConvertActiveLaneMask(Value *TripCount);
115 const SCEV *IsSafeActiveMask(IntrinsicInst *ActiveLaneMask, Value *TripCount);
198 Value *TripCount) { in IsSafeActiveMask() argument
209 auto *TC = SE->getSCEV(TripCount); in IsSafeActiveMask()
257 ConstantInt *TC = dyn_cast<ConstantInt>(TripCount); in IsSafeActiveMask()
294 auto *VW = SE->getSCEV(ConstantInt::get(TripCount->getType(), VectorWidth)); in IsSafeActiveMask()
298 SE->getSCEV(ConstantInt::get(TripCount->getType(), VectorWidth - 1))); in IsSafeActiveMask()
415 bool MVETailPredication::TryConvertActiveLaneMask(Value *TripCount) { in TryConvertActiveLaneMask() argument
432 const SCEV *StartSCEV = IsSafeActiveMask(ActiveLaneMask, TripCount); in TryConvertActiveLaneMask()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DLoopUnrollRuntime.cpp518 Value *TripCount, unsigned Count) { in CreateTripRemainder() argument
530 return B.CreateAnd(TripCount, Count - 1, "xtraiter"); in CreateTripRemainder()
766 Value *TripCount = Expander.expandCodeFor(TripCountSC, TripCountSC->getType(), in UnrollRuntimeLoopRemainder() local
776 !isGuaranteedNotToBeUndefOrPoison(TripCount, AC, PreHeaderBR, DT)) { in UnrollRuntimeLoopRemainder()
777 TripCount = B.CreateFreeze(TripCount); in UnrollRuntimeLoopRemainder()
779 B.CreateAdd(TripCount, Constant::getAllOnesValue(TripCount->getType())); in UnrollRuntimeLoopRemainder()
787 Value * const ModVal = CreateTripRemainder(B, BECount, TripCount, Count); in UnrollRuntimeLoopRemainder()
936 Value *TestVal = B2.CreateSub(TripCount, ModVal, "unroll_iter"); in UnrollRuntimeLoopRemainder()
H A DLoopUnrollAndJam.cpp216 llvm::UnrollAndJamLoop(Loop *L, unsigned Count, unsigned TripCount, in UnrollAndJamLoop() argument
229 if (TripCount == 0 && Count < 2) { in UnrollAndJamLoop()
236 assert(TripCount == 0 || TripCount % TripMultiple == 0); in UnrollAndJamLoop()
239 bool CompletelyUnroll = (Count == TripCount); in UnrollAndJamLoop()
264 << Header->getName() << " with trip count " << TripCount in UnrollAndJamLoop()
269 << NV("UnrollCount", TripCount) << " iterations"); in UnrollAndJamLoop()
H A DLoopUnroll.cpp512 unsigned TripCount; in UnrollLoop() member
530 Info.TripCount = SE->getSmallConstantTripCount(L, ExitingBlock); in UnrollLoop()
532 if (Info.TripCount != 0) { in UnrollLoop()
533 Info.BreakoutTrip = Info.TripCount % ULO.Count; in UnrollLoop()
542 << ": TripCount=" << Info.TripCount in UnrollLoop()
903 if (Info.TripCount && j != Info.TripCount) in UnrollLoop()
H A DLoopPeel.cpp540 unsigned TripCount, DominatorTree &DT, in computePeelCount() argument
624 if (TripCount) in computePeelCount()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Vectorize/
H A DVPlan.cpp858 VPlanPtr VPlan::createInitialVPlan(const SCEV *TripCount, ScalarEvolution &SE, in createInitialVPlan() argument
864 Plan->TripCount = in createInitialVPlan()
865 vputils::getOrCreateVPValueForSCEVExpr(*Plan, TripCount, SE); in createInitialVPlan()
907 IntegerType::getInt1Ty(TripCount->getType()->getContext()))) in createInitialVPlan()
1115 if (TripCount->isLiveIn()) in printLiveIns()
1117 TripCount->printAsOperand(O, SlotTracker); in printLiveIns()
1243 assert(TripCount && "trip count must be set"); in duplicate()
1244 if (TripCount->isLiveIn()) in duplicate()
1245 Old2NewVPValues[TripCount] = in duplicate()
1246 NewPlan->getOrAddLiveIn(TripCount->getLiveInIRValue()); in duplicate()
[all …]
H A DVPlanTransforms.cpp693 const SCEV *TripCount = createTripCountSCEV(IdxTy, PSE); in optimizeForVFAndUF() local
696 const SCEV *C = SE.getElementCount(TripCount->getType(), NumElements); in optimizeForVFAndUF()
697 if (TripCount->isZero() || in optimizeForVFAndUF()
698 !SE.isKnownPredicate(CmpInst::ICMP_ULE, TripCount, C)) in optimizeForVFAndUF()
1281 VPValue *TripCount, *IncrementValue; in addVPLaneMaskPhiAndUpdateExitBranch() local
1287 TripCount = TC; in addVPLaneMaskPhiAndUpdateExitBranch()
1293 TripCount = Builder.createNaryOp(VPInstruction::CalculateTripCountMinusVF, in addVPLaneMaskPhiAndUpdateExitBranch()
1318 {InLoopIncrement, TripCount}, DL, in addVPLaneMaskPhiAndUpdateExitBranch()
H A DVPlan.h3278 VPValue *TripCount = nullptr; variable
3315 TripCount = TC; in VPlan()
3340 static VPlanPtr createInitialVPlan(const SCEV *TripCount,
3346 void prepareToExecute(Value *TripCount, Value *VectorTripCount,
3360 assert(TripCount && "trip count needs to be set before accessing it"); in getTripCount()
3361 return TripCount; in getTripCount()
3367 assert(TripCount && NewTripCount && TripCount->getNumUsers() == 0 && in resetTripCount()
3369 TripCount = NewTripCount; in resetTripCount()
H A DLoopVectorize.cpp541 Value *getTripCount() const { return TripCount; } in getTripCount()
546 void setTripCount(Value *TC) { TripCount = TC; } in setTripCount()
675 Value *TripCount = nullptr; member in llvm::InnerLoopVectorizer
739 Value *TripCount = nullptr; member
838 TripCount = EPI.TripCount; in EpilogueVectorizerEpilogueLoop()
7406 unsigned TripCount = State.UF * State.VF.getKnownMinValue(); in executePlan() local
7407 assert(TripCount > 0 && "trip count should not be zero"); in executePlan()
7408 const uint32_t Weights[] = {1, TripCount - 1}; in executePlan()
7530 EPI.TripCount = Count; in emitIterationCountCheck()
7658 assert(EPI.TripCount && in emitMinimumVectorEpilogueIterCountCheck()
[all …]
H A DVPlanRecipes.cpp484 Value *TripCount = State.get(getOperand(1), VPIteration(0, 0)); in generatePerPart() local
485 Value *AVL = State.Builder.CreateSub(TripCount, Index); in generatePerPart()
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/
H A DUnrollLoop.h95 LoopUnrollResult UnrollAndJamLoop(Loop *L, unsigned Count, unsigned TripCount,
156 OptimizationRemarkEmitter *ORE, unsigned TripCount,
H A DLoopPeel.h39 unsigned TripCount, DominatorTree &DT,
/freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/
H A DHexagonHardwareLoops.cpp1206 CountValue *TripCount = getLoopTripCount(L, OldInsts); in convertToHardwareLoop() local
1207 if (!TripCount) in convertToHardwareLoop()
1211 if (TripCount->isReg()) { in convertToHardwareLoop()
1214 MachineInstr *TCDef = MRI->getVRegDef(TripCount->getReg()); in convertToHardwareLoop()
1247 if (TripCount->isReg()) { in convertToHardwareLoop()
1251 .addReg(TripCount->getReg(), 0, TripCount->getSubReg()); in convertToHardwareLoop()
1256 assert(TripCount->isImm() && "Expecting immediate value for trip count"); in convertToHardwareLoop()
1260 int64_t CountImm = TripCount->getImm(); in convertToHardwareLoop()
1297 delete TripCount; in convertToHardwareLoop()
H A DHexagonInstrInfo.cpp733 int64_t TripCount; member in __anonc67b0ce50111::HexagonPipelinerLoopInfo
744 TripCount = Loop->getOpcode() == Hexagon::J2_loop0r in HexagonPipelinerLoopInfo()
747 if (TripCount == -1) in HexagonPipelinerLoopInfo()
759 if (TripCount == -1) { in createTripCountGreaterCondition()
771 return TripCount > TC; in createTripCountGreaterCondition()
784 int64_t TripCount = Loop->getOperand(1).getImm() + TripCountAdjust; in adjustTripCount() local
785 assert(TripCount > 0 && "Can't create an empty or negative loop!"); in adjustTripCount()
786 Loop->getOperand(1).setImm(TripCount); in adjustTripCount()
/freebsd/contrib/llvm-project/llvm/lib/Frontend/OpenMP/
H A DOMPIRBuilder.cpp3804 DebugLoc DL, Value *TripCount, Function *F, BasicBlock *PreInsertBefore, in createLoopSkeleton() argument
3808 Type *IndVarTy = TripCount->getType(); in createLoopSkeleton()
3839 Builder.CreateICmpULT(IndVarPHI, TripCount, "omp_" + Name + ".cmp"); in createLoopSkeleton()
3872 Value *TripCount, const Twine &Name) { in createCanonicalLoop() argument
3876 CanonicalLoopInfo *CL = createLoopSkeleton(Loc.DL, TripCount, BB->getParent(), in createCanonicalLoop()
3957 Value *TripCount = Builder.CreateSelect(ZeroCmp, Zero, CountIfLooping, in createCanonicalLoop() local
3967 return createCanonicalLoop(LoopLoc, BodyGen, TripCount, Name); in createCanonicalLoop()
4043 Value *TripCount = Builder.CreateAdd(TripCountMinusOne, One); in applyStaticWorkshareLoop() local
4044 CLI->setTripCount(TripCount); in applyStaticWorkshareLoop()
4262 Type *ParallelTaskPtr, Value *TripCount, Function &LoopBodyFn) { in createTargetLoopWorkshareCall() argument
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/Frontend/OpenMP/
H A DOMPIRBuilder.h687 Value *TripCount,
3195 CanonicalLoopInfo *createLoopSkeleton(DebugLoc DL, Value *TripCount,
3350 void setTripCount(Value *TripCount);
/freebsd/contrib/llvm-project/llvm/lib/Target/PowerPC/
H A DPPCInstrInfo.cpp5427 int64_t TripCount; member in __anon936ebc340a11::PPCPipelinerLoopInfo
5438 TripCount = LoopCount->getOperand(1).getImm(); in PPCPipelinerLoopInfo()
5440 TripCount = -1; in PPCPipelinerLoopInfo()
5451 if (TripCount == -1) { in createTripCountGreaterCondition()
5461 return TripCount > TC; in createTripCountGreaterCondition()
5474 int64_t TripCount = LoopCount->getOperand(1).getImm() + TripCountAdjust; in adjustTripCount() local
5475 LoopCount->getOperand(1).setImm(TripCount); in adjustTripCount()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/
H A DSelectionDAGBuilder.cpp7939 SDValue TripCount = getValue(I.getOperand(1)); in visitIntrinsicCall() local
7944 SDValue VectorTripCount = DAG.getSplat(VecTy, sdl, TripCount); in visitIntrinsicCall()