Home
last modified time | relevance | path

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

12345678910

/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/Analysis/
DScalarEvolution.h77 class SCEV : public FoldingSetNode {
78 friend struct FoldingSetTrait<SCEV>;
119 explicit SCEV(const FoldingSetNodeIDRef ID, unsigned SCEVTy)
121 SCEV(const SCEV &) = delete;
122 SCEV &operator=(const SCEV &) = delete;
151 template <> struct FoldingSetTrait<SCEV> : DefaultFoldingSetTrait<SCEV> {
152 static void Profile(const SCEV &X, FoldingSetNodeID &ID) { ID = X.FastID; }
154 static bool Equals(const SCEV &X, const FoldingSetNodeID &ID, unsigned IDHash,
159 static unsigned ComputeHash(const SCEV &X, FoldingSetNodeID &TempID) {
164 inline raw_ostream &operator<<(raw_ostream &OS, const SCEV &S) {
[all …]
DDependenceAnalysis.h53 class SCEV; variable
102 const SCEV *Distance; // NULL implies no distance available.
162 virtual const SCEV *getDistance(unsigned Level) const { return nullptr; } in getDistance()
243 const SCEV *getDistance(unsigned Level) const override;
328 const SCEV *getSplitIteration(const Dependence &Dep, unsigned Level);
342 const SCEV *Src;
343 const SCEV *Dst;
351 const SCEV *Coeff;
352 const SCEV *PosPart;
353 const SCEV *NegPart;
[all …]
DScalarEvolutionExpressions.h48 class SCEVConstant : public SCEV {
54 SCEV(ID, scConstant), V(v) {} in SCEVConstant()
63 static bool classof(const SCEV *S) { in classof()
69 class SCEVCastExpr : public SCEV {
71 const SCEV *Op;
75 unsigned SCEVTy, const SCEV *op, Type *ty);
78 const SCEV *getOperand() const { return Op; } in getOperand()
82 static bool classof(const SCEV *S) { in classof()
95 const SCEV *op, Type *ty);
99 static bool classof(const SCEV *S) { in classof()
[all …]
DScalarEvolutionNormalization.h47 class SCEV; variable
55 const SCEV *normalizeForPostIncUse(const SCEV *S, const PostIncLoopSet &Loops,
60 const SCEV *normalizeForPostIncUseIf(const SCEV *S, NormalizePredTy Pred,
65 const SCEV *denormalizeForPostIncUse(const SCEV *S, const PostIncLoopSet &Loops,
DScalarEvolutionExpander.h32 bool isSafeToExpand(const SCEV *S, ScalarEvolution &SE);
37 bool isSafeToExpandAt(const SCEV *S, const Instruction *InsertionPoint,
54 DenseMap<std::pair<const SCEV *, Instruction *>, TrackingVH<Value>>
62 DenseMap<const SCEV *, const Loop *> RelevantLoops;
177 bool isHighCostExpansion(const SCEV *Expr, Loop *L,
179 SmallPtrSet<const SCEV *, 8> Processed;
204 Value *expandCodeFor(const SCEV *SH, Type *Ty, Instruction *I);
210 Value *expandCodeFor(const SCEV *SH, Type *Ty = nullptr);
292 Value *getExactExistingExpansion(const SCEV *S, const Instruction *At,
308 getRelatedExistingExpansion(const SCEV *S, const Instruction *At, Loop *L);
[all …]
/external/llvm/include/llvm/Analysis/
DScalarEvolution.h50 class SCEV; variable
58 template <> struct FoldingSetTrait<SCEV>;
64 class SCEV : public FoldingSetNode {
65 friend struct FoldingSetTrait<SCEV>;
80 SCEV(const SCEV &) = delete;
81 void operator=(const SCEV &) = delete;
108 explicit SCEV(const FoldingSetNodeIDRef ID, unsigned SCEVTy) :
143 template<> struct FoldingSetTrait<SCEV> : DefaultFoldingSetTrait<SCEV> {
144 static void Profile(const SCEV &X, FoldingSetNodeID& ID) {
147 static bool Equals(const SCEV &X, const FoldingSetNodeID &ID,
[all …]
DDependenceAnalysis.h53 class SCEV; variable
107 const SCEV *Distance; // NULL implies no distance available.
167 virtual const SCEV *getDistance(unsigned Level) const { return nullptr; } in getDistance()
253 const SCEV *getDistance(unsigned Level) const override;
338 const SCEV *getSplitIteration(const Dependence &Dep, unsigned Level);
352 const SCEV *Src;
353 const SCEV *Dst;
361 const SCEV *Coeff;
362 const SCEV *PosPart;
363 const SCEV *NegPart;
[all …]
DScalarEvolutionExpressions.h36 class SCEVConstant : public SCEV {
41 SCEV(ID, scConstant), V(v) {} in SCEVConstant()
49 static inline bool classof(const SCEV *S) { in classof()
55 class SCEVCastExpr : public SCEV {
57 const SCEV *Op;
61 unsigned SCEVTy, const SCEV *op, Type *ty);
64 const SCEV *getOperand() const { return Op; } in getOperand()
68 static inline bool classof(const SCEV *S) { in classof()
81 const SCEV *op, Type *ty);
85 static inline bool classof(const SCEV *S) { in classof()
[all …]
DScalarEvolutionExpander.h29 bool isSafeToExpand(const SCEV *S, ScalarEvolution &SE);
45 std::map<std::pair<const SCEV *, Instruction *>, TrackingVH<Value> >
52 DenseMap<const SCEV *, const Loop *> RelevantLoops;
169 bool isHighCostExpansion(const SCEV *Expr, Loop *L,
171 SmallPtrSet<const SCEV *, 8> Processed;
197 Value *expandCodeFor(const SCEV *SH, Type *Ty, Instruction *I);
279 Value *findExistingExpansion(const SCEV *S, const Instruction *At, Loop *L);
285 bool isHighCostExpansionHelper(const SCEV *S, Loop *L,
287 SmallPtrSetImpl<const SCEV *> &Processed);
307 Value *expandAddToGEP(const SCEV *const *op_begin,
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/test/Other/
Dloop-pm-invalidation.ll13 ; RUN: | FileCheck %s --check-prefix=CHECK-SCEV-INV
18 ; RUN: | FileCheck %s --check-prefix=CHECK-SCEV-INV-AFTER-DELETE
40 ; CHECK-SCEV-INV-LABEL: Running pass: FunctionToLoopPassAdaptor<{{.*}}> on no_loops
41 ; CHECK-SCEV-INV-NEXT: Starting {{.*}}Function pass manager run
42 ; CHECK-SCEV-INV-NEXT: Running pass: LoopSimplifyPass
43 ; CHECK-SCEV-INV-NEXT: Running analysis: LoopAnalysis
44 ; CHECK-SCEV-INV-NEXT: Running analysis: DominatorTreeAnalysis
45 ; CHECK-SCEV-INV-NEXT: Running analysis: AssumptionAnalysis
46 ; CHECK-SCEV-INV-NEXT: Running pass: LCSSAPass
47 ; CHECK-SCEV-INV-NEXT: Finished {{.*}}Function pass manager run
[all …]
/external/llvm/lib/Analysis/
DScalarEvolutionNormalization.cpp73 DenseMap<const SCEV*, const SCEV*> Transformed;
80 const SCEV *TransformSubExpr(const SCEV *S, Instruction *User,
84 const SCEV *TransformImpl(const SCEV *S, Instruction *User,
91 const SCEV *PostIncTransform::
92 TransformImpl(const SCEV *S, Instruction *User, Value *OperandValToReplace) { in TransformImpl()
95 const SCEV *O = X->getOperand(); in TransformImpl()
96 const SCEV *N = TransformSubExpr(O, User, OperandValToReplace); in TransformImpl()
109 SmallVector<const SCEV *, 8> Operands; in TransformImpl()
119 const SCEV *Result = SE.getAddRecExpr(Operands, L, SCEV::FlagAnyWrap); in TransformImpl()
134 const SCEV *TransformedStep = in TransformImpl()
[all …]
DScalarEvolution.cpp132 void SCEV::dump() const { in dump()
137 void SCEV::print(raw_ostream &OS) const { in print()
144 const SCEV *Op = Trunc->getOperand(); in print()
151 const SCEV *Op = ZExt->getOperand(); in print()
158 const SCEV *Op = SExt->getOperand(); in print()
247 Type *SCEV::getType() const { in getType()
272 bool SCEV::isZero() const { in isZero()
278 bool SCEV::isOne() const { in isOne()
284 bool SCEV::isAllOnesValue() const { in isAllOnesValue()
290 bool SCEV::isNonConstantNegative() const { in isNonConstantNegative()
[all …]
DDependenceAnalysis.cpp256 const SCEV *FullDependence::getDistance(unsigned Level) const { in getDistance()
299 const SCEV *DependenceInfo::Constraint::getX() const { in getX()
307 const SCEV *DependenceInfo::Constraint::getY() const { in getY()
315 const SCEV *DependenceInfo::Constraint::getA() const { in getA()
324 const SCEV *DependenceInfo::Constraint::getB() const { in getB()
333 const SCEV *DependenceInfo::Constraint::getC() const { in getC()
342 const SCEV *DependenceInfo::Constraint::getD() const { in getD()
355 void DependenceInfo::Constraint::setPoint(const SCEV *X, const SCEV *Y, in setPoint()
363 void DependenceInfo::Constraint::setLine(const SCEV *AA, const SCEV *BB, in setLine()
364 const SCEV *CC, const Loop *CurLoop) { in setLine()
[all …]
DScalarEvolutionExpander.cpp226 static bool FactorOutConstant(const SCEV *&S, const SCEV *&Remainder, in FactorOutConstant()
227 const SCEV *Factor, ScalarEvolution &SE, in FactorOutConstant()
252 const SCEV *Div = SE.getConstant(CI); in FactorOutConstant()
269 SmallVector<const SCEV *, 4> NewMulOps(M->op_begin(), M->op_end()); in FactorOutConstant()
278 const SCEV *Step = A->getStepRecurrence(SE); in FactorOutConstant()
279 const SCEV *StepRem = SE.getConstant(Step->getType(), 0); in FactorOutConstant()
284 const SCEV *Start = A->getStart(); in FactorOutConstant()
288 A->getNoWrapFlags(SCEV::FlagNW)); in FactorOutConstant()
299 static void SimplifyAddOperands(SmallVectorImpl<const SCEV *> &Ops, in SimplifyAddOperands()
306 SmallVector<const SCEV *, 8> NoAddRecs(Ops.begin(), Ops.end() - NumAddRecs); in SimplifyAddOperands()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Analysis/
DScalarEvolution.cpp218 LLVM_DUMP_METHOD void SCEV::dump() const { in dump()
224 void SCEV::print(raw_ostream &OS) const { in print()
231 const SCEV *Op = Trunc->getOperand(); in print()
238 const SCEV *Op = ZExt->getOperand(); in print()
245 const SCEV *Op = SExt->getOperand(); in print()
334 Type *SCEV::getType() const { in getType()
359 bool SCEV::isZero() const { in isZero()
365 bool SCEV::isOne() const { in isOne()
371 bool SCEV::isAllOnesValue() const { in isAllOnesValue()
377 bool SCEV::isNonConstantNegative() const { in isNonConstantNegative()
[all …]
DDependenceAnalysis.cpp256 const SCEV *FullDependence::getDistance(unsigned Level) const { in getDistance()
299 const SCEV *DependenceInfo::Constraint::getX() const { in getX()
307 const SCEV *DependenceInfo::Constraint::getY() const { in getY()
315 const SCEV *DependenceInfo::Constraint::getA() const { in getA()
324 const SCEV *DependenceInfo::Constraint::getB() const { in getB()
333 const SCEV *DependenceInfo::Constraint::getC() const { in getC()
342 const SCEV *DependenceInfo::Constraint::getD() const { in getD()
355 void DependenceInfo::Constraint::setPoint(const SCEV *X, const SCEV *Y, in setPoint()
363 void DependenceInfo::Constraint::setLine(const SCEV *AA, const SCEV *BB, in setLine()
364 const SCEV *CC, const Loop *CurLoop) { in setLine()
[all …]
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()
/external/llvm/lib/Transforms/Utils/
DSimplifyIndVar.cpp93 const SCEV *FoldedExpr = nullptr; in foldIVUser()
161 const SCEV *S = SE->getSCEV(ICmp->getOperand(IVOperIdx)); in eliminateIVComparison()
162 const SCEV *X = SE->getSCEV(ICmp->getOperand(1 - IVOperIdx)); in eliminateIVComparison()
170 const SCEV *InvariantLHS, *InvariantRHS; in eliminateIVComparison()
243 const SCEV *IncomingS = SE->getSCEV(Incoming); in eliminateIVComparison()
279 const SCEV *S = SE->getSCEV(Rem->getOperand(0)); in eliminateIVRemainder()
280 const SCEV *X = SE->getSCEV(Rem->getOperand(1)); in eliminateIVRemainder()
294 const SCEV *LessOne = SE->getMinusSCEV(S, SE->getOne(S->getType())); in eliminateIVRemainder()
323 typedef const SCEV *(ScalarEvolution::*OperationFunctionTy)( in eliminateOverflowIntrinsic()
324 const SCEV *, const SCEV *, SCEV::NoWrapFlags); in eliminateOverflowIntrinsic()
[all …]
/external/llvm/lib/Transforms/Scalar/
DLoopStrengthReduce.cpp157 typedef DenseMap<const SCEV *, RegSortData> RegUsesTy;
160 SmallVector<const SCEV *, 16> RegSequence;
163 void countRegister(const SCEV *Reg, size_t LUIdx);
164 void dropRegister(const SCEV *Reg, size_t LUIdx);
167 bool isRegUsedByUsesOtherThan(const SCEV *Reg, size_t LUIdx) const;
169 const SmallBitVector &getUsedByIndices(const SCEV *Reg) const;
173 typedef SmallVectorImpl<const SCEV *>::iterator iterator;
174 typedef SmallVectorImpl<const SCEV *>::const_iterator const_iterator;
184 RegUseTracker::countRegister(const SCEV *Reg, size_t LUIdx) { in countRegister()
195 RegUseTracker::dropRegister(const SCEV *Reg, size_t LUIdx) { in dropRegister()
[all …]
DAlignmentFromAssumptions.cpp93 static unsigned getNewAlignmentDiff(const SCEV *DiffSCEV, in getNewAlignmentDiff()
94 const SCEV *AlignSCEV, in getNewAlignmentDiff()
97 const SCEV *DiffAlignDiv = SE->getUDivExpr(DiffSCEV, AlignSCEV); in getNewAlignmentDiff()
98 const SCEV *DiffAlign = SE->getMulExpr(DiffAlignDiv, AlignSCEV); in getNewAlignmentDiff()
99 const SCEV *DiffUnitsSCEV = SE->getMinusSCEV(DiffAlign, DiffSCEV); in getNewAlignmentDiff()
128 static unsigned getNewAlignment(const SCEV *AASCEV, const SCEV *AlignSCEV, in getNewAlignment()
129 const SCEV *OffSCEV, Value *Ptr, in getNewAlignment()
131 const SCEV *PtrSCEV = SE->getSCEV(Ptr); in getNewAlignment()
132 const SCEV *DiffSCEV = SE->getMinusSCEV(PtrSCEV, AASCEV); in getNewAlignment()
160 const SCEV *DiffStartSCEV = DiffARSCEV->getStart(); in getNewAlignment()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Scalar/
DLoopStrengthReduce.cpp221 using RegUsesTy = DenseMap<const SCEV *, RegSortData>;
224 SmallVector<const SCEV *, 16> RegSequence;
227 void countRegister(const SCEV *Reg, size_t LUIdx);
228 void dropRegister(const SCEV *Reg, size_t LUIdx);
231 bool isRegUsedByUsesOtherThan(const SCEV *Reg, size_t LUIdx) const;
233 const SmallBitVector &getUsedByIndices(const SCEV *Reg) const;
237 using iterator = SmallVectorImpl<const SCEV *>::iterator;
238 using const_iterator = SmallVectorImpl<const SCEV *>::const_iterator;
249 RegUseTracker::countRegister(const SCEV *Reg, size_t LUIdx) { in countRegister()
260 RegUseTracker::dropRegister(const SCEV *Reg, size_t LUIdx) { in dropRegister()
[all …]
DAlignmentFromAssumptions.cpp93 static unsigned getNewAlignmentDiff(const SCEV *DiffSCEV, in getNewAlignmentDiff()
94 const SCEV *AlignSCEV, in getNewAlignmentDiff()
97 const SCEV *DiffAlignDiv = SE->getUDivExpr(DiffSCEV, AlignSCEV); in getNewAlignmentDiff()
98 const SCEV *DiffAlign = SE->getMulExpr(DiffAlignDiv, AlignSCEV); in getNewAlignmentDiff()
99 const SCEV *DiffUnitsSCEV = SE->getMinusSCEV(DiffAlign, DiffSCEV); in getNewAlignmentDiff()
128 static unsigned getNewAlignment(const SCEV *AASCEV, const SCEV *AlignSCEV, in getNewAlignment()
129 const SCEV *OffSCEV, Value *Ptr, in getNewAlignment()
131 const SCEV *PtrSCEV = SE->getSCEV(Ptr); in getNewAlignment()
132 const SCEV *DiffSCEV = SE->getMinusSCEV(PtrSCEV, AASCEV); in getNewAlignment()
160 const SCEV *DiffStartSCEV = DiffARSCEV->getStart(); in getNewAlignment()
[all …]
DInductiveRangeCheckElimination.cpp154 const SCEV *Begin = nullptr;
155 const SCEV *Step = nullptr;
156 const SCEV *End = nullptr;
171 const SCEV *getBegin() const { return Begin; } in getBegin()
172 const SCEV *getStep() const { return Step; } in getStep()
173 const SCEV *getEnd() const { return End; } in getEnd()
201 const SCEV *Begin;
202 const SCEV *End;
205 Range(const SCEV *Begin, const SCEV *End) : Begin(Begin), End(End) { in Range()
210 const SCEV *getBegin() const { return Begin; } in getBegin()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/lib/Transforms/Utils/
DSimplifyIndVar.cpp110 const SCEV *FoldedExpr = nullptr; in foldIVUser()
179 const SCEV *S = SE->getSCEVAtScope(ICmp->getOperand(IVOperIdx), ICmpLoop); in makeIVComparisonInvariant()
180 const SCEV *X = SE->getSCEVAtScope(ICmp->getOperand(1 - IVOperIdx), ICmpLoop); in makeIVComparisonInvariant()
183 const SCEV *InvariantLHS, *InvariantRHS; in makeIVComparisonInvariant()
196 SmallDenseMap<const SCEV*, Value*> CheapExpansions; in makeIVComparisonInvariant()
206 const SCEV *IncomingS = SE->getSCEV(Incoming); in makeIVComparisonInvariant()
249 const SCEV *S = SE->getSCEVAtScope(ICmp->getOperand(IVOperIdx), ICmpLoop); in eliminateIVComparison()
250 const SCEV *X = SE->getSCEVAtScope(ICmp->getOperand(1 - IVOperIdx), ICmpLoop); in eliminateIVComparison()
357 const SCEV *N = SE->getSCEV(NValue); in simplifyIVRemainder()
369 const SCEV *D = SE->getSCEV(DValue); in simplifyIVRemainder()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/test/Transforms/SimpleLoopUnswitch/
Dupdate-scev.ll2 ; RUN: FileCheck %s --check-prefix=SCEV < %t.scev
11 ; Check that SCEV has no trip count before unswitching.
12 ; SCEV-LABEL: Determining loop execution counts for: @test1
13 ; SCEV: Loop %inner_loop_begin: <multiple exits> Unpredictable backedge-taken count.
14 ; SCEV: Loop %outer_loop_begin: Unpredictable backedge-taken count.
18 ; SCEV-LABEL: Determining loop execution counts for: @test1
19 ; SCEV: Loop %inner_loop_begin: backedge-taken count is (-1 + (1 smax %m))<nsw>
20 ; SCEV: Loop %outer_loop_begin: backedge-taken count is (-1 + (1 smax %n))<nsw>
70 ; Check that SCEV has no trip count before unswitching.
71 ; SCEV-LABEL: Determining loop execution counts for: @test2
[all …]

12345678910