Home
last modified time | relevance | path

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

12345678910

/llvm-project-15.0.7/llvm/include/llvm/Analysis/
H A DScalarEvolution.h141 SCEV(const SCEV &) = delete;
571 const SCEV *getAddExpr(const SCEV *LHS, const SCEV *RHS,
577 const SCEV *getAddExpr(const SCEV *Op0, const SCEV *Op1, const SCEV *Op2,
586 const SCEV *getMulExpr(const SCEV *LHS, const SCEV *RHS,
592 const SCEV *getMulExpr(const SCEV *Op0, const SCEV *Op1, const SCEV *Op2,
598 const SCEV *getUDivExpr(const SCEV *LHS, const SCEV *RHS);
600 const SCEV *getURemExpr(const SCEV *LHS, const SCEV *RHS);
630 const SCEV *getSMaxExpr(const SCEV *LHS, const SCEV *RHS);
632 const SCEV *getUMaxExpr(const SCEV *LHS, const SCEV *RHS);
634 const SCEV *getSMinExpr(const SCEV *LHS, const SCEV *RHS);
[all …]
H A DDependenceAnalysis.h53 class SCEV; variable
385 const SCEV *A;
386 const SCEV *B;
387 const SCEV *C;
439 void setLine(const SCEV *A, const SCEV *B,
565 bool isKnownLessThan(const SCEV *S, const SCEV *Size) const;
789 const SCEV *getPositivePart(const SCEV *X) const;
793 const SCEV *getNegativePart(const SCEV *X) const;
900 const SCEV *findCoefficient(const SCEV *Expr,
908 const SCEV *zeroCoefficient(const SCEV *Expr,
[all …]
H A DScalarEvolutionExpressions.h60 class SCEVConstant : public SCEV {
86 class SCEVCastExpr : public SCEV {
190 const SCEV *const *Operands;
300 SCEVUDivExpr(const FoldingSetNodeIDRef ID, const SCEV *lhs, const SCEV *rhs) in SCEVUDivExpr()
392 const SCEV *evaluateAtIteration(const SCEV *It, ScalarEvolution &SE) const;
396 static const SCEV *evaluateAtIteration(ArrayRef<const SCEV *> Operands,
671 void push(const SCEV *S) { in push()
765 DenseMap<const SCEV *, const SCEV *> RewriteResults;
770 const SCEV *visit(const SCEV *S) { in visit()
913 static const SCEV *rewrite(const SCEV *Scev, ScalarEvolution &SE, in rewrite()
[all …]
H A DDelinearization.h26 class SCEV; variable
32 SmallVectorImpl<const SCEV *> &Terms,
33 SmallVectorImpl<const SCEV *> &Sizes,
34 const SCEV *ElementSize);
38 void collectParametricTerms(ScalarEvolution &SE, const SCEV *Expr,
39 SmallVectorImpl<const SCEV *> &Terms);
43 void computeAccessFunctions(ScalarEvolution &SE, const SCEV *Expr,
110 void delinearize(ScalarEvolution &SE, const SCEV *Expr,
111 SmallVectorImpl<const SCEV *> &Subscripts,
112 SmallVectorImpl<const SCEV *> &Sizes, const SCEV *ElementSize);
[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);
58 SCEVDivision(ScalarEvolution &S, const SCEV *Numerator,
59 const SCEV *Denominator);
63 void cannotDivide(const SCEV *Numerator);
66 const SCEV *Denominator, *Quotient, *Remainder, *Zero, *One;
H A DLoopCacheAnalysis.h30 class SCEV; variable
56 const SCEV *getBasePointer() const { return BasePointer; } in getBasePointer()
58 const SCEV *getSubscript(unsigned SubNum) const { in getSubscript()
62 const SCEV *getFirstSubscript() const { in getFirstSubscript()
66 const SCEV *getLastSubscript() const { in getLastSubscript()
102 bool tryDelinearizeFixedSize(const SCEV *AccessFn,
123 const SCEV *getLastCoefficient() const;
127 bool isCoeffForLoopZeroOrInvariant(const SCEV &Subscript,
146 const SCEV *BasePointer = nullptr;
149 SmallVector<const SCEV *, 3> Subscripts;
[all …]
H A DScalarEvolutionNormalization.h45 class SCEV; variable
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,
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DDelinearization.cpp57 bool follow(const SCEV *S) { in follow()
72 bool follow(const SCEV *S) { in follow()
97 bool follow(const SCEV *S) { in follow()
132 bool follow(const SCEV *S) { in follow()
223 const SCEV *Q, *R; in findArrayDimensionsRec()
246 for (const SCEV *T : Terms) in containsParameters()
260 static const SCEV *removeConstantFactors(ScalarEvolution &SE, const SCEV *T) { in removeConstantFactors()
302 llvm::sort(Terms, [](const SCEV *LHS, const SCEV *RHS) { in findArrayDimensions()
309 const SCEV *Q, *R; in findArrayDimensions()
354 const SCEV *Res = Expr; in computeAccessFunctions()
[all …]
H A DScalarEvolution.cpp1149 const SCEV *visit(const SCEV *S) { in getLosslessPtrToIntExpr()
1841 (SCEV::NoWrapFlags)(SCEV::FlagNSW | SCEV::FlagNUW), in getZeroExtendExpr()
1975 (SCEV::NoWrapFlags)(SCEV::FlagNSW | SCEV::FlagNUW), in getSignExtendExpr()
2289 const SCEV *(ScalarEvolution::*Operation)(const SCEV *, const SCEV *, in willNotOverflow()
3754 SCEV::NoWrapFlags Flags = IsNSW ? SCEV::FlagNSW : SCEV::FlagAnyWrap; in getAbsExpr()
4181 const SCEV *ScalarEvolution::getSMaxExpr(const SCEV *LHS, const SCEV *RHS) { in getSMaxExpr()
4209 const SCEV *ScalarEvolution::getUMinExpr(const SCEV *LHS, const SCEV *RHS, in getUMinExpr()
4513 const SCEV *ScalarEvolution::getMinusSCEV(const SCEV *LHS, const SCEV *RHS, in getMinusSCEV()
10541 std::pair<const SCEV *, const SCEV *>
11060 auto NoWrapFlags = SCEV::NoWrapFlags(SCEV::FlagNUW | SCEV::FlagNW); in isLoopBackedgeGuardedByCond()
[all …]
H A DDependenceAnalysis.cpp1120 bool DependenceInfo::testZIV(const SCEV *Src, const SCEV *Dst, in testZIV()
1304 const SCEV *Coeff, const SCEV *SrcConst, const SCEV *DstConst, in weakCrossingSIVtest()
2231 bool DependenceInfo::testRDIV(const SCEV *Src, const SCEV *Dst, in testRDIV()
2297 bool DependenceInfo::testMIV(const SCEV *Src, const SCEV *Dst, in testMIV()
2339 bool DependenceInfo::gcdMIVtest(const SCEV *Src, const SCEV *Dst, in gcdMIVtest()
2548 const SCEV *A0; in banerjeeMIVtest()
2551 const SCEV *B0; in banerjeeMIVtest()
2921 const SCEV *DependenceInfo::getPositivePart(const SCEV *X) const { in getPositivePart()
3018 const SCEV *DependenceInfo::findCoefficient(const SCEV *Expr, in findCoefficient()
3034 const SCEV *DependenceInfo::zeroCoefficient(const SCEV *Expr, in zeroCoefficient()
[all …]
H A DScalarEvolutionDivision.cpp30 static inline int sizeOfSCEV(const SCEV *S) { in sizeOfSCEV()
36 bool follow(const SCEV *S) { in sizeOfSCEV()
56 const SCEV *Denominator, const SCEV **Quotient, in divide()
85 const SCEV *Q, *R; in divide()
87 for (const SCEV *Op : T->operands()) { in divide()
130 const SCEV *StartQ, *StartR, *StepQ, *StepR; in visitAddRecExpr()
147 SmallVector<const SCEV *, 2> Qs, Rs; in visitAddExpr()
151 const SCEV *Q, *R; in visitAddExpr()
173 SmallVector<const SCEV *, 2> Qs; in visitMulExpr()
188 const SCEV *Q, *R; in visitMulExpr()
[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 *llvm::normalizeForPostIncUseIf(const SCEV *S, NormalizePredTy Pred, in normalizeForPostIncUseIf()
111 const SCEV *llvm::denormalizeForPostIncUse(const SCEV *S, in denormalizeForPostIncUse()
H A DLoopCacheAnalysis.cpp81 static bool isOneDimensionalArray(const SCEV &AccessFn, const SCEV &ElemSize, in isOneDimensionalArray()
90 const SCEV *Start = AR->getStart(); in isOneDimensionalArray()
109 static const SCEV *computeTripCount(const Loop &L, const SCEV &ElemSize, in computeTripCount()
141 for (const SCEV *Size : R.Sizes) in operator <<()
291 const SCEV *RefCost = nullptr; in computeRefCost()
292 const SCEV *Stride = nullptr; in computeRefCost()
324 const SCEV *TripCount = in computeRefCost()
348 const SCEV *AccessFn, SmallVectorImpl<const SCEV *> &Subscripts) { in tryDelinearizeFixedSize()
377 const SCEV *AccessFn = in delinearize()
477 const SCEV *ElemSize = Sizes.back(); in isConsecutive()
[all …]
/llvm-project-15.0.7/llvm/test/Other/
H A Dloop-pm-invalidation.ll33 ; CHECK-SCEV-INV: Running pass: LoopSimplifyPass
38 ; CHECK-SCEV-INV-NEXT: Running pass: LCSSAPass
41 ; CHECK-SCEV-INV-NEXT: Running pass: LCSSAPass
76 ; CHECK-SCEV-INV-NEXT: Running pass: LCSSAPass
81 ; CHECK-SCEV-INV-NEXT: Running pass: NoOpLoopPass
87 ; CHECK-SCEV-INV-NEXT: Running pass: LCSSAPass
130 ; CHECK-SCEV-INV: Running pass: LoopSimplifyPass
135 ; CHECK-SCEV-INV-NEXT: Running pass: LCSSAPass
148 ; CHECK-SCEV-INV-NEXT: Running pass: LCSSAPass
201 ; CHECK-SCEV-INV-NEXT: Running pass: LCSSAPass
[all …]
/llvm-project-15.0.7/polly/lib/Support/
H A DScopHelper.cpp254 const SCEV *visit(const SCEV *E) { in visit()
272 DenseMap<const SCEV *, const SCEV *> SCEVCache;
359 SmallVector<const SCEV *, 4> NewOps; in visitAddExpr()
360 for (const SCEV *Op : E->operands()) in visitAddExpr()
365 SmallVector<const SCEV *, 4> NewOps; in visitMulExpr()
366 for (const SCEV *Op : E->operands()) in visitMulExpr()
371 SmallVector<const SCEV *, 4> NewOps; in visitUMaxExpr()
372 for (const SCEV *Op : E->operands()) in visitUMaxExpr()
377 SmallVector<const SCEV *, 4> NewOps; in visitSMaxExpr()
378 for (const SCEV *Op : E->operands()) in visitSMaxExpr()
[all …]
/llvm-project-15.0.7/polly/include/polly/Support/
H A DSCEVValidator.h27 void findLoops(const llvm::SCEV *Expr,
36 void findValues(const llvm::SCEV *Expr, llvm::ScalarEvolution &SE,
47 bool hasScalarDepsInsideRegion(const llvm::SCEV *Expr, const llvm::Region *R,
51 const llvm::SCEV *Expression, llvm::ScalarEvolution &SE,
60 const llvm::SCEV *Expression,
69 std::pair<const llvm::SCEVConstant *, const llvm::SCEV *>
70 extractConstantFactor(const llvm::SCEV *M, llvm::ScalarEvolution &SE);
78 const llvm::SCEV *tryForwardThroughPHI(const llvm::SCEV *Expr, llvm::Region &R,
/llvm-project-15.0.7/llvm/test/Transforms/LoopRotate/
H A Dpr51981-scev-problem.ll12 ; Verify that we get the same SCEV expressions after loop-rotate, regardless
19 ; CHECK-SCEV: Classifying expressions for: @test_function
20 ; CHECK-SCEV: %wide = load i32, i32* @offset, align 1
22 ; CHECK-SCEV: %narrow = trunc i32 %wide to i16
24 ; CHECK-SCEV: %iv = phi i16 [ %narrow, %loop.inner.ph ], [ %iv.plus, %loop.inner ]
27 ; CHECK-SCEV: Classifying expressions for: @test_function
28 ; CHECK-SCEV: %wide1 = load i32, i32* @offset, align 1
29 ; CHECK-SCEV: --> %wide1 U: full-set S: full-set
30 ; CHECK-SCEV: %wide2 = phi i32 [ %wide1, %loop.inner.ph.lr.ph ], [ %wide, %loop.outer.latch ]
32 ; CHECK-SCEV: %narrow = trunc i32 %wide2 to i16
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/Scalar/
H A DLoopStrengthReduce.cpp372 const SCEV *ScaledReg = nullptr;
447 for (const SCEV *S : MyGood) in DoInitialMatch()
449 for (const SCEV *S : MyBad) in DoInitialMatch()
682 static const SCEV *getExactSDiv(const SCEV *LHS, const SCEV *RHS, in getExactSDiv()
1617 for (const SCEV *S : OldRegs) in RecomputeRegs()
1891 const SCEV *IncExpr;
2607 const SCEV *Copy = Expr; in getUse()
2805 static const SCEV *getExprBase(const SCEV *S) { in getExprBase()
3577 static const SCEV *CollectSubexprs(const SCEV *S, const SCEVConstant *C, in CollectSubexprs()
3623 const SCEV *Remainder = in CollectSubexprs()
[all …]
H A DInductiveRangeCheckElimination.cpp144 const SCEV *Step = nullptr;
145 const SCEV *End = nullptr;
186 const SCEV *Begin;
187 const SCEV *End;
190 Range(const SCEV *Begin, const SCEV *End) : Begin(Begin), End(End) { in Range()
658 const SCEV *BoundSCEV, const SCEV *Step, in isSafeDecreasingBound()
697 const SCEV *MinusOne = in isSafeDecreasingBound()
708 const SCEV *BoundSCEV, const SCEV *Step, in isSafeIncreasingBound()
841 return AR->getNoWrapFlags(SCEV::FlagNSW) != SCEV::FlagAnyWrap; in parseLoopStructure()
1055 static const SCEV *NoopOrExtend(const SCEV *S, Type *Ty, ScalarEvolution &SE, in NoopOrExtend()
[all …]
/llvm-project-15.0.7/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;
/llvm-project-15.0.7/llvm/include/llvm/Transforms/Utils/
H A DScalarEvolutionExpander.h34 explicit SCEVOperand(unsigned Opc, int Idx, const SCEV *S) : in SCEVOperand()
41 const SCEV* S;
61 DenseMap<std::pair<const SCEV *, Instruction *>, TrackingVH<Value>>
77 DenseMap<const SCEV *, const Loop *> RelevantLoops;
233 SmallPtrSet<const SCEV *, 8> Processed;
263 bool isSafeToExpand(const SCEV *S) const;
280 Value *expandCodeFor(const SCEV *SH, Type *Ty = nullptr) {
399 Value *expandCodeForImpl(const SCEV *SH, Type *Ty, bool Root);
436 Value *expandAddToGEP(const SCEV *const *op_begin, const SCEV *const *op_end,
443 Value *expand(const SCEV *S);
[all …]
/llvm-project-15.0.7/llvm/test/Transforms/SimpleLoopUnswitch/
H A Dupdate-scev.ll3 ; RUN: FileCheck %s --check-prefix=SCEV < %t.scev
12 ; Check that SCEV has no trip count before unswitching.
13 ; SCEV-LABEL: Determining loop execution counts for: @test1
15 ; SCEV: Loop %outer_loop_begin: Unpredictable backedge-taken count.
19 ; SCEV-LABEL: Determining loop execution counts for: @test1
71 ; Check that SCEV has no trip count before unswitching.
72 ; SCEV-LABEL: Determining loop execution counts for: @test2
78 ; SCEV-LABEL: Determining loop execution counts for: @test2
132 ; Check that SCEV has no trip count before unswitching.
133 ; SCEV-LABEL: Determining loop execution counts for: @test3
[all …]
/llvm-project-15.0.7/llvm/unittests/Analysis/
H A DScalarEvolutionTest.cpp67 static bool matchURem(ScalarEvolution &SE, const SCEV *Expr, const SCEV *&LHS, in matchURem()
74 const SCEV *RHS, ICmpInst::Predicate FoundPred, const SCEV *FoundLHS, in isImpliedCond()
75 const SCEV *FoundRHS) { in isImpliedCond()
95 const SCEV *S0 = SE.getSCEV(V0); in TEST_F()
96 const SCEV *S1 = SE.getSCEV(V1); in TEST_F()
252 const SCEV *B, const SCEV *C) { in TEST_F()
450 ScalarEvolution::setFlags(SCEV::FlagNUW, SCEV::FlagNSW)); in TEST_F()
458 ScalarEvolution::setFlags(SCEV::FlagNUW, SCEV::FlagNSW))); in TEST_F()
1151 auto diff = [&SE](const SCEV *LHS, const SCEV *RHS) -> Optional<int> { in TEST_F()
1481 const SCEV *LHS, *RHS; in TEST_F()
[all …]
/llvm-project-15.0.7/polly/test/CodeGen/MemAccess/
H A Dgenerate-all.ll2 ; RUN: -S < %s | FileCheck %s -check-prefix=SCEV
11 ; SCEV: polly.stmt.bb2: ; preds = %polly.loop_header
12 ; SCEV-NEXT: %0 = trunc i64 %polly.indvar to i2
13 ; SCEV-NEXT: %1 = zext i2 %0 to i64
14 ; SCEV-NEXT: %scevgep = getelementptr float, float* %A, i64 %1
15 ; SCEV-NEXT: %tmp4_p_scalar_ = load float, float* %scevgep, align 4, !alias.scope !0, !noalias !3
16 ; SCEV-NEXT: %p_tmp5 = fadd float %tmp4_p_scalar_, 1.000000e+01
17 ; SCEV-NEXT: store float %p_tmp5, float* %scevgep, align 4, !alias.scope !0, !noalias !3
18 ; SCEV-NEXT: %polly.indvar_next = add nsw i64 %polly.indvar, 1
19 ; SCEV-NEXT: %polly.loop_cond = icmp sle i64 %polly.indvar_next, 99
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DScalarEvolutionExpander.cpp281 if (Flags & SCEV::FlagNUW) in InsertBinop()
283 if (Flags & SCEV::FlagNSW) in InsertBinop()
293 static bool FactorOutConstant(const SCEV *&S, const SCEV *&Remainder, in FactorOutConstant()
765 const SCEV *Op = I->second; in visitAddExpr()
1146 const SCEV *ExtendAfterOp = in IsIncrementNSW()
1160 const SCEV *ExtendAfterOp = in IsIncrementNUW()
1632 const SCEV *NewS = S; in visitAddRecExpr()
1972 const SCEV *TruncExpr = in replaceCongruentIVs()
2253 const SCEV *S = WorkItem.S; in isHighCostExpansionHelper()
2371 const SCEV *ExitCount = in generateOverflowCheck()
[all …]

12345678910