Home
last modified time | relevance | path

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

1234

/freebsd/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DScalarEvolution.h75 class SCEV : public FoldingSetNode {
76 friend struct FoldingSetTrait<SCEV>;
138 explicit SCEV(const FoldingSetNodeIDRef ID, SCEVTypes SCEVTy,
141 SCEV(const SCEV &) = delete;
142 SCEV &operator=(const SCEV &) = delete;
150 ArrayRef<const SCEV *> operands() const;
187 template <> struct FoldingSetTrait<SCEV> : DefaultFoldingSetTrait<SCEV> {
188 static void Profile(const SCEV &X, FoldingSetNodeID &ID) { ID = X.FastID; }
190 static bool Equals(const SCEV &X, const FoldingSetNodeID &ID, unsigned IDHash,
195 static unsigned ComputeHash(const SCEV &X, FoldingSetNodeID &TempID) {
[all …]
H A DDependenceAnalysis.h53 class SCEV; variable
100 const SCEV *Distance = nullptr; // NULL implies no distance available.
161 virtual const SCEV *getDistance(unsigned Level) const { return nullptr; } in getDistance()
254 const SCEV *getDistance(unsigned Level) const override;
353 const SCEV *getSplitIteration(const Dependence &Dep, unsigned Level);
367 const SCEV *Src;
368 const SCEV *Dst;
376 const SCEV *Coeff;
377 const SCEV *PosPart;
378 const SCEV *NegPar
[all...]
H A DScalarEvolutionExpressions.h1 //===- llvm/Analysis/ScalarEvolutionExpressions.h - SCEV Exprs --*- C++ -*-===//
60 class SCEVConstant : public SCEV {
66 : SCEV(ID, scConstant, 1), V(v) {} in SCEVConstant()
75 static bool classof(const SCEV *S) { return S->getSCEVType() == scConstant; }
80 class SCEVVScale : public SCEV {
84 : SCEV(ID, scVScale, 0), Ty(ty) {} in SCEVVScale()
92 static bool classof(const SCEV *S) { return S->getSCEVType() == scVScale; }
95 inline unsigned short computeExpressionSize(ArrayRef<const SCEV *> Args) {
103 class SCEVCastExpr : public SCEV {
105 const SCEV *O
[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.h31 class SCEV; variable
186 const DenseMap<Value *, const SCEV *> &SymbolicStrides, in MemoryDepChecker()
271 DenseMap<std::pair<const SCEV *, Type *>,
272 std::pair<const SCEV *, const SCEV *>> &
289 const DenseMap<Value *, const SCEV *> &SymbolicStrides;
337 DenseMap<std::pair<const SCEV *, Type *>,
338 std::pair<const SCEV *, const SCEV *>>
369 const SCEV *Dist;
376 DepDistanceStrideAndSizeInfo(const SCEV *Dist, uint64_t StrideA, in DepDistanceStrideAndSizeInfo()
410 bool addPointer(unsigned Index, const SCEV *Start, const SCEV *End,
[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.h31 class SCEV; variable
57 const SCEV *getBasePointer() const { return BasePointer; } in getBasePointer()
59 const SCEV *getSubscript(unsigned SubNum) const { in getSubscript()
63 const SCEV *getFirstSubscript() const { in getFirstSubscript()
67 const SCEV *getLastSubscript() const { in getLastSubscript()
103 bool tryDelinearizeFixedSize(const SCEV *AccessFn,
104 SmallVectorImpl<const SCEV *> &Subscripts);
114 bool isConsecutive(const Loop &L, const SCEV *&Stride, unsigned CLS) const;
124 const SCEV *getLastCoefficient() const;
128 bool isCoeffForLoopZeroOrInvariant(const SCEV
[all...]
H A DScalarEvolutionNormalization.h45 class SCEV; variable
55 const SCEV *normalizeForPostIncUse(const SCEV *S, const PostIncLoopSet &Loops,
61 const SCEV *normalizeForPostIncUseIf(const SCEV *S, NormalizePredTy Pred,
66 const SCEV *denormalizeForPostIncUse(const SCEV *S, const PostIncLoopSet &Loops,
/freebsd/contrib/llvm-project/llvm/lib/Analysis/
H A DDelinearization.cpp37 static inline bool containsUndefs(const SCEV *S) { in containsUndefs()
38 return SCEVExprContains(S, [](const SCEV *S) { in containsUndefs()
50 SmallVectorImpl<const SCEV *> &Strides;
52 SCEVCollectStrides(ScalarEvolution &SE, SmallVectorImpl<const SCEV *> &S) in SCEVCollectStrides()
55 bool follow(const SCEV *S) { in follow()
66 SmallVectorImpl<const SCEV *> &Terms;
68 SCEVCollectTerms(SmallVectorImpl<const SCEV *> &T) : Terms(T) {} in SCEVCollectTerms()
70 bool follow(const SCEV *S) { in follow()
95 bool follow(const SCEV *S) { in follow()
123 SmallVectorImpl<const SCEV *> &Terms;
[all …]
H A DScalarEvolution.cpp261 LLVM_DUMP_METHOD void SCEV::dump() const { in dump()
267 void SCEV::print(raw_ostream &OS) const { in print()
277 const SCEV *Op = PtrToInt->getOperand(); in print()
284 const SCEV *Op = Trunc->getOperand(); in print()
291 const SCEV *Op = ZExt->getOperand(); in print()
298 const SCEV *Op = SExt->getOperand(); in print()
348 for (const SCEV *Op : NAry->operands()) in print()
380 Type *SCEV::getType() const { in getType()
414 ArrayRef<const SCEV *> SCEV::operands() const { in operands()
442 bool SCEV::isZero() const { in isZero()
[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.cpp341 const SCEV *FullDependence::getDistance(unsigned Level) const { in getDistance()
384 const SCEV *DependenceInfo::Constraint::getX() const { in getX()
392 const SCEV *DependenceInfo::Constraint::getY() const { in getY()
400 const SCEV *DependenceInfo::Constraint::getA() const { in getA()
409 const SCEV *DependenceInfo::Constraint::getB() const { in getB()
418 const SCEV *DependenceInfo::Constraint::getC() const { in getC()
427 const SCEV *DependenceInfo::Constraint::getD() const { in getD()
440 void DependenceInfo::Constraint::setPoint(const SCEV *X, const SCEV *Y, in setPoint()
448 void DependenceInfo::Constraint::setLine(const SCEV *AA, const SCEV *BB, in setLine()
449 const SCEV *CC, const Loop *CurLoop) { 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 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()
H A DLoopAccessAnalysis.cpp154 const SCEV *llvm::replaceSymbolicStrideSCEV(PredicatedScalarEvolution &PSE, in replaceSymbolicStrideSCEV()
155 const DenseMap<Value *, const SCEV *> &PtrToStride, in replaceSymbolicStrideSCEV()
157 const SCEV *OrigSCEV = PSE.getSCEV(Ptr); in replaceSymbolicStrideSCEV()
161 DenseMap<Value *, const SCEV *>::const_iterator SI = PtrToStride.find(Ptr); in replaceSymbolicStrideSCEV()
166 const SCEV *StrideSCEV = SI->second; in replaceSymbolicStrideSCEV()
206 static std::pair<const SCEV *, const SCEV *> getStartAndEndForAccess( in getStartAndEndForAccess() argument
207 const Loop *Lp, const SCEV *PtrExpr, Type *AccessTy, in getStartAndEndForAccess()
209 DenseMap<std::pair<const SCEV *, Type *>, in getStartAndEndForAccess() argument
210 std::pair<const SCEV *, const SCEV *>> &PointerBounds) { in getStartAndEndForAccess()
219 const SCEV *ScStart; in getStartAndEndForAccess()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DInductiveRangeCheckElimination.cpp147 const SCEV *Begin = nullptr;
148 const SCEV *Step = nullptr;
149 const SCEV *End = nullptr;
154 const SCEV *&End);
164 const SCEV *&End);
168 const SCEVAddRecExpr *&Index, const SCEV *&End);
171 const SCEV *getBegin() const { return Begin; }
172 const SCEV *getStep() const { return Step; }
173 const SCEV *getEnd() const { return End; }
199 const SCEV *Begi
[all...]
H A DLoopStrengthReduce.cpp329 const SCEV *getSCEV(ScalarEvolution &SE, Type *Ty) const { in getSCEV()
330 const SCEV *S = SE.getConstant(Ty, Quantity); in getSCEV()
336 const SCEV *getNegativeSCEV(ScalarEvolution &SE, Type *Ty) const { in getNegativeSCEV()
337 const SCEV *NegS = SE.getConstant(Ty, -(uint64_t)Quantity); in getNegativeSCEV()
343 const SCEV *getUnknownSCEV(ScalarEvolution &SE, Type *Ty) const { in getUnknownSCEV()
344 const SCEV *SU = SE.getUnknown(ConstantInt::getSigned(Ty, Quantity)); in getUnknownSCEV()
394 using RegUsesTy = DenseMap<const SCEV *, RegSortData>;
397 SmallVector<const SCEV *, 16> RegSequence;
400 void countRegister(const SCEV *Reg, size_t LUIdx);
401 void dropRegister(const SCEV *Reg, size_t LUIdx);
[all …]
H A DAlignmentFromAssumptions.cpp47 // to a constant. Using SCEV to compute alignment handles the case where
50 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 *DiffStartSCE in getNewAlignment()
[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()
416 const SCEV *CandidateExpr = SE->getGEPExpr(cast<GEPOperator>(GEP), in tryReassociateGEPAtIndex()
486 const SCEV *AExpr = SE->getSCEV(A), *BExpr = SE->getSCEV(B); in tryReassociateBinaryOp()
487 const SCEV *RHSExpr = SE->getSCEV(RHS); in tryReassociateBinaryOp()
502 Instruction *NaryReassociatePass::tryReassociatedBinaryOp(const SCEV *LHSExpr, in tryReassociatedBinaryOp()
540 const SCEV *NaryReassociatePass::getBinarySCEV(BinaryOperator *I, in getBinarySCEV()
[all …]
H A DLoopPredication.cpp36 // It's tempting to rely on SCEV here, but it has proven to be problematic.
37 // Generally the facts SCEV provides about the increment step of add
251 const SCEV *Limit;
253 const SCEV *Limit) in LoopICmp()
274 bool isSupportedStep(const SCEV* Step);
283 /// Same as above, *except* that this uses the SCEV definition of invariant
288 ArrayRef<const SCEV *> Ops);
293 bool isLoopInvariantValue(const SCEV* S);
296 ICmpInst::Predicate Pred, const SCEV *LHS,
297 const SCEV *RH
[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.h34 explicit SCEVOperand(unsigned Opc, int Idx, const SCEV *S) : in SCEVOperand()
41 const SCEV* S;
74 DenseMap<std::pair<const SCEV *, Instruction *>, TrackingVH<Value>>
94 DenseMap<const SCEV *, const Loop *> RelevantLoops;
243 bool isHighCostExpansion(ArrayRef<const SCEV *> Exprs, Loop *L,
251 SmallPtrSet<const SCEV *, 8> Processed;
296 bool isSafeToExpand(const SCEV *S) const;
301 bool isSafeToExpandAt(const SCEV *S, const Instruction *InsertionPoint) const;
305 Value *expandCodeFor(const SCEV *SH, Type *Ty, BasicBlock::iterator I);
306 Value *expandCodeFor(const SCEV *SH, Type *Ty, Instruction *I) {
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DScalarEvolutionExpander.cpp253 SCEV::NoWrapFlags Flags, bool IsSafeToHoist) { in InsertBinop()
276 if (I->hasNoSignedWrap() != (Flags & SCEV::FlagNSW)) in InsertBinop()
278 if (I->hasNoUnsignedWrap() != (Flags & SCEV::FlagNUW)) in InsertBinop()
315 if (Flags & SCEV::FlagNUW) in InsertBinop()
317 if (Flags & SCEV::FlagNSW) in InsertBinop()
350 Value *SCEVExpander::expandAddToGEP(const SCEV *Offset, Value *V) { in expandAddToGEP()
415 const Loop *SCEVExpander::getRelevantLoop(const SCEV *S) { in getRelevantLoop()
441 for (const SCEV *Op : S->operands()) in getRelevantLoop()
466 bool operator()(std::pair<const Loop *, const SCEV *> LHS, in operator ()()
467 std::pair<const Loop *, const SCEV *> RHS) const { in operator ()()
[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