/external/llvm/unittests/Analysis/ |
D | ScalarEvolutionTest.cpp | 27 ScalarEvolutionsTest() : M("", Context), SE(*new ScalarEvolution) {} in ScalarEvolutionsTest() 31 SE.releaseMemory(); in ~ScalarEvolutionsTest() 36 ScalarEvolution &SE; member in llvm::__anonbd9d765c0111::ScalarEvolutionsTest 53 PM.add(&SE); in TEST_F() 56 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() [all …]
|
/external/llvm/lib/Transforms/Utils/ |
D | SimplifyIndVar.cpp | 50 ScalarEvolution *SE; member in __anon0608d7c10111::SimplifyIndvar 57 SimplifyIndvar(Loop *Loop, ScalarEvolution *SE, LoopInfo *LI, in SimplifyIndvar() argument 59 : L(Loop), LI(LI), SE(SE), DeadInsts(Dead), Changed(false) { in SimplifyIndvar() 114 assert(SE->isSCEVable(IVSrc->getType()) && "Expect SCEVable IV operand"); in foldIVUser() 126 FoldedExpr = SE->getUDivExpr(SE->getSCEV(IVSrc), SE->getSCEV(D)); in foldIVUser() 129 if (!SE->isSCEVable(UseInst->getType())) in foldIVUser() 133 if (SE->getSCEV(UseInst) != FoldedExpr) in foldIVUser() 140 assert(SE->getSCEV(UseInst) == FoldedExpr && "bad SCEV with folded oper"); 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() [all …]
|
/external/llvm/lib/Analysis/ |
D | ScalarEvolutionExpander.cpp | 81 assert(SE.DT->dominates(Ret, BIP)); in ReuseOrCreateCast() 96 assert(SE.getTypeSizeInBits(V->getType()) == SE.getTypeSizeInBits(Ty) && in InsertNoopCastOfTo() 110 SE.getTypeSizeInBits(Ty) == SE.getTypeSizeInBits(V->getType())) { in InsertNoopCastOfTo() 114 SE.getTypeSizeInBits(CI->getType()) == in InsertNoopCastOfTo() 115 SE.getTypeSizeInBits(CI->getOperand(0)->getType())) in InsertNoopCastOfTo() 120 SE.getTypeSizeInBits(CE->getType()) == in InsertNoopCastOfTo() 121 SE.getTypeSizeInBits(CE->getOperand(0)->getType())) in InsertNoopCastOfTo() 185 while (const Loop *L = SE.LI->getLoopFor(Builder.GetInsertBlock())) { in InsertBinop() 210 const SCEV *Factor, ScalarEvolution &SE, in FactorOutConstant() argument 218 S = SE.getConstant(S->getType(), 1); in FactorOutConstant() [all …]
|
D | DependenceAnalysis.cpp | 136 SE = &getAnalysis<ScalarEvolution>(); in runOnFunction() 337 return SE->getNegativeSCEV(C); in getD() 374 A = SE->getConstant(D->getType(), 1); in setDistance() 375 B = SE->getNegativeSCEV(A); in setDistance() 376 C = SE->getNegativeSCEV(D); in setDistance() 387 SE = NewSE; in setAny() 467 const SCEV *Prod1 = SE->getMulExpr(X->getA(), Y->getB()); in intersectConstraints() 468 const SCEV *Prod2 = SE->getMulExpr(X->getB(), Y->getA()); in intersectConstraints() 472 Prod1 = SE->getMulExpr(X->getC(), Y->getB()); in intersectConstraints() 473 Prod2 = SE->getMulExpr(X->getB(), Y->getC()); in intersectConstraints() [all …]
|
D | ScalarEvolutionNormalization.cpp | 70 ScalarEvolution &SE; member in __anon820f8ac70111::PostIncTransform 78 Kind(kind), Loops(loops), SE(se), DT(dt) {} in PostIncTransform() 99 case scZeroExtend: return SE.getZeroExtendExpr(N, S->getType()); in TransformImpl() 100 case scSignExtend: return SE.getSignExtendExpr(N, S->getType()); in TransformImpl() 101 case scTruncate: return SE.getTruncateExpr(N, S->getType()); in TransformImpl() 119 const SCEV *Result = SE.getAddRecExpr(Operands, L, SCEV::FlagAnyWrap); in TransformImpl() 135 TransformSubExpr(AR->getStepRecurrence(SE), in TransformImpl() 137 Result = SE.getMinusSCEV(Result, TransformedStep); in TransformImpl() 166 TransformSubExpr(AR->getStepRecurrence(SE), in TransformImpl() 168 Result = SE.getMinusSCEV(Result, TransformedStep); in TransformImpl() [all …]
|
D | ScalarEvolutionAliasAnalysis.cpp | 34 ScalarEvolution *SE; member in __anon8833534e0111::ScalarEvolutionAliasAnalysis 38 ScalarEvolutionAliasAnalysis() : FunctionPass(ID), SE(nullptr) { in ScalarEvolutionAliasAnalysis() 84 SE = &getAnalysis<ScalarEvolution>(); in runOnFunction() 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() 127 if (SE->getEffectiveSCEVType(AS->getType()) == in alias() 128 SE->getEffectiveSCEVType(BS->getType())) { in alias() 129 unsigned BitWidth = SE->getTypeSizeInBits(AS->getType()); in alias() 134 const SCEV *BA = SE->getMinusSCEV(BS, AS); in alias() 139 if (ASizeInt.ule(SE->getUnsignedRange(BA).getUnsignedMin()) && in alias() [all …]
|
D | IVUsers.cpp | 51 ScalarEvolution *SE, LoopInfo *LI) { in isInteresting() argument 59 SE->getSCEVAtScope(AR, LI->getLoopFor(I->getParent())) != AR); in isInteresting() 63 return isInteresting(AR->getStart(), I, L, SE, LI) && in isInteresting() 64 !isInteresting(AR->getStepRecurrence(*SE), I, L, SE, LI); in isInteresting() 72 if (isInteresting(*OI, I, L, SE, LI)) { in isInteresting() 124 if (!SE->isSCEVable(I->getType())) in AddUsersImpl() 136 uint64_t Width = SE->getTypeSizeInBits(I->getType()); in AddUsersImpl() 141 const SCEV *ISE = SE->getSCEV(I); in AddUsersImpl() 145 if (!isInteresting(ISE, I, L, SE, LI)) in AddUsersImpl() 200 *SE, *DT); in AddUsersImpl() [all …]
|
D | LoopAccessAnalysis.cpp | 83 const SCEV *llvm::replaceSymbolicStrideSCEV(ScalarEvolution *SE, in replaceSymbolicStrideSCEV() argument 87 const SCEV *OrigSCEV = SE->getSCEV(Ptr); in replaceSymbolicStrideSCEV() 105 SCEVParameterRewriter::rewrite(OrigSCEV, *SE, RewriteMap, true); in replaceSymbolicStrideSCEV() 112 return SE->getSCEV(Ptr); in replaceSymbolicStrideSCEV() 116 ScalarEvolution *SE, Loop *Lp, Value *Ptr, bool WritePtr, unsigned DepSetId, in insert() argument 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() 225 unsigned &NumComparisons, ScalarEvolution *SE, 275 static bool hasComputableBounds(ScalarEvolution *SE, in hasComputableBounds() argument [all …]
|
D | Delinearization.cpp | 45 ScalarEvolution *SE; member in __anon67927d670111::Delinearization 68 SE = &getAnalysis<ScalarEvolution>(); in runOnFunction() 97 const SCEV *AccessFn = SE->getSCEVAtScope(getPointerOperand(*Inst), L); in print() 100 dyn_cast<SCEVUnknown>(SE->getPointerBase(AccessFn)); in print() 104 AccessFn = SE->getMinusSCEV(AccessFn, BasePointer); in print() 118 AR->delinearize(*SE, Subscripts, Sizes, SE->getElementSize(Inst)); in print()
|
D | ScalarEvolution.cpp | 367 SE->forgetMemoizedResults(this); in deleted() 370 SE->UniqueSCEVs.RemoveNode(this); in deleted() 378 SE->forgetMemoizedResults(this); in allUsesReplacedWith() 381 SE->UniqueSCEVs.RemoveNode(this); in allUsesReplacedWith() 708 static void divide(ScalarEvolution &SE, const SCEV *Numerator, in divide() 713 SCEVDivision D(SE, Numerator, Denominator); in divide() 734 divide(SE, *Quotient, Op, &Q, &R); in divide() 780 Quotient = SE.getConstant(QuotientVal); in visitConstant() 781 Remainder = SE.getConstant(RemainderVal); in visitConstant() 789 divide(SE, Numerator->getStart(), Denominator, &StartQ, &StartR); in visitAddRecExpr() [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | InductiveRangeCheckElimination.cpp | 126 ScalarEvolution &SE, Value *&Index, 130 parseRangeCheck(Loop *L, ScalarEvolution &SE, Value *Condition, 192 Optional<Range> computeSafeIterationSpace(ScalarEvolution &SE, 199 Loop *L, ScalarEvolution &SE, 260 ScalarEvolution &SE, Value *&Index, in parseRangeCheckICmp() argument 263 auto IsNonNegativeAndNotLoopVarying = [&SE, L](Value *V) { in parseRangeCheckICmp() 264 const SCEV *S = SE.getSCEV(V); in parseRangeCheckICmp() 268 return SE.getLoopDisposition(S, L) == ScalarEvolution::LoopInvariant && in parseRangeCheckICmp() 269 SE.isKnownNonNegative(S); in parseRangeCheckICmp() 326 InductiveRangeCheck::parseRangeCheck(Loop *L, ScalarEvolution &SE, in parseRangeCheck() argument [all …]
|
D | AlignmentFromAssumptions.cpp | 72 ScalarEvolution *SE; member 103 ScalarEvolution *SE) { in getNewAlignmentDiff() argument 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() 138 ScalarEvolution *SE) { in getNewAlignment() argument 139 const SCEV *PtrSCEV = SE->getSCEV(Ptr); in getNewAlignment() 140 const SCEV *DiffSCEV = SE->getMinusSCEV(PtrSCEV, AASCEV); in getNewAlignment() 144 DiffSCEV = SE->getNoopOrSignExtend(DiffSCEV, OffSCEV->getType()); in getNewAlignment() 148 DiffSCEV = SE->getMinusSCEV(DiffSCEV, OffSCEV); in getNewAlignment() [all …]
|
D | IndVarSimplify.cpp | 74 ScalarEvolution *SE; member in __anond83b39260111::IndVarSimplify 85 : LoopPass(ID), LI(nullptr), SE(nullptr), DT(nullptr), Changed(false) { in IndVarSimplify() 178 const SCEV *FromBase = SE->getPointerBase(SE->getSCEV(FromPtr)); in isValidRewrite() 179 const SCEV *ToBase = SE->getPointerBase(SE->getSCEV(ToPtr)); in isValidRewrite() 464 SE->forgetLoop(L); in RewriteNonIntegerIVs() 532 SE->forgetValue(PN); in RewriteLoopExitValues() 554 const SCEV *ExitValue = SE->getSCEVAtScope(Inst, L->getParentLoop()); in RewriteLoopExitValues() 555 if (!SE->isLoopInvariant(ExitValue, L) || in RewriteLoopExitValues() 556 !isSafeToExpand(ExitValue, *SE)) in RewriteLoopExitValues() 664 static void visitIVCast(CastInst *Cast, WideIVInfo &WI, ScalarEvolution *SE, in visitIVCast() argument [all …]
|
D | LoopStrengthReduce.cpp | 264 void InitialMatch(const SCEV *S, Loop *L, ScalarEvolution &SE); 291 ScalarEvolution &SE) { in DoInitialMatch() argument 293 if (SE.properlyDominates(S, L->getHeader())) { in DoInitialMatch() 302 DoInitialMatch(*I, L, Good, Bad, SE); in DoInitialMatch() 309 DoInitialMatch(AR->getStart(), L, Good, Bad, SE); in DoInitialMatch() 310 DoInitialMatch(SE.getAddRecExpr(SE.getConstant(AR->getType(), 0), in DoInitialMatch() 311 AR->getStepRecurrence(SE), in DoInitialMatch() 314 L, Good, Bad, SE); in DoInitialMatch() 322 const SCEV *NewMul = SE.getMulExpr(Ops); in DoInitialMatch() 326 DoInitialMatch(NewMul, L, MyGood, MyBad, SE); in DoInitialMatch() [all …]
|
D | NaryReassociate.cpp | 131 ScalarEvolution *SE; member in __anon1831b1e20111::NaryReassociate 164 SE = &getAnalysis<ScalarEvolution>(); in runOnFunction() 187 SE->forgetValue(I); in doOneIteration() 194 SeenExprs[SE->getSCEV(I)].push_back(I); in doOneIteration() 217 const SCEV *AExpr = SE->getSCEV(A), *BExpr = SE->getSCEV(B); in tryReassociateAdd() 218 const SCEV *RHSExpr = SE->getSCEV(RHS); in tryReassociateAdd() 219 if (auto *NewI = tryReassociatedAdd(SE->getAddExpr(AExpr, RHSExpr), B, I)) in tryReassociateAdd() 221 if (auto *NewI = tryReassociatedAdd(SE->getAddExpr(BExpr, RHSExpr), A, I)) in tryReassociateAdd()
|
D | LoopInterchange.cpp | 298 static PHINode *getInductionVariable(Loop *L, ScalarEvolution *SE) { in getInductionVariable() argument 311 dyn_cast<SCEVAddRecExpr>(SE->getSCEV(PhiVar)); in getInductionVariable() 314 const SCEV *Step = AddRec->getStepRecurrence(*SE); in getInductionVariable() 329 LoopInterchangeLegality(Loop *Outer, Loop *Inner, ScalarEvolution *SE, in LoopInterchangeLegality() argument 331 : OuterLoop(Outer), InnerLoop(Inner), SE(SE), CurrentPass(Pass) {} in LoopInterchangeLegality() 349 ScalarEvolution *SE; member in __anon1caa9d370111::LoopInterchangeLegality 357 LoopInterchangeProfitability(Loop *Outer, Loop *Inner, ScalarEvolution *SE) in LoopInterchangeProfitability() argument 358 : OuterLoop(Outer), InnerLoop(Inner), SE(SE) {} in LoopInterchangeProfitability() 371 ScalarEvolution *SE; member in __anon1caa9d370111::LoopInterchangeProfitability 377 LoopInterchangeTransform(Loop *Outer, Loop *Inner, ScalarEvolution *SE, in LoopInterchangeTransform() argument [all …]
|
D | LoopIdiomRecognize.cpp | 134 ScalarEvolution *SE; member in __anon97b134c70111::LoopIdiomRecognize 142 SE = nullptr; in LoopIdiomRecognize() 190 return SE ? SE : (SE = &getAnalysis<ScalarEvolution>()); in getScalarEvolution() 464 ScalarEvolution *SE = LIR.getScalarEvolution(); in transform() local 567 SE->forgetLoop(CurLoop); in transform() 613 const SCEV *BECount = SE->getBackedgeTakenCount(CurLoop); in runOnCountableLoop() 675 SE = &getAnalysis<ScalarEvolution>(); in runOnLoop() 676 if (SE->hasLoopInvariantBackedgeTakenCount(L)) in runOnLoop() 744 dyn_cast<SCEVAddRecExpr>(SE->getSCEV(StorePtr)); in processLoopStore() 775 dyn_cast<SCEVAddRecExpr>(SE->getSCEV(LI->getOperand(0))); in processLoopStore() [all …]
|
D | LoopUnrollPass.cpp | 271 ScalarEvolution &SE; member 272 FindConstantPointers(const Loop *loop, ScalarEvolution &SE) in FindConstantPointers() 273 : LoadCanBeConstantFolded(true), IndexIsConstant(true), L(loop), SE(SE) {} in FindConstantPointers() 296 dyn_cast<SCEVConstant>(AR->getStepRecurrence(SE))) in follow() 333 ScalarEvolution &SE; member in __anon62ebf5e20211::UnrollAnalyzer 394 const SCEV *BaseAddrSE = SE.getSCEV(BaseAddr); in computeLoadValue() 395 const SCEV *S = SE.getSCEV(LI->getPointerOperand()); in computeLoadValue() 396 const SCEV *OffSE = SE.getMinusSCEV(S, BaseAddrSE); in computeLoadValue() 404 dyn_cast<SCEVConstant>(AR->getStepRecurrence(SE))) in computeLoadValue() 428 UnrollAnalyzer(const Loop *L, unsigned TripCount, ScalarEvolution &SE, in UnrollAnalyzer() argument [all …]
|
/external/llvm/include/llvm/Analysis/ |
D | ScalarEvolutionExpressions.h | 305 const SCEV *getStepRecurrence(ScalarEvolution &SE) const { in getStepRecurrence() argument 307 return SE.getAddRecExpr(SmallVector<const SCEV *, 3>(op_begin()+1, in getStepRecurrence() 338 const SCEV *evaluateAtIteration(const SCEV *It, ScalarEvolution &SE) const; 347 ScalarEvolution &SE) const; 351 const SCEVAddRecExpr *getPostIncExpr(ScalarEvolution &SE) const { in getPostIncExpr() argument 352 return cast<SCEVAddRecExpr>(SE.getAddExpr(this, getStepRecurrence(SE))); in getPostIncExpr() 361 void collectParametricTerms(ScalarEvolution &SE, 365 void computeAccessFunctions(ScalarEvolution &SE, 433 void delinearize(ScalarEvolution &SE, 495 ScalarEvolution *SE; variable [all …]
|
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
D | SymbolManager.h | 81 symbol_iterator(const SymExpr *SE); 117 static inline bool classof(const SymExpr *SE) { in classof() argument 118 Kind k = SE->getKind(); in classof() 147 static inline bool classof(const SymExpr *SE) { in classof() argument 148 return SE->getKind() == RegionValueKind; in classof() 193 static inline bool classof(const SymExpr *SE) { in classof() argument 194 return SE->getKind() == ConjuredKind; in classof() 227 static inline bool classof(const SymExpr *SE) { in classof() argument 228 return SE->getKind() == DerivedKind; in classof() 258 static inline bool classof(const SymExpr *SE) { in classof() argument [all …]
|
/external/llvm/include/llvm/ADT/ |
D | SetOperations.h | 26 for (typename S2Ty::const_iterator SI = S2.begin(), SE = S2.end(); in set_union() local 27 SI != SE; ++SI) in set_union() 53 for (typename S1Ty::const_iterator SI = S1.begin(), SE = S1.end(); in set_difference() local 54 SI != SE; ++SI) in set_difference() 64 for (typename S2Ty::const_iterator SI = S2.begin(), SE = S2.end(); in set_subtract() local 65 SI != SE; ++SI) in set_subtract()
|
/external/llvm/lib/Target/PowerPC/ |
D | PPCLoopPreIncPrep.cpp | 88 ScalarEvolution *SE; member in __anon56a3506c0111::PPCLoopPreIncPrep 106 SCEVLess(ScalarEvolution *SE) : SE(SE) {} in SCEVLess() 109 const SCEV *Diff = SE->getMinusSCEV(X, Y); in operator ()() 114 ScalarEvolution *SE; member 143 SE = &getAnalysis<ScalarEvolution>(); in runOnFunction() 206 const SCEV *LSCEV = SE->getSCEVAtScope(PtrValue, L); in runOnLoop() 218 const SCEV *Diff = SE->getMinusSCEV(K->first, LSCEV); in runOnLoop() 227 Buckets.push_back(Bucket(SCEVLess(SE))); in runOnLoop() 274 if (!SE->isLoopInvariant(BasePtrStartSCEV, L)) in runOnLoop() 278 dyn_cast<SCEVConstant>(BasePtrSCEV->getStepRecurrence(*SE)); in runOnLoop() [all …]
|
D | PPCLoopDataPrefetch.cpp | 87 ScalarEvolution *SE; member in __anonaedc161f0111::PPCLoopDataPrefetch 107 SE = &getAnalysis<ScalarEvolution>(); in runOnFunction() 179 const SCEV *LSCEV = SE->getSCEV(PtrValue); in runOnLoop() 191 const SCEV *PtrDiff = SE->getMinusSCEV(LSCEVAddRec, K->second); in runOnLoop() 204 const SCEV *NextLSCEV = SE->getAddExpr(LSCEVAddRec, SE->getMulExpr( in runOnLoop() 205 SE->getConstant(LSCEVAddRec->getType(), ItersAhead), in runOnLoop() 206 LSCEVAddRec->getStepRecurrence(*SE))); in runOnLoop() 207 if (!isSafeToExpand(NextLSCEV, *SE)) in runOnLoop() 213 SCEVExpander SCEVE(*SE, J->getModule()->getDataLayout(), "prefaddr"); in runOnLoop()
|
/external/clang/lib/StaticAnalyzer/Core/ |
D | SimpleConstraintManager.cpp | 29 const SymExpr *SE = SymVal->getSymbol(); in canReasonAbout() local 31 if (const SymIntExpr *SIE = dyn_cast<SymIntExpr>(SE)) { in canReasonAbout() 52 if (const SymSymExpr *SSE = dyn_cast<SymSymExpr>(SE)) { in canReasonAbout() 140 } else if (const SymIntExpr *SE = dyn_cast<SymIntExpr>(sym)) { in assumeAux() local 143 BinaryOperator::Opcode op = SE->getOpcode(); in assumeAux() 148 return assumeSymRel(state, SE->getLHS(), op, SE->getRHS()); in assumeAux() 195 if (const SymIntExpr *SE = dyn_cast<SymIntExpr>(Sym)) { in computeAdjustment() local 196 BinaryOperator::Opcode Op = SE->getOpcode(); in computeAdjustment() 198 Sym = SE->getLHS(); in computeAdjustment() 199 Adjustment = APSIntType(Adjustment).convert(SE->getRHS()); in computeAdjustment()
|
/external/clang/lib/StaticAnalyzer/Checkers/ |
D | VLASizeChecker.cpp | 96 const Expr *SE = VLA->getSizeExpr(); in checkPreStmt() local 98 SVal sizeV = state->getSVal(SE, C.getLocationContext()); in checkPreStmt() 101 reportBug(VLA_Garbage, SE, state, C); in checkPreStmt() 112 reportBug(VLA_Tainted, SE, nullptr, C); in checkPreStmt() 123 reportBug(VLA_Zero, SE, stateZero, C); in checkPreStmt() 137 QualType Ty = SE->getType(); in checkPreStmt() 148 reportBug(VLA_Negative, SE, state, C); in checkPreStmt() 157 svalBuilder.evalCast(sizeD, SizeTy, SE->getType()).castAs<NonLoc>(); in checkPreStmt()
|