Searched refs:SCEV (Results 1 - 25 of 72) sorted by relevance

123

/freebsd-11-stable/contrib/llvm-project/llvm/include/llvm/Analysis/
H A DScalarEvolutionNormalization.h46 class SCEV;
54 const SCEV *normalizeForPostIncUse(const SCEV *S, const PostIncLoopSet &Loops,
59 const SCEV *normalizeForPostIncUseIf(const SCEV *S, NormalizePredTy Pred,
64 const SCEV *denormalizeForPostIncUse(const SCEV *S, const PostIncLoopSet &Loops,
H A DScalarEvolution.h12 // SCEV class. Given this analysis, trip counts of loops and other important
76 class SCEV : public FoldingSetNode { class in namespace:llvm
77 friend struct FoldingSetTrait<SCEV>;
83 // The SCEV baseclass this node corresponds to
121 explicit SCEV(const FoldingSetNodeIDRef ID, unsigned SCEVTy, function in class:llvm::SCEV
124 SCEV(const SCEV &) = delete;
125 SCEV &operator=(const SCEV &) = delete;
129 /// Return the LLVM type of this SCEV expressio
520 getAddExpr(const SCEV *LHS, const SCEV *RHS, SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap, unsigned Depth = 0) argument
526 getAddExpr(const SCEV *Op0, const SCEV *Op1, const SCEV *Op2, SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap, unsigned Depth = 0) argument
535 getMulExpr(const SCEV *LHS, const SCEV *RHS, SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap, unsigned Depth = 0) argument
541 getMulExpr(const SCEV *Op0, const SCEV *Op1, const SCEV *Op2, SCEV::NoWrapFlags Flags = SCEV::FlagAnyWrap, unsigned Depth = 0) argument
[all...]
H A DDependenceAnalysis.h52 class SCEV;
101 const SCEV *Distance; // NULL implies no distance available.
161 virtual const SCEV *getDistance(unsigned Level) const { return nullptr; }
242 const SCEV *getDistance(unsigned Level) const override;
331 const SCEV *getSplitIteration(const Dependence &Dep, unsigned Level);
345 const SCEV *Src;
346 const SCEV *Dst;
354 const SCEV *Coeff;
355 const SCEV *PosPart;
356 const SCEV *NegPar
[all...]
H A DScalarEvolutionExpressions.h1 //===- llvm/Analysis/ScalarEvolutionExpressions.h - SCEV Exprs --*- C++ -*-===//
47 class SCEVConstant : public SCEV {
53 SCEV(ID, scConstant, 1), V(v) {}
62 static bool classof(const SCEV *S) {
67 static unsigned short computeExpressionSize(ArrayRef<const SCEV *> Args) {
75 class SCEVCastExpr : public SCEV {
77 const SCEV *Op;
81 unsigned SCEVTy, const SCEV *op, Type *ty);
84 const SCEV *getOperand() const { return Op; }
88 static bool classof(const SCEV *
[all...]
H A DLoopCacheAnalysis.h53 const SCEV *getBasePointer() const { return BasePointer; }
55 const SCEV *getSubscript(unsigned SubNum) const {
59 const SCEV *getFirstSubscript() const {
63 const SCEV *getLastSubscript() const {
108 const SCEV *getLastCoefficient() const;
112 bool isCoeffForLoopZeroOrInvariant(const SCEV &Subscript,
117 bool isSimpleAddRecurrence(const SCEV &Subscript, const Loop &L) const;
131 const SCEV *BasePointer = nullptr;
134 SmallVector<const SCEV *, 3> Subscripts;
137 SmallVector<const SCEV *,
[all...]
H A DScalarEvolutionExpander.h1 //===---- llvm/Analysis/ScalarEvolutionExpander.h - SCEV Exprs --*- C++ -*-===//
31 bool isSafeToExpand(const SCEV *S, ScalarEvolution &SE);
36 bool isSafeToExpandAt(const SCEV *S, const Instruction *InsertionPoint,
53 DenseMap<std::pair<const SCEV *, Instruction *>, TrackingVH<Value>>
60 /// A memoization of the "relevant" loop for a given SCEV.
61 DenseMap<const SCEV *, const Loop *> RelevantLoops;
100 // InsertPointGuards stack when insert points are moved during SCEV
180 bool isHighCostExpansion(const SCEV *Expr, Loop *L,
182 SmallPtrSet<const SCEV *, 8> Processed;
205 /// Insert code to directly compute the specified SCEV expressio
[all...]
H A DIVUsers.h29 class SCEV;
127 /// reducible SCEV, recursively add its users to the IVUsesByStride set and
133 /// getReplacementExpr - Return a SCEV expression which computes the
135 const SCEV *getReplacementExpr(const IVStrideUse &IU) const;
138 const SCEV *getExpr(const IVStrideUse &IU) const;
140 const SCEV *getStride(const IVStrideUse &IU, const Loop *L) const;
H A DLoopAccessAnalysis.h35 class SCEV;
258 /// A wrapper around ScalarEvolution, used to add runtime SCEV checks, and
259 /// applies dynamic knowledge to simplify SCEV expressions and convert them
260 /// to a more usable form. We need this in case assumptions about SCEV
341 const SCEV *Start;
344 const SCEV *End;
352 /// SCEV for the access.
353 const SCEV *Expr;
355 PointerInfo(Value *PointerValue, const SCEV *Start, const SCEV *En
[all...]
H A DIVDescriptors.h46 class SCEV;
282 const SCEV *getStep() const { return Step; }
288 /// this induction. If by some other means the caller has a better SCEV
295 InductionDescriptor &D, const SCEV *Expr = nullptr,
306 /// further SCEV predicates to \p PSE in order to prove that \p Phi is an
341 /// SCEV overflow check.
348 InductionDescriptor(Value *Start, InductionKind K, const SCEV *Step,
357 const SCEV *Step = nullptr;
361 // that are redundant when guarded with a runtime SCEV overflow check.
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Analysis/
H A DScalarEvolutionNormalization.cpp42 const SCEV *visitAddRecExpr(const SCEVAddRecExpr *Expr);
46 const SCEV *
48 SmallVector<const SCEV *, 8> Operands;
51 [&](const SCEV *Op) { return visit(Op); });
54 return SE.getAddRecExpr(Operands, AR->getLoop(), SCEV::FlagAnyWrap);
57 // incrementing a SCEV expression with respect to a set of loops. Since
71 // incrementing a SCEV expression (in general) changes the step of the SCEV
93 return SE.getAddRecExpr(Operands, AR->getLoop(), SCEV::FlagAnyWrap);
96 const SCEV *llv
[all...]
H A DScalarEvolution.cpp14 // scalar expressions, which are represented as subclasses of the SCEV class.
16 // can handle. We only create one SCEV of a particular shape, so
19 // One important aspect of the SCEV objects is that they are never cyclic, even
153 cl::desc("Maximum number of iterations SCEV will "
172 cl::desc("Verify IR correctness when making sensitive SCEV queries (slow)"),
177 cl::desc("Threshold for inlining multiplication operands into a SCEV"),
182 cl::desc("Threshold for inlining addition operands into a SCEV"),
187 cl::desc("Maximum depth of recursive SCEV complexity comparisons"),
192 cl::desc("Maximum depth of recursive SCEV operations implication analysis"),
231 // SCEV clas
[all...]
H A DDependenceAnalysis.cpp27 // analysis is using SCEV->delinearize to recover the representation of multiple
33 // Subtract, or Multiply, with both APInt's and SCEV's.
39 // Finally, it seems like certain test cases expose weaknesses in the SCEV
276 const SCEV *FullDependence::getDistance(unsigned Level) const {
319 const SCEV *DependenceInfo::Constraint::getX() const {
327 const SCEV *DependenceInfo::Constraint::getY() const {
335 const SCEV *DependenceInfo::Constraint::getA() const {
344 const SCEV *DependenceInfo::Constraint::getB() const {
353 const SCEV *DependenceInfo::Constraint::getC() const {
362 const SCEV *DependenceInf
[all...]
H A DLoopCacheAnalysis.cpp75 static bool isOneDimensionalArray(const SCEV &AccessFn, const SCEV &ElemSize,
84 const SCEV *Start = AR->getStart();
85 const SCEV *Step = AR->getStepRecurrence(SE);
96 /// Compute the trip count for the given loop \p L. Return the SCEV expression
98 static const SCEV *computeTripCount(const Loop &L, ScalarEvolution &SE) {
99 const SCEV *BackedgeTakenCount = SE.getBackedgeTakenCount(&L);
119 for (const SCEV *Subscript : R.Subscripts)
123 for (const SCEV *Size : R.Sizes)
171 const SCEV *LastSubscrip
[all...]
H A DScalarEvolutionExpander.cpp171 SCEV::NoWrapFlags Flags, bool IsSafeToHoist) {
193 if (I->hasNoSignedWrap() != (Flags & SCEV::FlagNSW))
195 if (I->hasNoUnsignedWrap() != (Flags & SCEV::FlagNUW))
230 if (Flags & SCEV::FlagNUW)
232 if (Flags & SCEV::FlagNSW)
243 static bool FactorOutConstant(const SCEV *&S, const SCEV *&Remainder,
244 const SCEV *Factor, ScalarEvolution &SE,
269 const SCEV *Div = SE.getConstant(CI);
286 SmallVector<const SCEV *,
[all...]
H A DScalarEvolutionAliasAnalysis.cpp1 //===- ScalarEvolutionAliasAnalysis.cpp - SCEV-based Alias Analysis -------===//
34 const SCEV *AS = SE.getSCEV(const_cast<Value *>(LocA.Ptr));
35 const SCEV *BS = SE.getSCEV(const_cast<Value *>(LocB.Ptr));
54 const SCEV *BA = SE.getMinusSCEV(BS, AS);
68 const SCEV *AB = SE.getMinusSCEV(AS, BS);
100 Value *SCEVAAResult::GetBaseValue(const SCEV *S) {
107 const SCEV *Last = A->getOperand(A->getNumOperands() - 1);
/freebsd-11-stable/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/
H A DAlignmentFromAssumptions.h38 bool extractAlignmentInfo(CallInst *I, Value *&AAPtr, const SCEV *&AlignSCEV,
39 const SCEV *&OffSCEV);
H A DNaryReassociate.h39 // an expression is computed before, we store each instruction seen and its SCEV
40 // into an SCEV-to-instruction map.
96 class SCEV;
146 Instruction *tryReassociatedBinaryOp(const SCEV *LHS, Value *RHS,
152 // Gets SCEV for (LHS op RHS).
153 const SCEV *getBinarySCEV(BinaryOperator *I, const SCEV *LHS,
154 const SCEV *RHS);
158 Instruction *findClosestMatchingDominator(const SCEV *CandidateExpr,
174 // A lookup table quickly telling which instructions compute the given SCEV
[all...]
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DLoopStrengthReduce.cpp28 // The SCEV for %i is {0,+,1}<%L>. The SCEV for %i.next is {1,+,1}<%L>, however
235 using RegUsesTy = DenseMap<const SCEV *, RegSortData>;
238 SmallVector<const SCEV *, 16> RegSequence;
241 void countRegister(const SCEV *Reg, size_t LUIdx);
242 void dropRegister(const SCEV *Reg, size_t LUIdx);
245 bool isRegUsedByUsesOtherThan(const SCEV *Reg, size_t LUIdx) const;
247 const SmallBitVector &getUsedByIndices(const SCEV *Reg) const;
251 using iterator = SmallVectorImpl<const SCEV *>::iterator;
252 using const_iterator = SmallVectorImpl<const SCEV *>
[all...]
H A DInductiveRangeCheckElimination.cpp142 const SCEV *Begin = nullptr;
143 const SCEV *Step = nullptr;
144 const SCEV *End = nullptr;
158 const SCEV *getBegin() const { return Begin; }
159 const SCEV *getStep() const { return Step; }
160 const SCEV *getEnd() const { return End; }
187 const SCEV *Begin;
188 const SCEV *End;
191 Range(const SCEV *Begin, const SCEV *En
[all...]
H A DAlignmentFromAssumptions.cpp90 // to a constant. Using SCEV to compute alignment handles the case where
93 static unsigned getNewAlignmentDiff(const SCEV *DiffSCEV,
94 const SCEV *AlignSCEV,
97 const SCEV *DiffUnitsSCEV = SE->getURemExpr(DiffSCEV, AlignSCEV);
126 static unsigned getNewAlignment(const SCEV *AASCEV, const SCEV *AlignSCEV,
127 const SCEV *OffSCEV, Value *Ptr,
129 const SCEV *PtrSCEV = SE->getSCEV(Ptr);
130 const SCEV *DiffSCEV = SE->getMinusSCEV(PtrSCEV, AASCEV);
158 const SCEV *DiffStartSCE
[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
241 const SCEV *Limit;
243 const SCEV *Limit)
264 bool isSupportedStep(const SCEV* Step);
273 /// Same as above, *except* that this uses the SCEV definition of invariant
277 Instruction *findInsertPt(Instruction *User, ArrayRef<const SCEV*> Ops);
282 bool isLoopInvariantValue(const SCEV* S);
285 ICmpInst::Predicate Pred, const SCEV *LHS,
286 const SCEV *RH
[all...]
H A DNaryReassociate.cpp39 // an expression is computed before, we store each instruction seen and its SCEV
40 // into an SCEV-to-instruction map.
238 const SCEV *OldSCEV = SE->getSCEV(&*I);
258 const SCEV *NewSCEV = SE->getSCEV(&*I);
275 // map both SCEV before and after tryReassociate(I) to I.
370 // Look for GEP's closest dominator that has the same SCEV as GEP except that
372 SmallVector<const SCEV *, 4> IndexExprs;
387 const SCEV *CandidateExpr = SE->getGEPExpr(cast<GEPOperator>(GEP),
457 const SCEV *AExpr = SE->getSCEV(A), *BExpr = SE->getSCEV(B);
458 const SCEV *RHSExp
[all...]
H A DIndVarSimplify.cpp100 // implement a strong expression equivalence checker in SCEV. Until then, we
164 const SCEV *ExitCount,
180 /// Return true if the SCEV expansion generated by the rewriter can replace the
181 /// original value. SCEV guarantees that it produces the same value, but the way
185 // If an SCEV expression subsumed multiple pointers, its expansion could
189 // could fail in a dangerous way. Ultimately, SCEV will be improved to avoid
194 // because it understands lcssa phis while SCEV does not.
208 // SCEV may have rewritten an expression that produces the GEP's pointer
211 // base of a recurrence. This handles the case in which SCEV expansion
219 const SCEV *FromBas
1971 IndVarSimplifyVisitor(PHINode *IV, ScalarEvolution *SCEV, const TargetTransformInfo *TTI, const DominatorTree *DTree) argument
[all...]
/freebsd-11-stable/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DSimplifyIndVar.cpp51 /// other loop passes that preserve SCEV.
111 const SCEV *FoldedExpr = nullptr;
155 // Bypass the operand if SCEV can prove it has no effect.
163 assert(SE->getSCEV(UseInst) == FoldedExpr && "bad SCEV with folded oper");
189 const SCEV *S = SE->getSCEVAtScope(ICmp->getOperand(IVOperIdx), ICmpLoop);
190 const SCEV *X = SE->getSCEVAtScope(ICmp->getOperand(1 - IVOperIdx), ICmpLoop);
193 const SCEV *InvariantLHS, *InvariantRHS;
206 SmallDenseMap<const SCEV*, Value*> CheapExpansions;
216 const SCEV *IncomingS = SE->getSCEV(Incoming);
259 const SCEV *
[all...]
/freebsd-11-stable/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/
H A DLoopUtils.h49 class SCEV;
345 bool isKnownNegativeInLoop(const SCEV *S, const Loop *L, ScalarEvolution &SE);
349 bool isKnownNonNegativeInLoop(const SCEV *S, const Loop *L,
353 bool cannotBeMaxInLoop(const SCEV *S, const Loop *L, ScalarEvolution &SE,
357 bool cannotBeMinInLoop(const SCEV *S, const Loop *L, ScalarEvolution &SE,

Completed in 364 milliseconds

123