Home
last modified time | relevance | path

Searched refs:SCEV (Results 1 – 25 of 95) sorted by relevance

1234

/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DScalarEvolution.h72 class SCEV : public FoldingSetNode {
73 friend struct FoldingSetTrait<SCEV>;
135 explicit SCEV(const FoldingSetNodeIDRef ID, SCEVTypes SCEVTy,
138 SCEV(const SCEV &) = delete;
139 SCEV &operator=(const SCEV &) = delete;
147 LLVM_ABI ArrayRef<const SCEV *> operands() const;
184 template <> struct FoldingSetTrait<SCEV> : DefaultFoldingSetTrait<SCEV> {
185 static void Profile(const SCEV &X, FoldingSetNodeID &ID) { ID = X.FastID; }
187 static bool Equals(const SCEV &X, const FoldingSetNodeID &ID, unsigned IDHash,
192 static unsigned ComputeHash(const SCEV &X, FoldingSetNodeID &TempID) {
[all …]
H A DDependenceAnalysis.h101 const SCEV *Distance = nullptr; // NULL implies no distance available.
162 virtual const SCEV *getDistance(unsigned Level) const { return nullptr; } in getDistance()
261 const SCEV *getDistance(unsigned Level) const override;
361 LLVM_ABI const SCEV *getSplitIteration(const Dependence &Dep,
381 const SCEV *Src;
382 const SCEV *Dst;
390 const SCEV *Coeff;
391 const SCEV *PosPart;
392 const SCEV *NegPart;
393 const SCEV *Iterations;
[all …]
H A DScalarEvolutionExpressions.h61 class SCEVConstant : public SCEV {
67 : SCEV(ID, scConstant, 1), V(v) {} in SCEVConstant()
76 static bool classof(const SCEV *S) { return S->getSCEVType() == scConstant; } in classof()
81 class SCEVVScale : public SCEV {
85 : SCEV(ID, scVScale, 0), Ty(ty) {} in SCEVVScale()
93 static bool classof(const SCEV *S) { return S->getSCEVType() == scVScale; } in classof()
96 inline unsigned short computeExpressionSize(ArrayRef<const SCEV *> Args) { in computeExpressionSize()
104 class SCEVCastExpr : public SCEV {
106 const SCEV *Op;
110 const SCEV *op, Type *ty);
[all …]
H A DDelinearization.h27 class SCEV; variable
33 SmallVectorImpl<const SCEV *> &Terms,
34 SmallVectorImpl<const SCEV *> &Sizes,
35 const SCEV *ElementSize);
39 void collectParametricTerms(ScalarEvolution &SE, const SCEV *Expr,
40 SmallVectorImpl<const SCEV *> &Terms);
44 void computeAccessFunctions(ScalarEvolution &SE, const SCEV *Expr,
45 SmallVectorImpl<const SCEV *> &Subscripts,
46 SmallVectorImpl<const SCEV *> &Sizes);
111 void delinearize(ScalarEvolution &SE, const SCEV *Expr,
[all …]
H A DLoopAccessAnalysis.h184 const DenseMap<Value *, const SCEV *> &SymbolicStrides, in MemoryDepChecker()
285 DenseMap<std::pair<const SCEV *, Type *>,
286 std::pair<const SCEV *, const SCEV *>> &
303 const DenseMap<Value *, const SCEV *> &SymbolicStrides;
356 DenseMap<std::pair<const SCEV *, Type *>,
357 std::pair<const SCEV *, const SCEV *>>
392 const SCEV *Dist;
406 DepDistanceStrideAndSizeInfo(const SCEV *Dist, uint64_t MaxStride, in DepDistanceStrideAndSizeInfo()
429 bool areAccessesCompletelyBeforeOrAfter(const SCEV *Src, Type *SrcTy,
430 const SCEV *Sink, Type *SinkTy);
[all …]
H A DScalarEvolutionDivision.h20 class SCEV; variable
30 static void divide(ScalarEvolution &SE, const SCEV *Numerator,
31 const SCEV *Denominator, const SCEV **Quotient,
32 const SCEV **Remainder);
60 SCEVDivision(ScalarEvolution &S, const SCEV *Numerator,
61 const SCEV *Denominator);
65 void cannotDivide(const SCEV *Numerator);
68 const SCEV *Denominator, *Quotient, *Remainder, *Zero, *One;
H A DLoopCacheAnalysis.h32 class SCEV; variable
58 const SCEV *getBasePointer() const { return BasePointer; } in getBasePointer()
60 const SCEV *getSubscript(unsigned SubNum) const { in getSubscript()
64 const SCEV *getFirstSubscript() const { in getFirstSubscript()
68 const SCEV *getLastSubscript() const { in getLastSubscript()
104 bool tryDelinearizeFixedSize(const SCEV *AccessFn,
105 SmallVectorImpl<const SCEV *> &Subscripts);
115 bool isConsecutive(const Loop &L, const SCEV *&Stride, unsigned CLS) const;
125 const SCEV *getLastCoefficient() const;
129 bool isCoeffForLoopZeroOrInvariant(const SCEV &Subscript,
[all …]
H A DScalarEvolutionNormalization.h46 class SCEV; variable
56 LLVM_ABI const SCEV *normalizeForPostIncUse(const SCEV *S,
63 LLVM_ABI const SCEV *normalizeForPostIncUseIf(const SCEV *S,
69 LLVM_ABI const SCEV *denormalizeForPostIncUse(const SCEV *S,
H A DScalarEvolutionPatternMatch.h21 template <typename Pattern> bool match(const SCEV *S, const Pattern &P) { in match()
28 bool match(const SCEV *S) const { in match()
63 inline class_match<const SCEV> m_SCEV() { return class_match<const SCEV>(); } in m_SCEV()
86 inline bind_ty<const SCEV> m_SCEV(const SCEV *&V) { return V; } in m_SCEV()
96 const SCEV *Expr;
98 specificscev_ty(const SCEV *Expr) : Expr(Expr) {} in specificscev_ty()
104 inline specificscev_ty m_scev_Specific(const SCEV *S) { return S; } in m_scev_Specific()
120 bool match(const SCEV *S) const { in match()
140 bool match(const SCEV *S) const { in match()
171 bool match(const SCEV *S) const { in match()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DDelinearization.cpp36 static inline bool containsUndefs(const SCEV *S) { in containsUndefs()
37 return SCEVExprContains(S, [](const SCEV *S) { in containsUndefs()
49 SmallVectorImpl<const SCEV *> &Strides;
51 SCEVCollectStrides(ScalarEvolution &SE, SmallVectorImpl<const SCEV *> &S) in SCEVCollectStrides()
54 bool follow(const SCEV *S) { in follow()
65 SmallVectorImpl<const SCEV *> &Terms;
67 SCEVCollectTerms(SmallVectorImpl<const SCEV *> &T) : Terms(T) {} in SCEVCollectTerms()
69 bool follow(const SCEV *S) { in follow()
94 bool follow(const SCEV *S) { in follow()
122 SmallVectorImpl<const SCEV *> &Terms;
[all …]
H A DScalarEvolution.cpp267 LLVM_DUMP_METHOD void SCEV::dump() const { in dump()
273 void SCEV::print(raw_ostream &OS) const { in print()
283 const SCEV *Op = PtrToInt->getOperand(); in print()
290 const SCEV *Op = Trunc->getOperand(); in print()
297 const SCEV *Op = ZExt->getOperand(); in print()
304 const SCEV *Op = SExt->getOperand(); in print()
384 Type *SCEV::getType() const { in getType()
418 ArrayRef<const SCEV *> SCEV::operands() const { in operands()
446 bool SCEV::isZero() const { return match(this, m_scev_Zero()); } in isZero()
448 bool SCEV::isOne() const { return match(this, m_scev_One()); } in isOne()
[all …]
H A DScalarEvolutionNormalization.cpp43 const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr);
47 const SCEV *
49 SmallVector<const SCEV *, 8> Operands; in visitAddRecExpr()
52 [&](const SCEV *Op) { return visit(Op); }); in visitAddRecExpr()
55 return SE.getAddRecExpr(Operands, AR->getLoop(), SCEV::FlagAnyWrap); in visitAddRecExpr()
94 return SE.getAddRecExpr(Operands, AR->getLoop(), SCEV::FlagAnyWrap); in visitAddRecExpr()
97 const SCEV *llvm::normalizeForPostIncUse(const SCEV *S, in normalizeForPostIncUse()
106 const SCEV *Normalized = in normalizeForPostIncUse()
108 const SCEV *Denormalized = denormalizeForPostIncUse(Normalized, Loops, SE); in normalizeForPostIncUse()
115 const SCEV *llvm::normalizeForPostIncUseIf(const SCEV *S, NormalizePredTy Pred, in normalizeForPostIncUseIf()
[all …]
H A DDependenceAnalysis.cpp195 const SCEV *Distance = D->getDistance(Level); in dumpExampleDependence()
360 const SCEV *FullDependence::getDistance(unsigned Level) const { in getDistance()
403 const SCEV *DependenceInfo::Constraint::getX() const { in getX()
411 const SCEV *DependenceInfo::Constraint::getY() const { in getY()
419 const SCEV *DependenceInfo::Constraint::getA() const { in getA()
428 const SCEV *DependenceInfo::Constraint::getB() const { in getB()
437 const SCEV *DependenceInfo::Constraint::getC() const { in getC()
446 const SCEV *DependenceInfo::Constraint::getD() const { in getD()
459 void DependenceInfo::Constraint::setPoint(const SCEV *X, const SCEV *Y, in setPoint()
467 void DependenceInfo::Constraint::setLine(const SCEV *AA, const SCEV *BB, in setLine()
[all …]
H A DScalarEvolutionDivision.cpp30 static inline int sizeOfSCEV(const SCEV *S) { in sizeOfSCEV()
36 bool follow(const SCEV *S) { in sizeOfSCEV()
55 void SCEVDivision::divide(ScalarEvolution &SE, const SCEV *Numerator, in divide()
56 const SCEV *Denominator, const SCEV **Quotient, in divide()
57 const SCEV **Remainder) { in divide()
85 const SCEV *Q, *R; in divide()
87 for (const SCEV *Op : T->operands()) { in divide()
134 const SCEV *StartQ, *StartR, *StepQ, *StepR; in visitAddRecExpr()
151 SmallVector<const SCEV *, 2> Qs, Rs; in visitAddExpr()
154 for (const SCEV *Op : Numerator->operands()) { in visitAddExpr()
[all …]
H A DLoopCacheAnalysis.cpp81 static bool isOneDimensionalArray(const SCEV &AccessFn, const SCEV &ElemSize, in isOneDimensionalArray()
90 const SCEV *Start = AR->getStart(); in isOneDimensionalArray()
91 const SCEV *Step = AR->getStepRecurrence(SE); in isOneDimensionalArray()
99 const SCEV *StepRec = AR->getStepRecurrence(SE); in isOneDimensionalArray()
109 static const SCEV *computeTripCount(const Loop &L, const SCEV &ElemSize, in computeTripCount()
111 const SCEV *BackedgeTakenCount = SE.getBackedgeTakenCount(&L); in computeTripCount()
112 const SCEV *TripCount = (!isa<SCEVCouldNotCompute>(BackedgeTakenCount) && in computeTripCount()
137 for (const SCEV *Subscript : R.Subscripts) in operator <<()
141 for (const SCEV *Size : R.Sizes) in operator <<()
189 const SCEV *LastSubscript = getLastSubscript(); in hasSpacialReuse()
[all …]
H A DLoopAccessAnalysis.cpp153 const SCEV *llvm::replaceSymbolicStrideSCEV(PredicatedScalarEvolution &PSE, in replaceSymbolicStrideSCEV()
154 const DenseMap<Value *, const SCEV *> &PtrToStride, in replaceSymbolicStrideSCEV()
156 const SCEV *OrigSCEV = PSE.getSCEV(Ptr); in replaceSymbolicStrideSCEV()
160 const SCEV *StrideSCEV = PtrToStride.lookup(Ptr); in replaceSymbolicStrideSCEV()
172 const SCEV *CT = SE->getOne(StrideSCEV->getType()); in replaceSymbolicStrideSCEV()
174 const SCEV *Expr = PSE.getSCEV(Ptr); in replaceSymbolicStrideSCEV()
193 static const SCEV *addSCEVNoOverflow(const SCEV *A, const SCEV *B, in addSCEVNoOverflow()
202 static const SCEV *mulSCEVOverflow(const SCEV *A, const SCEV *B, in mulSCEVOverflow()
212 const SCEV *MaxBTC, in evaluatePtrAddRecAtMaxBTCWillNotWrap()
213 const SCEV *EltSize, in evaluatePtrAddRecAtMaxBTCWillNotWrap()
[all …]
H A DScalarEvolutionAliasAnalysis.cpp28 const SCEV *A, const SCEV *B) { in canComputePointerDiff()
46 const SCEV *AS = SE.getSCEV(const_cast<Value *>(LocA.Ptr)); in alias()
47 const SCEV *BS = SE.getSCEV(const_cast<Value *>(LocB.Ptr)); in alias()
68 const SCEV *AInt = in alias()
70 const SCEV *BInt = in alias()
78 const SCEV *BA = SE.getMinusSCEV(BS, AS); in alias()
93 const SCEV *AB = SE.getMinusSCEV(AS, BS); in alias()
127 Value *SCEVAAResult::GetBaseValue(const SCEV *S) { in GetBaseValue()
134 const SCEV *Last = A->getOperand(A->getNumOperands() - 1); in GetBaseValue()
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DInductiveRangeCheckElimination.cpp139 const SCEV *Begin = nullptr;
140 const SCEV *Step = nullptr;
141 const SCEV *End = nullptr;
146 const SCEV *&End);
156 const SCEV *&End);
160 const SCEVAddRecExpr *&Index, const SCEV *&End);
163 const SCEV *getBegin() const { return Begin; } in getBegin()
164 const SCEV *getStep() const { return Step; } in getStep()
165 const SCEV *getEnd() const { return End; } in getEnd()
191 const SCEV *Begin;
[all …]
H A DLoopStrengthReduce.cpp321 const SCEV *getSCEV(ScalarEvolution &SE, Type *Ty) const { in getSCEV()
322 const SCEV *S = SE.getConstant(Ty, Quantity); in getSCEV()
328 const SCEV *getNegativeSCEV(ScalarEvolution &SE, Type *Ty) const { in getNegativeSCEV()
329 const SCEV *NegS = SE.getConstant(Ty, -(uint64_t)Quantity); in getNegativeSCEV()
335 const SCEV *getUnknownSCEV(ScalarEvolution &SE, Type *Ty) const { in getUnknownSCEV()
336 const SCEV *SU = SE.getUnknown(ConstantInt::getSigned(Ty, Quantity)); in getUnknownSCEV()
386 using RegUsesTy = DenseMap<const SCEV *, RegSortData>;
389 SmallVector<const SCEV *, 16> RegSequence;
392 void countRegister(const SCEV *Reg, size_t LUIdx);
393 void dropRegister(const SCEV *Reg, size_t LUIdx);
[all …]
H A DAlignmentFromAssumptions.cpp50 static MaybeAlign getNewAlignmentDiff(const SCEV *DiffSCEV, in getNewAlignmentDiff()
51 const SCEV *AlignSCEV, in getNewAlignmentDiff()
54 const SCEV *DiffUnitsSCEV = SE->getURemExpr(DiffSCEV, AlignSCEV); in getNewAlignmentDiff()
82 static Align getNewAlignment(const SCEV *AASCEV, const SCEV *AlignSCEV, in getNewAlignment()
83 const SCEV *OffSCEV, Value *Ptr, in getNewAlignment()
85 const SCEV *PtrSCEV = SE->getSCEV(Ptr); in getNewAlignment()
87 const SCEV *DiffSCEV = SE->getMinusSCEV(PtrSCEV, AASCEV); in getNewAlignment()
116 const SCEV *DiffStartSCEV = DiffARSCEV->getStart(); in getNewAlignment()
117 const SCEV *DiffIncSCEV = DiffARSCEV->getStepRecurrence(*SE); in getNewAlignment()
162 const SCEV *&AlignSCEV, in extractAlignmentInfo()
[all …]
H A DNaryReassociate.cpp228 const SCEV *OrigSCEV = nullptr; in doOneIteration()
237 const SCEV *NewSCEV = SE->getSCEV(NewI); in doOneIteration()
276 const SCEV *&OrigSCEV) { in matchAndReassociateMinOrMax()
296 const SCEV *&OrigSCEV) { in tryReassociate()
400 SmallVector<const SCEV *, 4> IndexExprs; in tryReassociateGEPAtIndex()
417 const SCEV *CandidateExpr = SE->getGEPExpr(cast<GEPOperator>(GEP), in tryReassociateGEPAtIndex()
484 const SCEV *AExpr = SE->getSCEV(A), *BExpr = SE->getSCEV(B); in tryReassociateBinaryOp()
485 const SCEV *RHSExpr = SE->getSCEV(RHS); in tryReassociateBinaryOp()
500 Instruction *NaryReassociatePass::tryReassociatedBinaryOp(const SCEV *LHSExpr, in tryReassociatedBinaryOp()
538 const SCEV *NaryReassociatePass::getBinarySCEV(BinaryOperator *I, in getBinarySCEV()
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/
H A DNaryReassociate.h96 class SCEV; variable
117 Instruction *tryReassociate(Instruction *I, const SCEV *&OrigSCEV);
146 Instruction *tryReassociatedBinaryOp(const SCEV *LHS, Value *RHS,
153 const SCEV *getBinarySCEV(BinaryOperator *I, const SCEV *LHS,
154 const SCEV *RHS);
158 Instruction *findClosestMatchingDominator(const SCEV *CandidateExpr,
167 const SCEV *&OrigSCEV);
196 DenseMap<const SCEV *, SmallVector<WeakTrackingVH, 2>> SeenExprs;
/freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/
H A DScalarEvolutionExpander.h35 explicit SCEVOperand(unsigned Opc, int Idx, const SCEV *S) : in SCEVOperand()
42 const SCEV* S;
77 DenseMap<std::pair<const SCEV *, Instruction *>, TrackingVH<Value>>
97 DenseMap<const SCEV *, const Loop *> RelevantLoops;
251 bool isHighCostExpansion(ArrayRef<const SCEV *> Exprs, Loop *L,
259 SmallPtrSet<const SCEV *, 8> Processed;
306 LLVM_ABI bool isSafeToExpand(const SCEV *S) const;
311 LLVM_ABI bool isSafeToExpandAt(const SCEV *S,
316 LLVM_ABI Value *expandCodeFor(const SCEV *SH, Type *Ty,
318 Value *expandCodeFor(const SCEV *SH, Type *Ty, Instruction *I) {
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DScalarEvolutionExpander.cpp265 SCEV::NoWrapFlags Flags, bool IsSafeToHoist) { in InsertBinop()
283 if (I->hasNoSignedWrap() != (Flags & SCEV::FlagNSW)) in InsertBinop()
285 if (I->hasNoUnsignedWrap() != (Flags & SCEV::FlagNUW)) in InsertBinop()
322 if (Flags & SCEV::FlagNUW) in InsertBinop()
324 if (Flags & SCEV::FlagNSW) in InsertBinop()
357 Value *SCEVExpander::expandAddToGEP(const SCEV *Offset, Value *V, in expandAddToGEP()
358 SCEV::NoWrapFlags Flags) { in expandAddToGEP()
363 GEPNoWrapFlags NW = (Flags & SCEV::FlagNUW) ? GEPNoWrapFlags::noUnsignedWrap() in expandAddToGEP()
425 const Loop *SCEVExpander::getRelevantLoop(const SCEV *S) { in getRelevantLoop()
451 for (const SCEV *Op : S->operands()) in getRelevantLoop()
[all …]
H A DLoopConstrainer.cpp19 static bool isSafeDecreasingBound(const SCEV *Start, const SCEV *BoundSCEV, in isSafeDecreasingBound()
20 const SCEV *Step, ICmpInst::Predicate Pred, in isSafeDecreasingBound()
53 const SCEV *StepPlusOne = SE.getAddExpr(Step, SE.getOne(Step->getType())); in isSafeDecreasingBound()
57 const SCEV *Limit = SE.getMinusSCEV(SE.getConstant(Min), StepPlusOne); in isSafeDecreasingBound()
59 const SCEV *MinusOne = in isSafeDecreasingBound()
68 static bool isSafeIncreasingBound(const SCEV *Start, const SCEV *BoundSCEV, in isSafeIncreasingBound()
69 const SCEV *Step, ICmpInst::Predicate Pred, in isSafeIncreasingBound()
100 const SCEV *StepMinusOne = SE.getMinusSCEV(Step, SE.getOne(Step->getType())); in isSafeIncreasingBound()
104 const SCEV *Limit = SE.getMinusSCEV(SE.getConstant(Max), StepMinusOne); in isSafeIncreasingBound()
115 static const SCEV *getNarrowestLatchMaxTakenCountEstimate(ScalarEvolution &SE, in getNarrowestLatchMaxTakenCountEstimate()
[all …]

1234