Home
last modified time | relevance | path

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

123

/external/llvm/include/llvm/Analysis/
DScalarEvolution.h51 class SCEV; variable
52 template<> struct FoldingSetTrait<SCEV>;
58 class SCEV : public FoldingSetNode {
59 friend struct FoldingSetTrait<SCEV>;
74 SCEV(const SCEV &) = delete;
75 void operator=(const SCEV &) = delete;
102 explicit SCEV(const FoldingSetNodeIDRef ID, unsigned SCEVTy) :
142 template<> struct FoldingSetTrait<SCEV> : DefaultFoldingSetTrait<SCEV> {
143 static void Profile(const SCEV &X, FoldingSetNodeID& ID) {
146 static bool Equals(const SCEV &X, const FoldingSetNodeID &ID,
[all …]
DDependenceAnalysis.h52 class SCEV; variable
97 const SCEV *Distance; // NULL implies no distance available.
157 virtual const SCEV *getDistance(unsigned Level) const { return nullptr; } in getDistance()
247 const SCEV *getDistance(unsigned Level) const override;
331 const SCEV *getSplitIteration(const Dependence &Dep, unsigned Level);
343 const SCEV *Src;
344 const SCEV *Dst;
352 const SCEV *Coeff;
353 const SCEV *PosPart;
354 const SCEV *NegPart;
[all …]
DScalarEvolutionExpressions.h38 class SCEVConstant : public SCEV {
43 SCEV(ID, scConstant), V(v) {} in SCEVConstant()
50 static inline bool classof(const SCEV *S) { in classof()
58 class SCEVCastExpr : public SCEV {
60 const SCEV *Op;
64 unsigned SCEVTy, const SCEV *op, Type *ty);
67 const SCEV *getOperand() const { return Op; } in getOperand()
71 static inline bool classof(const SCEV *S) { in classof()
86 const SCEV *op, Type *ty);
90 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;
120 bool isHighCostExpansion(const SCEV *Expr, Loop *L) {
121 SmallPtrSet<const SCEV *, 8> Processed;
147 Value *expandCodeFor(const SCEV *SH, Type *Ty, Instruction *I);
200 bool isHighCostExpansionHelper(const SCEV *S, Loop *L,
201 SmallPtrSetImpl<const SCEV *> &Processed);
221 Value *expandAddToGEP(const SCEV *const *op_begin,
222 const SCEV *const *op_end,
[all …]
DScalarEvolutionNormalization.h47 class SCEV; variable
68 const SCEV *TransformForPostIncUse(TransformKind Kind,
69 const SCEV *S,
DIVUsers.h28 class SCEV; variable
152 const SCEV *getReplacementExpr(const IVStrideUse &IU) const;
155 const SCEV *getExpr(const IVStrideUse &IU) const;
157 const SCEV *getStride(const IVStrideUse &IU, const Loop *L) const;
/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.cpp136 void SCEV::dump() const { in dump()
142 void SCEV::print(raw_ostream &OS) const { in print()
149 const SCEV *Op = Trunc->getOperand(); in print()
156 const SCEV *Op = ZExt->getOperand(); in print()
163 const SCEV *Op = SExt->getOperand(); in print()
252 Type *SCEV::getType() const { in getType()
277 bool SCEV::isZero() const { in isZero()
283 bool SCEV::isOne() const { in isOne()
289 bool SCEV::isAllOnesValue() const { in isAllOnesValue()
297 bool SCEV::isNonConstantNegative() const { in isNonConstantNegative()
[all …]
DDependenceAnalysis.cpp249 const SCEV *FullDependence::getDistance(unsigned Level) const { in getDistance()
292 const SCEV *DependenceAnalysis::Constraint::getX() const { in getX()
300 const SCEV *DependenceAnalysis::Constraint::getY() const { in getY()
308 const SCEV *DependenceAnalysis::Constraint::getA() const { in getA()
317 const SCEV *DependenceAnalysis::Constraint::getB() const { in getB()
326 const SCEV *DependenceAnalysis::Constraint::getC() const { in getC()
335 const SCEV *DependenceAnalysis::Constraint::getD() const { in getD()
349 void DependenceAnalysis::Constraint::setPoint(const SCEV *X, in setPoint()
350 const SCEV *Y, in setPoint()
359 void DependenceAnalysis::Constraint::setLine(const SCEV *AA, in setLine()
[all …]
DScalarEvolutionExpander.cpp209 static bool FactorOutConstant(const SCEV *&S, const SCEV *&Remainder, in FactorOutConstant()
210 const SCEV *Factor, ScalarEvolution &SE, in FactorOutConstant()
237 const SCEV *Div = SE.getConstant(CI); in FactorOutConstant()
256 SmallVector<const SCEV *, 4> NewMulOps(M->op_begin(), M->op_end()); in FactorOutConstant()
266 const SCEV *Step = A->getStepRecurrence(SE); in FactorOutConstant()
267 const SCEV *StepRem = SE.getConstant(Step->getType(), 0); in FactorOutConstant()
272 const SCEV *Start = A->getStart(); in FactorOutConstant()
276 A->getNoWrapFlags(SCEV::FlagNW)); in FactorOutConstant()
287 static void SimplifyAddOperands(SmallVectorImpl<const SCEV *> &Ops, in SimplifyAddOperands()
294 SmallVector<const SCEV *, 8> NoAddRecs(Ops.begin(), Ops.end() - NumAddRecs); in SimplifyAddOperands()
[all …]
DScalarEvolutionAliasAnalysis.cpp58 Value *GetBaseValue(const SCEV *S);
91 ScalarEvolutionAliasAnalysis::GetBaseValue(const SCEV *S) { in GetBaseValue()
98 const SCEV *Last = A->getOperand(A->getNumOperands()-1); in GetBaseValue()
119 const SCEV *AS = SE->getSCEV(const_cast<Value *>(LocA.Ptr)); in alias()
120 const SCEV *BS = SE->getSCEV(const_cast<Value *>(LocB.Ptr)); in alias()
134 const SCEV *BA = SE->getMinusSCEV(BS, AS); in alias()
148 const SCEV *AB = SE->getMinusSCEV(AS, BS); in alias()
DIVUsers.cpp50 static bool isInteresting(const SCEV *S, const Instruction *I, const Loop *L, in isInteresting()
141 const SCEV *ISE = SE->getSCEV(I); in AddUsersImpl()
196 const SCEV *OriginalISE = ISE; in AddUsersImpl()
207 const SCEV *DenormalizedISE = in AddUsersImpl()
312 const SCEV *IVUsers::getReplacementExpr(const IVStrideUse &IU) const { in getReplacementExpr()
317 const SCEV *IVUsers::getExpr(const IVStrideUse &IU) const { in getExpr()
325 static const SCEVAddRecExpr *findAddRecForLoop(const SCEV *S, const Loop *L) { in findAddRecForLoop()
343 const SCEV *IVUsers::getStride(const IVStrideUse &IU, const Loop *L) const { in getStride()
DLoopAccessAnalysis.cpp83 const SCEV *llvm::replaceSymbolicStrideSCEV(ScalarEvolution *SE, in replaceSymbolicStrideSCEV()
87 const SCEV *OrigSCEV = SE->getSCEV(Ptr); in replaceSymbolicStrideSCEV()
104 const SCEV *ByOne = in replaceSymbolicStrideSCEV()
119 const SCEV *Sc = replaceSymbolicStrideSCEV(SE, Strides, Ptr); in insert()
122 const SCEV *Ex = SE->getBackedgeTakenCount(Lp); in insert()
123 const SCEV *ScEnd = AR->evaluateAtIteration(Ex, *SE); in insert()
277 const SCEV *PtrScev = replaceSymbolicStrideSCEV(SE, Strides, Ptr); in hasComputableBounds()
515 const SCEV *PtrScev = replaceSymbolicStrideSCEV(SE, StridesMap, Ptr); in isStridedPtr()
538 bool IsNoWrapAddRec = AR->getNoWrapFlags(SCEV::NoWrapMask); in isStridedPtr()
547 const SCEV *Step = AR->getStepRecurrence(*SE); in isStridedPtr()
[all …]
/external/llvm/lib/Transforms/Scalar/
DAlignmentFromAssumptions.cpp75 bool extractAlignmentInfo(CallInst *I, Value *&AAPtr, const SCEV *&AlignSCEV,
76 const SCEV *&OffSCEV);
101 static unsigned getNewAlignmentDiff(const SCEV *DiffSCEV, in getNewAlignmentDiff()
102 const SCEV *AlignSCEV, in getNewAlignmentDiff()
105 const SCEV *DiffAlignDiv = SE->getUDivExpr(DiffSCEV, AlignSCEV); in getNewAlignmentDiff()
106 const SCEV *DiffAlign = SE->getMulExpr(DiffAlignDiv, AlignSCEV); in getNewAlignmentDiff()
107 const SCEV *DiffUnitsSCEV = SE->getMinusSCEV(DiffAlign, DiffSCEV); in getNewAlignmentDiff()
136 static unsigned getNewAlignment(const SCEV *AASCEV, const SCEV *AlignSCEV, in getNewAlignment()
137 const SCEV *OffSCEV, Value *Ptr, in getNewAlignment()
139 const SCEV *PtrSCEV = SE->getSCEV(Ptr); in getNewAlignment()
[all …]
DLoopStrengthReduce.cpp136 typedef DenseMap<const SCEV *, RegSortData> RegUsesTy;
139 SmallVector<const SCEV *, 16> RegSequence;
142 void CountRegister(const SCEV *Reg, size_t LUIdx);
143 void DropRegister(const SCEV *Reg, size_t LUIdx);
146 bool isRegUsedByUsesOtherThan(const SCEV *Reg, size_t LUIdx) const;
148 const SmallBitVector &getUsedByIndices(const SCEV *Reg) const;
152 typedef SmallVectorImpl<const SCEV *>::iterator iterator;
153 typedef SmallVectorImpl<const SCEV *>::const_iterator const_iterator;
163 RegUseTracker::CountRegister(const SCEV *Reg, size_t LUIdx) { in CountRegister()
174 RegUseTracker::DropRegister(const SCEV *Reg, size_t LUIdx) { in DropRegister()
[all …]
DInductiveRangeCheckElimination.cpp119 const SCEV *Offset;
120 const SCEV *Scale;
131 const SCEV *&Index, Value *&UpperLimit);
137 const SCEV *getOffset() const { return Offset; } in getOffset()
138 const SCEV *getScale() const { return Scale; } in getScale()
170 const SCEV *Begin;
171 const SCEV *End;
174 Range(const SCEV *Begin, const SCEV *End) : Begin(Begin), End(End) { in Range()
179 const SCEV *getBegin() const { return Begin; } in getBegin()
180 const SCEV *getEnd() const { return End; } in getEnd()
[all …]
DStraightLineStrengthReduce.cpp92 Candidate(Kind CT, const SCEV *B, ConstantInt *Idx, Value *S, in Candidate()
97 const SCEV *Base;
174 void allocateCandidatesAndFindBasisForGEP(const SCEV *B, ConstantInt *Idx,
179 void allocateCandidatesAndFindBasis(Candidate::Kind CT, const SCEV *B,
187 void factorArrayIndex(Value *ArrayIdx, const SCEV *Base, uint64_t ElementSize,
271 static bool isAddFoldable(const SCEV *Base, ConstantInt *Index, Value *Stride, in isAddFoldable()
323 Candidate::Kind CT, const SCEV *B, ConstantInt *Idx, Value *S, in allocateCandidatesAndFindBasis()
440 const SCEV *B, ConstantInt *Idx, Value *S, uint64_t ElementSize, in allocateCandidatesAndFindBasisForGEP()
453 const SCEV *Base, in factorArrayIndex()
493 const SCEV *GEPExpr = SE->getSCEV(GEP); in allocateCandidatesAndFindBasisForGEP()
[all …]
DIndVarSimplify.cpp117 Value *LinearFunctionTestReplace(Loop *L, const SCEV *BackedgeTakenCount,
178 const SCEV *FromBase = SE->getPointerBase(SE->getSCEV(FromPtr)); in isValidRewrite()
179 const SCEV *ToBase = SE->getPointerBase(SE->getSCEV(ToPtr)); in isValidRewrite()
554 const SCEV *ExitValue = SE->getSCEVAtScope(Inst, L->getParentLoop()); in RewriteLoopExitValues()
738 const SCEV *WideIncExpr;
774 const SCEV *GetSCEVByOpCode(const SCEV *LHS, const SCEV *RHS,
855 const SCEV *WidenIV::GetSCEVByOpCode(const SCEV *LHS, const SCEV *RHS, in GetSCEVByOpCode()
886 const SCEV *ExtendOperExpr = nullptr; in GetExtendedOperandRecurrence()
903 const SCEV *lhs = SE->getSCEV(DU.WideDef); in GetExtendedOperandRecurrence()
904 const SCEV *rhs = ExtendOperExpr; in GetExtendedOperandRecurrence()
[all …]
DLoopIdiomRecognize.cpp148 bool runOnLoopBlock(BasicBlock *BB, const SCEV *BECount,
151 bool processLoopStore(StoreInst *SI, const SCEV *BECount);
152 bool processLoopMemSet(MemSetInst *MSI, const SCEV *BECount);
158 const SCEV *BECount);
162 const SCEV *BECount);
613 const SCEV *BECount = SE->getBackedgeTakenCount(CurLoop); in runOnCountableLoop()
684 bool LoopIdiomRecognize::runOnLoopBlock(BasicBlock *BB, const SCEV *BECount, in runOnLoopBlock()
728 bool LoopIdiomRecognize::processLoopStore(StoreInst *SI, const SCEV *BECount) { in processLoopStore()
788 processLoopMemSet(MemSetInst *MSI, const SCEV *BECount) { in processLoopMemSet()
829 Loop *L, const SCEV *BECount, in mayLoopAccessLocation()
[all …]
DNaryReassociate.cpp128 Instruction *tryReassociatedAdd(const SCEV *LHS, Value *RHS, Instruction *I);
142 DenseMap<const SCEV *, SmallVector<Instruction *, 2>> SeenExprs;
217 const SCEV *AExpr = SE->getSCEV(A), *BExpr = SE->getSCEV(B); in tryReassociateAdd()
218 const SCEV *RHSExpr = SE->getSCEV(RHS); in tryReassociateAdd()
227 Instruction *NaryReassociate::tryReassociatedAdd(const SCEV *LHSExpr, in tryReassociatedAdd()
/external/llvm/test/Other/
Dconstant-fold-gep.ll13 ; "SCEV" - ScalarEvolution with default target layout
14 ; RUN: opt -analyze -scalar-evolution < %s | FileCheck --check-prefix=SCEV %s
181 ; SCEV: Classifying expressions for: @goo8
182 ; SCEV: %t = bitcast i8* getelementptr (i8, i8* inttoptr (i32 1 to i8*), i32 -1) to i8*
183 ; SCEV: --> (-1 + inttoptr (i32 1 to i8*))
184 ; SCEV: Classifying expressions for: @goo1
185 ; SCEV: %t = bitcast i1* getelementptr (i1, i1* inttoptr (i32 1 to i1*), i32 -1) to i1*
186 ; SCEV: --> (-1 + inttoptr (i32 1 to i1*))
187 ; SCEV: Classifying expressions for: @foo8
188 ; SCEV: %t = bitcast i8* getelementptr (i8, i8* inttoptr (i32 1 to i8*), i32 -2) to i8*
[all …]
/external/llvm/lib/Transforms/Utils/
DSimplifyIndVar.cpp94 const SCEV *FoldedExpr = nullptr; in foldIVUser()
162 const SCEV *S = SE->getSCEV(ICmp->getOperand(IVOperIdx)); in eliminateIVComparison()
163 const SCEV *X = SE->getSCEV(ICmp->getOperand(1 - IVOperIdx)); in eliminateIVComparison()
196 const SCEV *S = SE->getSCEV(Rem->getOperand(0)); in eliminateIVRemainder()
197 const SCEV *X = SE->getSCEV(Rem->getOperand(1)); in eliminateIVRemainder()
211 const SCEV *LessOne = in eliminateIVRemainder()
277 const SCEV *(ScalarEvolution::*GetExprForBO)(const SCEV *, const SCEV *, in strengthenOverflowingOperation()
278 SCEV::NoWrapFlags); in strengthenOverflowingOperation()
299 const SCEV *LHS = SE->getSCEV(BO->getOperand(0)); in strengthenOverflowingOperation()
300 const SCEV *RHS = SE->getSCEV(BO->getOperand(1)); in strengthenOverflowingOperation()
[all …]
/external/llvm/unittests/Analysis/
DScalarEvolutionTest.cpp56 const SCEV *S0 = SE.getSCEV(V0); in TEST_F()
57 const SCEV *S1 = SE.getSCEV(V1); in TEST_F()
58 const SCEV *S2 = SE.getSCEV(V2); in TEST_F()
60 const SCEV *P0 = SE.getAddExpr(S0, S0); in TEST_F()
61 const SCEV *P1 = SE.getAddExpr(S1, S1); in TEST_F()
62 const SCEV *P2 = SE.getAddExpr(S2, S2); in TEST_F()
109 SmallVector<const SCEV *, 5> A; in TEST_F()
115 const SCEV *A_rec = SE.getAddRecExpr(A, &L, SCEV::FlagAnyWrap); in TEST_F()
117 SmallVector<const SCEV *, 5> B; in TEST_F()
123 const SCEV *B_rec = SE.getAddRecExpr(B, &L, SCEV::FlagAnyWrap); in TEST_F()
[all …]
/external/llvm/lib/Target/PowerPC/
DPPCLoopPreIncPrep.cpp104 struct SCEVLess : std::binary_function<const SCEV *, const SCEV *, bool>
108 bool operator() (const SCEV *X, const SCEV *Y) const { in operator ()()
109 const SCEV *Diff = SE->getMinusSCEV(X, Y); in operator ()()
172 typedef std::multimap<const SCEV *, Instruction *, SCEVLess> Bucket; in runOnLoop()
206 const SCEV *LSCEV = SE->getSCEVAtScope(PtrValue, L); in runOnLoop()
218 const SCEV *Diff = SE->getMinusSCEV(K->first, LSCEV); in runOnLoop()
273 const SCEV *BasePtrStartSCEV = BasePtrSCEV->getStart(); in runOnLoop()
/external/llvm/test/Transforms/LoopSimplify/
Dashr-crash.ll6 ; After a series of loop optimizations, SCEV's LoopDispositions grow stale.
7 ; In particular, LoopSimplify hoists %cmp4, resulting in this SCEV for %add:
10 ; When recomputing the SCEV for %ashr, we truncate the operands to get:
13 ; This SCEV was never mapped to a value so never invalidated. It's
25 ; Check that the def-use chain that leads to the bad SCEV is still

123