/external/llvm/include/llvm/Analysis/ |
D | ScalarEvolution.h | 51 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 …]
|
D | DependenceAnalysis.h | 53 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; 337 const SCEV *getSplitIteration(const Dependence &Dep, unsigned Level); 349 const SCEV *Src; 350 const SCEV *Dst; 358 const SCEV *Coeff; 359 const SCEV *PosPart; 360 const SCEV *NegPart; [all …]
|
D | ScalarEvolutionExpressions.h | 38 class SCEVConstant : public SCEV { 43 SCEV(ID, scConstant), V(v) {} in SCEVConstant() 51 static inline bool classof(const SCEV *S) { in classof() 59 class SCEVCastExpr : public SCEV { 61 const SCEV *Op; 65 unsigned SCEVTy, const SCEV *op, Type *ty); 68 const SCEV *getOperand() const { return Op; } in getOperand() 72 static inline bool classof(const SCEV *S) { in classof() 87 const SCEV *op, Type *ty); 91 static inline bool classof(const SCEV *S) { in classof() [all …]
|
D | ScalarEvolutionExpander.h | 29 bool isSafeToExpand(const SCEV *S, ScalarEvolution &SE); 45 std::map<std::pair<const SCEV *, Instruction *>, TrackingVH<Value> > 52 DenseMap<const SCEV *, const Loop *> RelevantLoops; 124 bool isHighCostExpansion(const SCEV *Expr, Loop *L, 126 SmallPtrSet<const SCEV *, 8> Processed; 152 Value *expandCodeFor(const SCEV *SH, Type *Ty, Instruction *I); 225 Value *findExistingExpansion(const SCEV *S, const Instruction *At, Loop *L); 231 bool isHighCostExpansionHelper(const SCEV *S, Loop *L, 233 SmallPtrSetImpl<const SCEV *> &Processed); 253 Value *expandAddToGEP(const SCEV *const *op_begin, [all …]
|
D | LoopAccessAnalysis.h | 34 class SCEV; variable 335 const SCEV *Start; 337 const SCEV *End; 346 const SCEV *Expr; 348 PointerInfo(Value *PointerValue, const SCEV *Start, const SCEV *End, in PointerInfo() 350 const SCEV *Expr) in PointerInfo() 401 const SCEV *High; 404 const SCEV *Low; 650 const SCEV *replaceSymbolicStrideSCEV(PredicatedScalarEvolution &PSE,
|
D | ScalarEvolutionNormalization.h | 47 class SCEV; variable 68 const SCEV *TransformForPostIncUse(TransformKind Kind, 69 const SCEV *S,
|
D | IVUsers.h | 29 class SCEV; variable 157 const SCEV *getReplacementExpr(const IVStrideUse &IU) const; 160 const SCEV *getExpr(const IVStrideUse &IU) const; 162 const SCEV *getStride(const IVStrideUse &IU, const Loop *L) const;
|
/external/llvm/lib/Analysis/ |
D | ScalarEvolution.cpp | 128 void SCEV::dump() const { in dump() 133 void SCEV::print(raw_ostream &OS) const { in print() 140 const SCEV *Op = Trunc->getOperand(); in print() 147 const SCEV *Op = ZExt->getOperand(); in print() 154 const SCEV *Op = SExt->getOperand(); in print() 243 Type *SCEV::getType() const { in getType() 268 bool SCEV::isZero() const { in isZero() 274 bool SCEV::isOne() const { in isOne() 280 bool SCEV::isAllOnesValue() const { in isAllOnesValue() 288 bool SCEV::isNonConstantNegative() const { in isNonConstantNegative() [all …]
|
D | ScalarEvolutionNormalization.cpp | 73 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 …]
|
D | DependenceAnalysis.cpp | 250 const SCEV *FullDependence::getDistance(unsigned Level) const { in getDistance() 293 const SCEV *DependenceAnalysis::Constraint::getX() const { in getX() 301 const SCEV *DependenceAnalysis::Constraint::getY() const { in getY() 309 const SCEV *DependenceAnalysis::Constraint::getA() const { in getA() 318 const SCEV *DependenceAnalysis::Constraint::getB() const { in getB() 327 const SCEV *DependenceAnalysis::Constraint::getC() const { in getC() 336 const SCEV *DependenceAnalysis::Constraint::getD() const { in getD() 350 void DependenceAnalysis::Constraint::setPoint(const SCEV *X, in setPoint() 351 const SCEV *Y, in setPoint() 360 void DependenceAnalysis::Constraint::setLine(const SCEV *AA, in setLine() [all …]
|
D | ScalarEvolutionExpander.cpp | 228 static bool FactorOutConstant(const SCEV *&S, const SCEV *&Remainder, in FactorOutConstant() 229 const SCEV *Factor, ScalarEvolution &SE, in FactorOutConstant() 254 const SCEV *Div = SE.getConstant(CI); in FactorOutConstant() 271 SmallVector<const SCEV *, 4> NewMulOps(M->op_begin(), M->op_end()); in FactorOutConstant() 280 const SCEV *Step = A->getStepRecurrence(SE); in FactorOutConstant() 281 const SCEV *StepRem = SE.getConstant(Step->getType(), 0); in FactorOutConstant() 286 const SCEV *Start = A->getStart(); in FactorOutConstant() 290 A->getNoWrapFlags(SCEV::FlagNW)); in FactorOutConstant() 301 static void SimplifyAddOperands(SmallVectorImpl<const SCEV *> &Ops, in SimplifyAddOperands() 308 SmallVector<const SCEV *, 8> NoAddRecs(Ops.begin(), Ops.end() - NumAddRecs); in SimplifyAddOperands() [all …]
|
D | ScalarEvolutionAliasAnalysis.cpp | 35 const SCEV *AS = SE.getSCEV(const_cast<Value *>(LocA.Ptr)); in alias() 36 const SCEV *BS = SE.getSCEV(const_cast<Value *>(LocB.Ptr)); in alias() 51 const SCEV *BA = SE.getMinusSCEV(BS, AS); in alias() 65 const SCEV *AB = SE.getMinusSCEV(AS, BS); in alias() 96 Value *SCEVAAResult::GetBaseValue(const SCEV *S) { in GetBaseValue() 103 const SCEV *Last = A->getOperand(A->getNumOperands() - 1); in GetBaseValue()
|
D | IVUsers.cpp | 53 static bool isInteresting(const SCEV *S, const Instruction *I, const Loop *L, in isInteresting() 149 const SCEV *ISE = SE->getSCEV(I); in AddUsersImpl() 204 const SCEV *OriginalISE = ISE; in AddUsersImpl() 215 const SCEV *DenormalizedISE = in AddUsersImpl() 327 const SCEV *IVUsers::getReplacementExpr(const IVStrideUse &IU) const { in getReplacementExpr() 332 const SCEV *IVUsers::getExpr(const IVStrideUse &IU) const { in getExpr() 340 static const SCEVAddRecExpr *findAddRecForLoop(const SCEV *S, const Loop *L) { in findAddRecForLoop() 358 const SCEV *IVUsers::getStride(const IVStrideUse &IU, const Loop *L) const { in getStride()
|
D | LoopAccessAnalysis.cpp | 90 const SCEV *llvm::replaceSymbolicStrideSCEV(PredicatedScalarEvolution &PSE, in replaceSymbolicStrideSCEV() 93 const SCEV *OrigSCEV = PSE.getSCEV(Ptr); in replaceSymbolicStrideSCEV() 132 const SCEV *Sc = replaceSymbolicStrideSCEV(PSE, Strides, Ptr); in insert() 136 const SCEV *Ex = SE->getBackedgeTakenCount(Lp); in insert() 138 const SCEV *ScStart = AR->getStart(); in insert() 139 const SCEV *ScEnd = AR->evaluateAtIteration(Ex, *SE); in insert() 140 const SCEV *Step = AR->getStepRecurrence(*SE); in insert() 192 static const SCEV *getMinFromExprs(const SCEV *I, const SCEV *J, in getMinFromExprs() 194 const SCEV *Diff = SE->getMinusSCEV(J, I); in getMinFromExprs() 205 const SCEV *Start = RtCheck.Pointers[Index].Start; in addPointer() [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | AlignmentFromAssumptions.cpp | 79 bool extractAlignmentInfo(CallInst *I, Value *&AAPtr, const SCEV *&AlignSCEV, 80 const SCEV *&OffSCEV); 105 static unsigned getNewAlignmentDiff(const SCEV *DiffSCEV, in getNewAlignmentDiff() 106 const SCEV *AlignSCEV, in getNewAlignmentDiff() 109 const SCEV *DiffAlignDiv = SE->getUDivExpr(DiffSCEV, AlignSCEV); in getNewAlignmentDiff() 110 const SCEV *DiffAlign = SE->getMulExpr(DiffAlignDiv, AlignSCEV); in getNewAlignmentDiff() 111 const SCEV *DiffUnitsSCEV = SE->getMinusSCEV(DiffAlign, DiffSCEV); in getNewAlignmentDiff() 140 static unsigned getNewAlignment(const SCEV *AASCEV, const SCEV *AlignSCEV, in getNewAlignment() 141 const SCEV *OffSCEV, Value *Ptr, in getNewAlignment() 143 const SCEV *PtrSCEV = SE->getSCEV(Ptr); in getNewAlignment() [all …]
|
D | LoopStrengthReduce.cpp | 157 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 …]
|
D | InductiveRangeCheckElimination.cpp | 119 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 …]
|
D | NaryReassociate.cpp | 156 Instruction *tryReassociatedBinaryOp(const SCEV *LHS, Value *RHS, 163 const SCEV *getBinarySCEV(BinaryOperator *I, const SCEV *LHS, 164 const SCEV *RHS); 168 Instruction *findClosestMatchingDominator(const SCEV *CandidateExpr, 191 DenseMap<const SCEV *, SmallVector<WeakVH, 2>> SeenExprs; 250 const SCEV *OldSCEV = SE->getSCEV(&*I); in doOneIteration() 262 const SCEV *NewSCEV = SE->getSCEV(&*I); in doOneIteration() 405 SmallVector<const SCEV *, 4> IndexExprs; in tryReassociateGEPAtIndex() 420 const SCEV *CandidateExpr = SE->getGEPExpr( in tryReassociateGEPAtIndex() 488 const SCEV *AExpr = SE->getSCEV(A), *BExpr = SE->getSCEV(B); in tryReassociateBinaryOp() [all …]
|
D | LoopIdiomRecognize.cpp | 117 bool runOnLoopBlock(BasicBlock *BB, const SCEV *BECount, 122 bool processLoopStore(StoreInst *SI, const SCEV *BECount); 123 bool processLoopMemSet(MemSetInst *MSI, const SCEV *BECount); 128 const SCEV *BECount, bool NegStride); 131 const SCEV *BECount, bool NegStride); 217 const SCEV *BECount = SE->getBackedgeTakenCount(CurLoop); in runOnCountableLoop() 348 BasicBlock *BB, const SCEV *BECount, in runOnLoopBlock() 384 bool LoopIdiomRecognize::processLoopStore(StoreInst *SI, const SCEV *BECount) { in processLoopStore() 411 const SCEV *BECount) { in processLoopMemSet() 452 const SCEV *BECount, unsigned StoreSize, in mayLoopAccessLocation() [all …]
|
D | IndVarSimplify.cpp | 137 Value *linearFunctionTestReplace(Loop *L, const SCEV *BackedgeTakenCount, 142 Value *expandSCEVIfNeeded(SCEVExpander &Rewriter, const SCEV *S, Loop *L, 201 const SCEV *FromBase = SE->getPointerBase(SE->getSCEV(FromPtr)); in isValidRewrite() 202 const SCEV *ToBase = SE->getPointerBase(SE->getSCEV(ToPtr)); in isValidRewrite() 514 Value *IndVarSimplify::expandSCEVIfNeeded(SCEVExpander &Rewriter, const SCEV *S, in expandSCEVIfNeeded() 615 const SCEV *ExitValue = SE->getSCEVAtScope(Inst, L->getParentLoop()); in rewriteLoopExitValues() 866 const SCEV *WideIncExpr; 905 const SCEV *getSCEVByOpCode(const SCEV *LHS, const SCEV *RHS, 1015 const SCEV *WideLHS; in cloneArithmeticIVUser() 1016 const SCEV *WideRHS; in cloneArithmeticIVUser() [all …]
|
/external/llvm/test/Other/ |
D | constant-fold-gep.ll | 13 ; "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/ |
D | SimplifyIndVar.cpp | 96 const SCEV *FoldedExpr = nullptr; in foldIVUser() 164 const SCEV *S = SE->getSCEV(ICmp->getOperand(IVOperIdx)); in eliminateIVComparison() 165 const SCEV *X = SE->getSCEV(ICmp->getOperand(1 - IVOperIdx)); in eliminateIVComparison() 173 const SCEV *InvariantLHS, *InvariantRHS; in eliminateIVComparison() 208 const SCEV *IncomingS = SE->getSCEV(Incoming); in eliminateIVComparison() 244 const SCEV *S = SE->getSCEV(Rem->getOperand(0)); in eliminateIVRemainder() 245 const SCEV *X = SE->getSCEV(Rem->getOperand(1)); in eliminateIVRemainder() 259 const SCEV *LessOne = SE->getMinusSCEV(S, SE->getOne(S->getType())); in eliminateIVRemainder() 357 const SCEV *(ScalarEvolution::*GetExprForBO)(const SCEV *, const SCEV *, in strengthenOverflowingOperation() 358 SCEV::NoWrapFlags); in strengthenOverflowingOperation() [all …]
|
/external/llvm/unittests/Analysis/ |
D | ScalarEvolutionTest.cpp | 65 const SCEV *S0 = SE.getSCEV(V0); in TEST_F() 66 const SCEV *S1 = SE.getSCEV(V1); in TEST_F() 67 const SCEV *S2 = SE.getSCEV(V2); in TEST_F() 69 const SCEV *P0 = SE.getAddExpr(S0, S0); in TEST_F() 70 const SCEV *P1 = SE.getAddExpr(S1, S1); in TEST_F() 71 const SCEV *P2 = SE.getAddExpr(S2, S2); in TEST_F() 116 SmallVector<const SCEV *, 5> A; in TEST_F() 122 const SCEV *A_rec = SE.getAddRecExpr(A, &L, SCEV::FlagAnyWrap); in TEST_F() 124 SmallVector<const SCEV *, 5> B; in TEST_F() 130 const SCEV *B_rec = SE.getAddRecExpr(B, &L, SCEV::FlagAnyWrap); in TEST_F() [all …]
|
/external/llvm/test/Transforms/IndVarSimplify/ |
D | const_phi.ll | 6 ; We can compute the expression of %phi0 and that is a SCEV 20 ; %phi0.pre and %phi1.pre are evaluated by SCEV to constant 0. 26 ; %phi0 and %phi1 are evaluated by SCEV to constant 0.
|
/external/llvm/test/Transforms/LoopSimplify/ |
D | ashr-crash.ll | 6 ; 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
|