Home
last modified time | relevance | path

Searched refs:getSCEV (Results 1 – 25 of 59) sorted by relevance

123

/llvm-project-15.0.7/llvm/unittests/Analysis/
H A DScalarEvolutionTest.cpp95 const SCEV *S0 = SE.getSCEV(V0); in TEST_F()
96 const SCEV *S1 = SE.getSCEV(V1); in TEST_F()
97 const SCEV *S2 = SE.getSCEV(V2); in TEST_F()
145 auto *S1 = SE.getSCEV(PN); in TEST_F()
146 auto *S2 = SE.getSCEV(PN); in TEST_F()
387 auto *A = SE.getSCEV(MulA); in TEST_F()
388 auto *B = SE.getSCEV(MulB); in TEST_F()
429 SE.getAddExpr(SE.getSCEV(A2), SE.getSCEV(A3), SCEV::FlagNUW), in TEST_F()
435 SE.getAddExpr(SE.getSCEV(A3), SE.getSCEV(A4), SCEV::FlagAnyWrap); in TEST_F()
449 SE.getAddExpr(SE.getSCEV(A2), SE.getSCEV(A4), in TEST_F()
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/Utils/
H A DSimplifyIndVar.cpp164 const auto *LHS = SE->getSCEV(IVSrc); in foldIVUser()
165 const auto *RHS = SE->getSCEV(D); in foldIVUser()
390 const SCEV *N = SE->getSCEV(NValue); in simplifyIVRemainder()
402 const SCEV *D = SE->getSCEV(DValue); in simplifyIVRemainder()
507 const SCEV *IVSCEV = SE->getSCEV(IV); in eliminateTrunc()
508 const SCEV *TISCEV = SE->getSCEV(TI); in eliminateTrunc()
652 const SCEV *S = SE->getSCEV(I); in replaceIVUserWithLoopInvariant()
724 (SE->getSCEV(UseInst) != SE->getSCEV(IVOperand))) in eliminateIdentitySCEV()
853 const SCEV *S = SE->getSCEV(I); in isSimpleIVUser()
1287 WideLHS = SE->getSCEV(WideDef); in cloneArithmeticIVUser()
[all …]
/llvm-project-15.0.7/llvm/lib/Transforms/Scalar/
H A DNaryReassociate.cpp284 OrigSCEV = SE->getSCEV(I); in matchAndReassociateMinOrMax()
304 OrigSCEV = SE->getSCEV(I); in tryReassociate()
307 OrigSCEV = SE->getSCEV(I); in tryReassociate()
402 IndexExprs.push_back(SE->getSCEV(Index)); in tryReassociateGEPAtIndex()
404 IndexExprs[I] = SE->getSCEV(LHS); in tryReassociateGEPAtIndex()
468 if (SE->getSCEV(I)->isZero()) in tryReassociateBinaryOp()
485 const SCEV *AExpr = SE->getSCEV(A), *BExpr = SE->getSCEV(B); in tryReassociateBinaryOp()
486 const SCEV *RHSExpr = SE->getSCEV(RHS); in tryReassociateBinaryOp()
642 const SCEV *AExpr = SE->getSCEV(A); in tryReassociateMinOrMax()
643 const SCEV *BExpr = SE->getSCEV(B); in tryReassociateMinOrMax()
[all …]
H A DLoopLoadElimination.cpp117 auto *LoadPtrSCEV = cast<SCEVAddRecExpr>(PSE.getSCEV(LoadPtr)); in isDependenceDistanceOfOne()
118 auto *StorePtrSCEV = cast<SCEVAddRecExpr>(PSE.getSCEV(StorePtr)); in isDependenceDistanceOfOne()
429 auto *PtrSCEV = cast<SCEVAddRecExpr>(PSE.getSCEV(Ptr)); in propagateStoredValueToLoadUsers()
506 assert(isa<SCEVAddRecExpr>(PSE.getSCEV(Cand.Load->getPointerOperand())) && in processLoop()
509 isa<SCEVAddRecExpr>(PSE.getSCEV(Cand.Store->getPointerOperand())) && in processLoop()
572 PSE.getSCEV(Cand.Load->getPointerOperand())) || in processLoop()
574 PSE.getSCEV(Cand.Store->getPointerOperand())); in processLoop()
H A DAlignmentFromAssumptions.cpp128 const SCEV *PtrSCEV = SE->getSCEV(Ptr); in getNewAlignment()
219 AlignSCEV = SE->getSCEV(AlignOB.Inputs[1].get()); in extractAlignmentInfo()
226 OffSCEV = SE->getSCEV(AlignOB.Inputs[2].get()); in extractAlignmentInfo()
245 const SCEV *AASCEV = SE->getSCEV(AAPtr); in processAssumption()
H A DStraightLineStrengthReduce.cpp416 allocateCandidatesAndFindBasis(Candidate::Add, SE->getSCEV(LHS), Idx, S, I); in allocateCandidatesAndFindBasisForAdd()
421 allocateCandidatesAndFindBasis(Candidate::Add, SE->getSCEV(LHS), Idx, S, I); in allocateCandidatesAndFindBasisForAdd()
425 allocateCandidatesAndFindBasis(Candidate::Add, SE->getSCEV(LHS), One, RHS, in allocateCandidatesAndFindBasisForAdd()
449 allocateCandidatesAndFindBasis(Candidate::Mul, SE->getSCEV(B), Idx, RHS, I); in allocateCandidatesAndFindBasisForMul()
455 allocateCandidatesAndFindBasis(Candidate::Mul, SE->getSCEV(B), Idx, RHS, I); in allocateCandidatesAndFindBasisForMul()
459 allocateCandidatesAndFindBasis(Candidate::Mul, SE->getSCEV(LHS), Zero, RHS, in allocateCandidatesAndFindBasisForMul()
536 IndexExprs.push_back(SE->getSCEV(Idx)); in allocateCandidatesAndFindBasisForGEP()
H A DLoopRerollPass.cpp589 dyn_cast<SCEVAddRecExpr>(SE->getSCEV(&*I))) { in collectPossibleIVs()
902 const auto *ADR = dyn_cast<SCEVAddRecExpr>(SE->getSCEV(DRS.BaseInst)); in validateRootSet()
908 const SCEV *StepSCEV = SE->getMinusSCEV(SE->getSCEV(DRS.Roots[0]), ADR); in validateRootSet()
917 const SCEV *NewStepSCEV = SE->getMinusSCEV(SE->getSCEV(DRS.Roots[i]), in validateRootSet()
918 SE->getSCEV(DRS.Roots[i-1])); in validateRootSet()
929 const auto *IVU_ADR = dyn_cast<SCEVAddRecExpr>(SE->getSCEV(IVU)); in findRootsBase()
1448 cast<SCEVAddRecExpr>(SE->getSCEV(DRS.BaseInst)); in replace()
1450 IncrExprs.push_back(SE->getMinusSCEV(SE->getSCEV(DRS.Roots[0]), IVSCEV)); in replace()
H A DLoopIdiomRecognize.cpp507 dyn_cast<SCEVAddRecExpr>(SE->getSCEV(StorePtr)); in isLegalStore()
566 dyn_cast<SCEVAddRecExpr>(SE->getSCEV(LI->getPointerOperand())); in isLegalStore()
672 cast<SCEVAddRecExpr>(SE->getSCEV(FirstStorePtr)); in processLoopStores()
708 cast<SCEVAddRecExpr>(SE->getSCEV(SecondStorePtr)); in processLoopStores()
844 const SCEVAddRecExpr *StoreEv = dyn_cast<SCEVAddRecExpr>(SE->getSCEV(Dest)); in processLoopMemCpy()
910 const SCEVAddRecExpr *Ev = dyn_cast<SCEVAddRecExpr>(SE->getSCEV(Pointer)); in processLoopMemSet()
919 const SCEV *MemsetSizeSCEV = SE->getSCEV(MSI->getLength()); in processLoopMemSet()
996 return processLoopStridedStore(Pointer, SE->getSCEV(MSI->getLength()), in processLoopMemSet()
1268 const SCEVAddRecExpr *LoadEv = cast<SCEVAddRecExpr>(SE->getSCEV(LoadPtr)); in processLoopStoreOfLoopLoad()
2673 ExtraOffsetExpr = SE->getNegativeSCEV(SE->getSCEV(ExtraOffset)); in detectShiftUntilZeroIdiom()
[all …]
H A DIndVarSimplify.cpp872 const SCEVAddRecExpr *AR = dyn_cast<SCEVAddRecExpr>(SE->getSCEV(Phi)); in isLoopCounter()
883 isa<SCEVAddRecExpr>(SE->getSCEV(IncV))); in isLoopCounter()
916 const auto *AR = cast<SCEVAddRecExpr>(SE->getSCEV(Phi)); in FindLoopCounter()
981 const SCEVAddRecExpr *AR = cast<SCEVAddRecExpr>(SE->getSCEV(IndVar)); in genLoopLimit()
1104 const SCEVAddRecExpr *AR = cast<SCEVAddRecExpr>(SE->getSCEV(IncVar)); in linearFunctionTestReplace()
1149 const SCEV *IV = SE->getSCEV(CmpIndVar); in linearFunctionTestReplace()
1150 const SCEV *TruncatedIV = SE->getTruncateExpr(SE->getSCEV(CmpIndVar), in linearFunctionTestReplace()
1474 auto RHSCR = SE->getUnsignedRange(SE->applyLoopGuards(SE->getSCEV(RHS), L)); in canonicalizeExitCondition()
1525 if (!LHS->hasOneUse() && !isa<SCEVAddRecExpr>(SE->getSCEV(LHSOp))) in canonicalizeExitCondition()
1549 auto RHSCR = SE->getUnsignedRange(SE->applyLoopGuards(SE->getSCEV(RHS), L)); in canonicalizeExitCondition()
H A DLoopBoundSplit.cpp56 const SCEV *AddRecSCEV = SE.getSCEV(Cond.AddRecValue); in analyzeICmp()
57 const SCEV *BoundSCEV = SE.getSCEV(Cond.BoundValue); in analyzeICmp()
386 const SCEVAddRecExpr *PhiSCEV = dyn_cast<SCEVAddRecExpr>(SE.getSCEV(&PN)); in splitLoopBound()
H A DInductiveRangeCheckElimination.cpp297 return SE.isLoopInvariant(SE.getSCEV(V), L); in INITIALIZE_PASS_DEPENDENCY()
378 const auto *IndexAddRec = dyn_cast<SCEVAddRecExpr>(SE.getSCEV(Index)); in extractRangeChecksFromCond()
389 End = SE.getSCEV(Length); in extractRangeChecksFromCond()
800 const SCEV *LeftSCEV = SE.getSCEV(LeftValue); in parseLoopStructure()
804 const SCEV *RightSCEV = SE.getSCEV(RightValue); in parseLoopStructure()
870 const SCEV *Step = SE.getSCEV(StepCI); in parseLoopStructure()
1077 const SCEV *Start = NoopOrExtend(SE.getSCEV(MainLoopStructure.IndVarStart), in calculateSubRanges()
1079 const SCEV *End = NoopOrExtend(SE.getSCEV(MainLoopStructure.LoopExitAt), RTy, in calculateSubRanges()
1934 cast<SCEVAddRecExpr>(SE.getMinusSCEV(SE.getSCEV(LS.IndVarBase), SE.getSCEV(LS.IndVarStep))); in run()
H A DLoopStrengthReduce.cpp944 SE.getSCEV(&PN) == AR) in isExistingPhi()
1006 return SE.getSCEV(UI) == Mul; in isHighCostExpansion()
2955 const SCEV *const OperExpr = SE.getSCEV(NextIV); in ChainInstruction()
2981 const SCEV *PrevExpr = SE.getSCEV(PrevIV); in ChainInstruction()
3049 && !isa<SCEVUnknown>(SE.getSCEV(OtherUse)) in ChainInstruction()
3205 if (SE.getSCEV(*IVOpIter) == Head.IncExpr in GenerateIVChain()
3206 || SE.getSCEV(IVSrc) == Head.IncExpr) { in GenerateIVChain()
3271 if (!PostIncV || (SE.getSCEV(PostIncV) != SE.getSCEV(IVSrc))) in GenerateIVChain()
3335 const SCEV *N = SE.getSCEV(NV); in CollectFixupsAndInitialFormulae()
4312 if (F.referencesReg(SE.getSCEV( in GenerateCrossUseConstantOffsets()
[all …]
/llvm-project-15.0.7/llvm/unittests/Transforms/Scalar/
H A DLICMTest.cpp70 ASSERT_EQ(SE.getBlockDisposition(SE.getSCEV(IBefore), LoopBB), in TEST()
81 SE.getBlockDisposition(SE.getSCEV(IAfter), LoopBB); in TEST()
84 SE.getBlockDisposition(SE.getSCEV(IAfter), LoopBB); in TEST()
/llvm-project-15.0.7/llvm/lib/Target/ARM/
H A DMVETailPredication.cpp212 auto *EC= SE->getSCEV(ElemCount); in IsSafeActiveMask()
213 auto *TC = SE->getSCEV(TripCount); in IsSafeActiveMask()
267 auto *VW = SE->getSCEV(ConstantInt::get(TripCount->getType(), VectorWidth)); in IsSafeActiveMask()
270 SE->getSCEV(ConstantInt::get(TripCount->getType(), VectorWidth - 1))); in IsSafeActiveMask()
320 auto *IVExpr = SE->getSCEV(IV); in IsSafeActiveMask()
/llvm-project-15.0.7/llvm/unittests/Transforms/Utils/
H A DScalarEvolutionExpanderTest.cpp120 auto *S = SE.getSCEV(CastB); in TEST_F()
263 const SCEV *S = SE.getSCEV(Phi); in TEST_F()
322 const SCEV *S = SE.getSCEV(S1); in TEST_F()
374 const SCEV *S = SE.getSCEV(S1); in TEST_F()
420 const SCEV *SC2 = SE.getSCEV(S2); in TEST_F()
423 const SCEV *SC1 = SE.getSCEV(S1); in TEST_F()
471 const SCEV *SC2 = SE.getSCEV(S2); in TEST_F()
474 const SCEV *SC1 = SE.getSCEV(S1); in TEST_F()
701 const SCEV *AndSCEV = SE.getSCEV(And); in TEST_F()
814 auto *ExpandedAR = SE.getSCEV(V); in TEST_F()
[all …]
/llvm-project-15.0.7/llvm/lib/Analysis/
H A DScalarEvolution.cpp5571 Accum = getSCEV(BO->RHS); in createSimpleAffineAddRec()
5573 Accum = getSCEV(BO->LHS); in createSimpleAffineAddRec()
5926 return getSCEV(V); in createNodeForPHI()
7530 LHS = getSCEV(BO->LHS); in createSCEV()
7531 RHS = getSCEV(BO->RHS); in createSCEV()
7534 LHS = getSCEV(BO->LHS); in createSCEV()
7535 RHS = getSCEV(BO->RHS); in createSCEV()
7804 return getUDivExpr(getSCEV(U->getOperand(0)), getSCEV(U->getOperand(1))); in createSCEV()
7811 return getURemExpr(getSCEV(U->getOperand(0)), getSCEV(U->getOperand(1))); in createSCEV()
7827 return getSCEV(RV); in createSCEV()
[all …]
H A DIVUsers.cpp166 const SCEV *ISE = SE->getSCEV(I); in AddUsersIfInteresting()
239 LLVM_DEBUG(if (SE->getSCEV(I) != ISE) dbgs() in AddUsersIfInteresting()
332 return SE->getSCEV(IU.getOperandValToReplace()); in getReplacementExpr()
H A DScalarEvolutionAliasAnalysis.cpp45 const SCEV *AS = SE.getSCEV(const_cast<Value *>(LocA.Ptr)); in alias()
46 const SCEV *BS = SE.getSCEV(const_cast<Value *>(LocB.Ptr)); in alias()
H A DLoopAccessAnalysis.cpp152 const SCEV *OrigSCEV = PSE.getSCEV(Ptr); in replaceSymbolicStrideSCEV()
169 auto *Expr = PSE.getSCEV(Ptr); in replaceSymbolicStrideSCEV()
755 const SCEV *PtrScev = PSE.getSCEV(Ptr); in isNoWrap()
814 const SCEV *Scev = SE->getSCEV(Ptr); in findForkedSCEVs()
948 auto *Expr = PSE.getSCEV(Ptr); in createCheckForAccess()
1307 auto *OpScev = PSE.getSCEV(OBO->getOperand(0)); in isNoWrapAddRec()
1475 const SCEV *PtrSCEVA = SE.getSCEV(PtrA); in getPointersDiff()
1476 const SCEV *PtrSCEVB = SE.getSCEV(PtrB); in getPointersDiff()
1802 const SCEV *Src = PSE.getSCEV(APtr); in isDependent()
1803 const SCEV *Sink = PSE.getSCEV(BPtr); in isDependent()
[all …]
H A DIVDescriptors.cpp327 const SCEV *PtrScev = SE->getSCEV(SI->getPointerOperand()); in AddReductionVar()
331 SE->getSCEV(IntermediateStore->getPointerOperand()); in AddReductionVar()
1380 assert(PSE.getSCEV(PN) == AR && "Unexpected phi node SCEV expression"); in getCastsForInductionPHI()
1426 auto *AddRec = dyn_cast<SCEVAddRecExpr>(PSE.getSCEV(Val)); in getCastsForInductionPHI()
1462 const SCEV *PhiScev = PSE.getSCEV(Phi); in isInductionPHI()
1500 const SCEV *PhiScev = Expr ? Expr : SE->getSCEV(Phi); in isInductionPHI()
H A DStackSafetyAnalysis.cpp276 const SCEV *AddrExp = SE.getTruncateOrZeroExtend(SE.getSCEV(Addr), PtrTy); in offsetFrom()
277 const SCEV *BaseExp = SE.getTruncateOrZeroExtend(SE.getSCEV(Base), PtrTy); in offsetFrom()
332 SE.getTruncateOrZeroExtend(SE.getSCEV(MI->getLength()), CalculationTy); in getMemIntrinsicAccessRange()
343 return isSafeAccess(U, AI, SE.getSCEV(V)); in isSafeAccess()
370 const SCEV *AddrExp = ToCharPtr(SE.getSCEV(U.get())); in isSafeAccess()
371 const SCEV *BaseExp = ToCharPtr(SE.getSCEV(AI)); in isSafeAccess()
/llvm-project-15.0.7/llvm/lib/Transforms/Instrumentation/
H A DBoundsChecking.cpp77 auto SizeRange = SE.getUnsignedRange(SE.getSCEV(Size)); in getBoundsCheckCond()
78 auto OffsetRange = SE.getUnsignedRange(SE.getSCEV(Offset)); in getBoundsCheckCond()
79 auto NeededSizeRange = SE.getUnsignedRange(SE.getSCEV(NeededSizeVal)); in getBoundsCheckCond()
/llvm-project-15.0.7/polly/lib/Support/
H A DSCEVValidator.cpp408 auto *Dividend = SE.getSCEV(SDiv->getOperand(0)); in visitSDivInstruction()
409 auto *Divisor = SE.getSCEV(SDiv->getOperand(1)); in visitSDivInstruction()
423 auto *DividendSCEV = SE.getSCEV(Dividend); in visitSRemInstruction()
561 auto *Dividend = SE.getSCEV(Inst->getOperand(1)); in follow()
565 auto *Divisor = SE.getSCEV(Inst->getOperand(0)); in follow()
618 auto *E = SE.getSCEV(V); in isAffineExpr()
751 return SE.getSCEV(Final); in tryForwardThroughPHI()
H A DScopHelper.cpp285 auto *OpSCEV = SE.getSCEV(Op); in visitGenericInst()
292 return SE.getSCEV(InstClone); in visitGenericInst()
300 auto *NewE = SE.getSCEV(NewVal); in visitUnknown()
321 const SCEV *LHSScev = SE.getSCEV(Inst->getOperand(0)); in visitUnknown()
322 const SCEV *RHSScev = SE.getSCEV(Inst->getOperand(1)); in visitUnknown()
332 return SE.getSCEV(Inst); in visitUnknown()
/llvm-project-15.0.7/llvm/lib/Transforms/Vectorize/
H A DLoopVectorizationLegality.cpp442 if (SE->getSCEV(APtr) == SE->getSCEV(BPtr)) in storeToSameAddress()
780 if (!SE->isLoopInvariant(PSE.getSCEV(CI->getOperand(i)), TheLoop)) { in canVectorizeInstrs()
1028 SE->getSCEV(V) == SE->getSCEV(InvariantAddress); in isInvariantAddressOfReduction()

123