/external/llvm/unittests/Analysis/ |
D | ScalarEvolutionTest.cpp | 63 ScalarEvolution SE = buildSE(*F); in TEST_F() local 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() 108 ScalarEvolution SE = buildSE(*F); in TEST_F() local 117 A.push_back(SE.getSCEV(&*AI++)); in TEST_F() 118 A.push_back(SE.getSCEV(&*AI++)); in TEST_F() [all …]
|
/external/llvm/lib/Analysis/ |
D | ScalarEvolutionExpander.cpp | 83 assert(SE.DT.dominates(Ret, &*BIP)); in ReuseOrCreateCast() 120 assert(SE.getTypeSizeInBits(V->getType()) == SE.getTypeSizeInBits(Ty) && in InsertNoopCastOfTo() 134 SE.getTypeSizeInBits(Ty) == SE.getTypeSizeInBits(V->getType())) { in InsertNoopCastOfTo() 138 SE.getTypeSizeInBits(CI->getType()) == in InsertNoopCastOfTo() 139 SE.getTypeSizeInBits(CI->getOperand(0)->getType())) in InsertNoopCastOfTo() 144 SE.getTypeSizeInBits(CE->getType()) == in InsertNoopCastOfTo() 145 SE.getTypeSizeInBits(CE->getOperand(0)->getType())) in InsertNoopCastOfTo() 204 while (const Loop *L = SE.LI.getLoopFor(Builder.GetInsertBlock())) { in InsertBinop() 229 const SCEV *Factor, ScalarEvolution &SE, in FactorOutConstant() argument 237 S = SE.getConstant(S->getType(), 1); in FactorOutConstant() [all …]
|
D | DependenceAnalysis.cpp | 136 SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE(); in runOnFunction() 338 return SE->getNegativeSCEV(C); in getD() 375 A = SE->getOne(D->getType()); in setDistance() 376 B = SE->getNegativeSCEV(A); in setDistance() 377 C = SE->getNegativeSCEV(D); in setDistance() 388 SE = NewSE; in setAny() 468 const SCEV *Prod1 = SE->getMulExpr(X->getA(), Y->getB()); in intersectConstraints() 469 const SCEV *Prod2 = SE->getMulExpr(X->getB(), Y->getA()); in intersectConstraints() 473 Prod1 = SE->getMulExpr(X->getC(), Y->getB()); in intersectConstraints() 474 Prod2 = SE->getMulExpr(X->getB(), Y->getC()); in intersectConstraints() [all …]
|
D | ScalarEvolutionNormalization.cpp | 70 ScalarEvolution &SE; member in __anoncc2d35270111::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 | IVUsers.cpp | 54 ScalarEvolution *SE, LoopInfo *LI) { in isInteresting() argument 62 SE->getSCEVAtScope(AR, LI->getLoopFor(I->getParent())) != AR); in isInteresting() 66 return isInteresting(AR->getStart(), I, L, SE, LI) && in isInteresting() 67 !isInteresting(AR->getStepRecurrence(*SE), I, L, SE, LI); in isInteresting() 75 if (isInteresting(*OI, I, L, SE, LI)) { in isInteresting() 127 if (!SE->isSCEVable(I->getType())) in AddUsersImpl() 139 uint64_t Width = SE->getTypeSizeInBits(I->getType()); in AddUsersImpl() 149 const SCEV *ISE = SE->getSCEV(I); in AddUsersImpl() 153 if (!isInteresting(ISE, I, L, SE, LI)) in AddUsersImpl() 208 *SE, *DT); in AddUsersImpl() [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() 44 if (SE.getEffectiveSCEVType(AS->getType()) == in alias() 45 SE.getEffectiveSCEVType(BS->getType())) { in alias() 46 unsigned BitWidth = SE.getTypeSizeInBits(AS->getType()); in alias() 51 const SCEV *BA = SE.getMinusSCEV(BS, AS); in alias() 56 if (ASizeInt.ule(SE.getUnsignedRange(BA).getUnsignedMin()) && in alias() 57 (-BSizeInt).uge(SE.getUnsignedRange(BA).getUnsignedMax())) in alias() 65 const SCEV *AB = SE.getMinusSCEV(AS, BS); in alias() 70 if (BSizeInt.ule(SE.getUnsignedRange(AB).getUnsignedMin()) && in alias() [all …]
|
D | Delinearization.cpp | 45 ScalarEvolution *SE; member in __anonaf6bcbc70111::Delinearization 68 SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE(); 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() 112 SE->delinearize(AccessFn, Subscripts, Sizes, SE->getElementSize(Inst)); in print()
|
D | ScalarEvolution.cpp | 358 SE->forgetMemoizedResults(this); in deleted() 361 SE->UniqueSCEVs.RemoveNode(this); in deleted() 369 SE->forgetMemoizedResults(this); in allUsesReplacedWith() 372 SE->UniqueSCEVs.RemoveNode(this); in allUsesReplacedWith() 697 static void divide(ScalarEvolution &SE, const SCEV *Numerator, in divide() 702 SCEVDivision D(SE, Numerator, Denominator); in divide() 730 divide(SE, *Quotient, Op, &Q, &R); in divide() 776 Quotient = SE.getConstant(QuotientVal); in visitConstant() 777 Remainder = SE.getConstant(RemainderVal); in visitConstant() 786 divide(SE, Numerator->getStart(), Denominator, &StartQ, &StartR); in visitAddRecExpr() [all …]
|
/external/llvm/lib/Transforms/Utils/ |
D | SimplifyIndVar.cpp | 49 ScalarEvolution *SE; member in __anon874e3a210111::SimplifyIndvar 57 SimplifyIndvar(Loop *Loop, ScalarEvolution *SE, DominatorTree *DT, in SimplifyIndvar() argument 59 : L(Loop), LI(LI), SE(SE), DT(DT), DeadInsts(Dead), Changed(false) { in SimplifyIndvar() 116 assert(SE->isSCEVable(IVSrc->getType()) && "Expect SCEVable IV operand"); in foldIVUser() 128 FoldedExpr = SE->getUDivExpr(SE->getSCEV(IVSrc), SE->getSCEV(D)); in foldIVUser() 131 if (!SE->isSCEVable(UseInst->getType())) in foldIVUser() 135 if (SE->getSCEV(UseInst) != FoldedExpr) in foldIVUser() 142 assert(SE->getSCEV(UseInst) == FoldedExpr && "bad SCEV with folded oper"); 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() [all …]
|
D | LoopUnroll.cpp | 76 FoldBlockIntoPredecessor(BasicBlock *BB, LoopInfo* LI, ScalarEvolution *SE, in FoldBlockIntoPredecessor() argument 112 if (SE) { in FoldBlockIntoPredecessor() 115 SE->forgetLoop(L); in FoldBlockIntoPredecessor() 160 unsigned TripMultiple, LoopInfo *LI, ScalarEvolution *SE, in UnrollLoop() argument 232 !UnrollRuntimeLoopProlog(L, Count, AllowExpensiveTripCount, LI, SE, DT, in UnrollLoop() 238 if (SE) in UnrollLoop() 239 SE->forgetLoop(L); in UnrollLoop() 343 if (SE) in UnrollLoop() 344 SE->forgetLoop(OldLoop); in UnrollLoop() 369 for (succ_iterator SI = succ_begin(*BB), SE = succ_end(*BB); in UnrollLoop() local [all …]
|
D | LCSSA.cpp | 220 ScalarEvolution *SE) { in formLCSSA() argument 256 if (SE && Changed) in formLCSSA() 257 SE->forgetLoop(&L); in formLCSSA() 266 ScalarEvolution *SE) { in formLCSSARecursively() argument 271 Changed |= formLCSSARecursively(*SubLoop, DT, LI, SE); in formLCSSARecursively() 273 Changed |= formLCSSA(L, DT, LI, SE); in formLCSSARecursively() 287 ScalarEvolution *SE; member 326 SE = SEWP ? &SEWP->getSE() : nullptr; in runOnFunction() 330 Changed |= formLCSSARecursively(**I, *DT, LI, SE); in runOnFunction()
|
D | LoopSimplify.cpp | 250 ScalarEvolution *SE, bool PreserveLCSSA, in separateNestedLoop() argument 281 if (SE) in separateNestedLoop() 282 SE->forgetLoop(L); in separateNestedLoop() 465 ScalarEvolution *SE, AssumptionCache *AC, in simplifyOneLoop() argument 493 for (succ_iterator SI = succ_begin(P), SE = succ_end(P); SI != SE; ++SI) in simplifyOneLoop() local 522 if (SE) in simplifyOneLoop() 523 SE->forgetLoop(L); in simplifyOneLoop() 573 separateNestedLoop(L, Preheader, DT, LI, SE, PreserveLCSSA, AC)) { in simplifyOneLoop() 606 if (SE) SE->forgetValue(PN); in simplifyOneLoop() 658 if (SE) in simplifyOneLoop() [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, 267 ScalarEvolution &SE, Value *&Index, in parseRangeCheckICmp() argument 270 auto IsNonNegativeAndNotLoopVarying = [&SE, L](Value *V) { in parseRangeCheckICmp() 271 const SCEV *S = SE.getSCEV(V); in parseRangeCheckICmp() 275 return SE.getLoopDisposition(S, L) == ScalarEvolution::LoopInvariant && in parseRangeCheckICmp() 276 SE.isKnownNonNegative(S); in parseRangeCheckICmp() 333 InductiveRangeCheck::parseRangeCheck(Loop *L, ScalarEvolution &SE, in parseRangeCheck() argument [all …]
|
D | IndVarSimplify.cpp | 92 ScalarEvolution *SE; member in __anon822ce7860111::IndVarSimplify 103 : LoopPass(ID), LI(nullptr), SE(nullptr), DT(nullptr), Changed(false) { in IndVarSimplify() 201 const SCEV *FromBase = SE->getPointerBase(SE->getSCEV(FromPtr)); in isValidRewrite() 202 const SCEV *ToBase = SE->getPointerBase(SE->getSCEV(ToPtr)); in isValidRewrite() 496 SE->forgetLoop(L); in rewriteNonIntegerIVs() 593 SE->forgetValue(PN); in rewriteLoopExitValues() 615 const SCEV *ExitValue = SE->getSCEVAtScope(Inst, L->getParentLoop()); in rewriteLoopExitValues() 616 if (!SE->isLoopInvariant(ExitValue, L) || in rewriteLoopExitValues() 617 !isSafeToExpand(ExitValue, *SE)) in rewriteLoopExitValues() 787 static void visitIVCast(CastInst *Cast, WideIVInfo &WI, ScalarEvolution *SE, in visitIVCast() argument [all …]
|
D | AlignmentFromAssumptions.cpp | 76 ScalarEvolution *SE; member 107 ScalarEvolution *SE) { in getNewAlignmentDiff() argument 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() 142 ScalarEvolution *SE) { in getNewAlignment() argument 143 const SCEV *PtrSCEV = SE->getSCEV(Ptr); in getNewAlignment() 144 const SCEV *DiffSCEV = SE->getMinusSCEV(PtrSCEV, AASCEV); in getNewAlignment() 148 DiffSCEV = SE->getNoopOrSignExtend(DiffSCEV, OffSCEV->getType()); in getNewAlignment() 152 DiffSCEV = SE->getMinusSCEV(DiffSCEV, OffSCEV); in getNewAlignment() [all …]
|
D | LoopStrengthReduce.cpp | 283 void initialMatch(const SCEV *S, Loop *L, ScalarEvolution &SE); 310 ScalarEvolution &SE) { in DoInitialMatch() argument 312 if (SE.properlyDominates(S, L->getHeader())) { in DoInitialMatch() 320 DoInitialMatch(S, L, Good, Bad, SE); in DoInitialMatch() 327 DoInitialMatch(AR->getStart(), L, Good, Bad, SE); in DoInitialMatch() 328 DoInitialMatch(SE.getAddRecExpr(SE.getConstant(AR->getType(), 0), in DoInitialMatch() 329 AR->getStepRecurrence(SE), in DoInitialMatch() 332 L, Good, Bad, SE); in DoInitialMatch() 340 const SCEV *NewMul = SE.getMulExpr(Ops); in DoInitialMatch() 344 DoInitialMatch(NewMul, L, MyGood, MyBad, SE); in DoInitialMatch() [all …]
|
D | LoopIdiomRecognize.cpp | 73 ScalarEvolution *SE; member in __anon259313270111::LoopIdiomRecognize 204 SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE(); in runOnLoop() 210 if (SE->hasLoopInvariantBackedgeTakenCount(L)) in runOnLoop() 217 const SCEV *BECount = SE->getBackedgeTakenCount(CurLoop); in runOnCountableLoop() 317 dyn_cast<SCEVAddRecExpr>(SE->getSCEV(StorePtr)); in isLegalStore() 392 const SCEVAddRecExpr *StoreEv = cast<SCEVAddRecExpr>(SE->getSCEV(StorePtr)); in processLoopStore() 425 const SCEVAddRecExpr *Ev = dyn_cast<SCEVAddRecExpr>(SE->getSCEV(Pointer)); in processLoopMemSet() 485 ScalarEvolution *SE) { in getStartForNegStride() argument 486 const SCEV *Index = SE->getTruncateOrZeroExtend(BECount, IntPtr); in getStartForNegStride() 488 Index = SE->getMulExpr(Index, SE->getConstant(IntPtr, StoreSize), in getStartForNegStride() [all …]
|
D | NaryReassociate.cpp | 179 ScalarEvolution *SE; member in __anon00592c420111::NaryReassociate 216 SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE(); in runOnFunction() 249 if (SE->isSCEVable(I->getType()) && isPotentiallyNaryReassociable(&*I)) { in doOneIteration() 250 const SCEV *OldSCEV = SE->getSCEV(&*I); in doOneIteration() 253 SE->forgetValue(&*I); in doOneIteration() 262 const SCEV *NewSCEV = SE->getSCEV(&*I); in doOneIteration() 407 IndexExprs.push_back(SE->getSCEV(*Index)); in tryReassociateGEPAtIndex() 409 IndexExprs[I] = SE->getSCEV(LHS); in tryReassociateGEPAtIndex() 418 SE->getZeroExtendExpr(IndexExprs[I], GEP->getOperand(I)->getType()); in tryReassociateGEPAtIndex() 420 const SCEV *CandidateExpr = SE->getGEPExpr( in tryReassociateGEPAtIndex() [all …]
|
/external/llvm/include/llvm/Analysis/ |
D | ScalarEvolutionExpressions.h | 306 const SCEV *getStepRecurrence(ScalarEvolution &SE) const { in getStepRecurrence() argument 308 return SE.getAddRecExpr(SmallVector<const SCEV *, 3>(op_begin()+1, in getStepRecurrence() 339 const SCEV *evaluateAtIteration(const SCEV *It, ScalarEvolution &SE) const; 348 ScalarEvolution &SE) const; 352 const SCEVAddRecExpr *getPostIncExpr(ScalarEvolution &SE) const { in getPostIncExpr() argument 353 return cast<SCEVAddRecExpr>(SE.getAddExpr(this, getStepRecurrence(SE))); in getPostIncExpr() 418 ScalarEvolution *SE; variable 426 SCEV(ID, scUnknown), CallbackVH(V), SE(se), Next(next) {} in SCEVUnknown() 561 ScalarEvolution &SE; 563 SCEVRewriteVisitor(ScalarEvolution &SE) : SE(SE) {} in SCEVRewriteVisitor() argument [all …]
|
D | ScalarEvolutionAliasAnalysis.h | 28 ScalarEvolution &SE; variable 31 explicit SCEVAAResult(const TargetLibraryInfo &TLI, ScalarEvolution &SE) in SCEVAAResult() argument 32 : AAResultBase(TLI), SE(SE) {} in SCEVAAResult() 33 SCEVAAResult(SCEVAAResult &&Arg) : AAResultBase(std::move(Arg)), SE(Arg.SE) {} in SCEVAAResult()
|
/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 | PPCLoopDataPrefetch.cpp | 88 ScalarEvolution *SE; member in __anon9bf2dc7f0111::PPCLoopDataPrefetch 108 SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE(); in runOnFunction() 180 const SCEV *LSCEV = SE->getSCEV(PtrValue); in runOnLoop() 192 const SCEV *PtrDiff = SE->getMinusSCEV(LSCEVAddRec, K->second); in runOnLoop() 205 const SCEV *NextLSCEV = SE->getAddExpr(LSCEVAddRec, SE->getMulExpr( in runOnLoop() 206 SE->getConstant(LSCEVAddRec->getType(), ItersAhead), in runOnLoop() 207 LSCEVAddRec->getStepRecurrence(*SE))); in runOnLoop() 208 if (!isSafeToExpand(NextLSCEV, *SE)) in runOnLoop() 214 SCEVExpander SCEVE(*SE, J->getModule()->getDataLayout(), "prefaddr"); in runOnLoop()
|
/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()
|
/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() 231 if (const SymIntExpr *SE = dyn_cast<SymIntExpr>(Sym)) { in computeAdjustment() local 232 BinaryOperator::Opcode Op = SE->getOpcode(); in computeAdjustment() 234 Sym = SE->getLHS(); in computeAdjustment() 235 Adjustment = APSIntType(Adjustment).convert(SE->getRHS()); in computeAdjustment()
|