HomeSort by relevance Sort by last modified time
    Searched refs:SCEV (Results 1 - 25 of 36) sorted by null

1 2

  /external/llvm/include/llvm/Analysis/
ScalarEvolution.h 13 // SCEV class. Given this analysis, trip counts of loops and other important
51 class SCEV;
52 template<> struct FoldingSetTrait<SCEV>;
54 /// SCEV - This class represents an analyzed expression in the program. These
58 class SCEV : public FoldingSetNode {
59 friend struct FoldingSetTrait<SCEV>;
65 // The SCEV baseclass this node corresponds to
74 SCEV(const SCEV &) = delete;
75 void operator=(const SCEV &) = delete
    [all...]
DependenceAnalysis.h 52 class SCEV;
97 const SCEV *Distance; // NULL implies no distance available.
157 virtual const SCEV *getDistance(unsigned Level) const { return nullptr; }
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...]
ScalarEvolutionNormalization.h 47 class SCEV;
68 const SCEV *TransformForPostIncUse(TransformKind Kind,
69 const SCEV *S,
ScalarEvolutionExpressions.h 1 //===- llvm/Analysis/ScalarEvolutionExpressions.h - SCEV Exprs --*- C++ -*-===//
38 class SCEVConstant : public SCEV {
43 SCEV(ID, scConstant), V(v) {}
50 static inline bool classof(const SCEV *S) {
58 class SCEVCastExpr : public SCEV {
60 const SCEV *Op;
64 unsigned SCEVTy, const SCEV *op, Type *ty);
67 const SCEV *getOperand() const { return Op; }
71 static inline bool classof(const SCEV *S) {
86 const SCEV *op, Type *ty)
    [all...]
ScalarEvolutionExpander.h 1 //===---- llvm/Analysis/ScalarEvolutionExpander.h - SCEV Exprs --*- C++ -*-===//
29 bool isSafeToExpand(const SCEV *S, ScalarEvolution &SE);
45 std::map<std::pair<const SCEV *, Instruction *>, TrackingVH<Value> >
51 /// A memoization of the "relevant" loop for a given SCEV.
52 DenseMap<const SCEV *, const Loop *> RelevantLoops;
120 bool isHighCostExpansion(const SCEV *Expr, Loop *L) {
121 SmallPtrSet<const SCEV *, 8> Processed;
144 /// \brief Insert code to directly compute the specified SCEV expression
147 Value *expandCodeFor(const SCEV *SH, Type *Ty, Instruction *I);
200 bool isHighCostExpansionHelper(const SCEV *S, Loop *L
    [all...]
IVUsers.h 28 class SCEV;
144 /// reducible SCEV, recursively add its users to the IVUsesByStride set and
150 /// getReplacementExpr - Return a SCEV expression which computes the
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;
LoopAccessAnalysis.h 35 class SCEV;
359 SmallVector<const SCEV*, 2> Starts;
361 SmallVector<const SCEV*, 2> Ends;
490 ///\brief Return the SCEV corresponding to a pointer with the symbolic stride
496 const SCEV *replaceSymbolicStrideSCEV(ScalarEvolution *SE,
  /external/llvm/lib/Analysis/
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) {
95 const SCEV *O = X->getOperand();
96 const SCEV *N = TransformSubExpr(O, User, OperandValToReplace)
    [all...]
ScalarEvolution.cpp 15 // scalar expressions, which are represented as subclasses of the SCEV class.
17 // can handle. We only create one SCEV of a particular shape, so
20 // One important aspect of the SCEV objects is that they are never cyclic, even
107 cl::desc("Maximum number of iterations SCEV will "
114 VerifySCEV("verify-scev",
128 // SCEV class definitions
132 // Implementation of the SCEV class.
136 void SCEV::dump() const {
142 void SCEV::print(raw_ostream &OS) const {
149 const SCEV *Op = Trunc->getOperand()
    [all...]
DependenceAnalysis.cpp 29 // analysis is using SCEV->delinearize to recover the representation of multiple
35 // Subtract, or Multiply, with both APInt's and SCEV's.
41 // Finally, it seems like certain test cases expose weaknesses in the SCEV
249 const SCEV *FullDependence::getDistance(unsigned Level) const {
292 const SCEV *DependenceAnalysis::Constraint::getX() const {
300 const SCEV *DependenceAnalysis::Constraint::getY() const {
308 const SCEV *DependenceAnalysis::Constraint::getA() const {
317 const SCEV *DependenceAnalysis::Constraint::getB() const {
326 const SCEV *DependenceAnalysis::Constraint::getC() const {
335 const SCEV *DependenceAnalysis::Constraint::getD() const
    [all...]
ScalarEvolutionAliasAnalysis.cpp 1 //===- ScalarEvolutionAliasAnalysis.cpp - SCEV-based Alias Analysis -------===//
58 Value *GetBaseValue(const SCEV *S);
64 INITIALIZE_AG_PASS_BEGIN(ScalarEvolutionAliasAnalysis, AliasAnalysis, "scev-aa",
67 INITIALIZE_AG_PASS_END(ScalarEvolutionAliasAnalysis, AliasAnalysis, "scev-aa",
91 ScalarEvolutionAliasAnalysis::GetBaseValue(const SCEV *S) {
98 const SCEV *Last = A->getOperand(A->getNumOperands()-1);
119 const SCEV *AS = SE->getSCEV(const_cast<Value *>(LocA.Ptr));
120 const SCEV *BS = SE->getSCEV(const_cast<Value *>(LocB.Ptr));
134 const SCEV *BA = SE->getMinusSCEV(BS, AS);
148 const SCEV *AB = SE->getMinusSCEV(AS, BS)
    [all...]
ScalarEvolutionExpander.cpp 209 static bool FactorOutConstant(const SCEV *&S, const SCEV *&Remainder,
210 const SCEV *Factor, ScalarEvolution &SE,
237 const SCEV *Div = SE.getConstant(CI);
256 SmallVector<const SCEV *, 4> NewMulOps(M->op_begin(), M->op_end());
266 const SCEV *Step = A->getStepRecurrence(SE);
267 const SCEV *StepRem = SE.getConstant(Step->getType(), 0);
272 const SCEV *Start = A->getStart();
276 A->getNoWrapFlags(SCEV::FlagNW));
287 static void SimplifyAddOperands(SmallVectorImpl<const SCEV *> &Ops
    [all...]
IVUsers.cpp 50 static bool isInteresting(const SCEV *S, const Instruction *I, const Loop *L,
62 // do effective SCEV expansions for addrecs with interesting steps.
113 /// reducible SCEV, recursively add its users to the IVUsesByStride set and
127 // IVUsers is used by LSR which assumes that all SCEV expressions are safe to
141 const SCEV *ISE = SE->getSCEV(I);
181 << " OF SCEV: " << *ISE << '\n');
186 << " OF SCEV: " << *ISE << '\n');
196 const SCEV *OriginalISE = ISE;
207 const SCEV *DenormalizedISE =
310 /// getReplacementExpr - Return a SCEV expression which computes th
    [all...]
LoopAccessAnalysis.cpp 83 const SCEV *llvm::replaceSymbolicStrideSCEV(ScalarEvolution *SE,
87 const SCEV *OrigSCEV = SE->getSCEV(Ptr);
89 // If there is an entry in the map return the SCEV of the pointer with the
104 const SCEV *ByOne =
106 DEBUG(dbgs() << "LAA: Replacing SCEV: " << *OrigSCEV << " by: " << *ByOne
111 // Otherwise, just return the SCEV of the original pointer.
118 // Get the stride replaced scev.
119 const SCEV *Sc = replaceSymbolicStrideSCEV(SE, Strides, Ptr);
122 const SCEV *Ex = SE->getBackedgeTakenCount(Lp);
123 const SCEV *ScEnd = AR->evaluateAtIteration(Ex, *SE)
    [all...]
Delinearization.cpp 11 // instructions in all loops using the SCEV analysis functionality. This pass is
97 const SCEV *AccessFn = SE->getSCEVAtScope(getPointerOperand(*Inst), L);
117 SmallVector<const SCEV *, 3> Subscripts, Sizes;
  /external/llvm/lib/Transforms/Scalar/
AlignmentFromAssumptions.cpp 75 bool extractAlignmentInfo(CallInst *I, Value *&AAPtr, const SCEV *&AlignSCEV,
76 const SCEV *&OffSCEV);
98 // to a constant. Using SCEV to compute alignment handles the case where
101 static unsigned getNewAlignmentDiff(const SCEV *DiffSCEV,
102 const SCEV *AlignSCEV,
105 const SCEV *DiffAlignDiv = SE->getUDivExpr(DiffSCEV, AlignSCEV);
106 const SCEV *DiffAlign = SE->getMulExpr(DiffAlignDiv, AlignSCEV);
107 const SCEV *DiffUnitsSCEV = SE->getMinusSCEV(DiffAlign, DiffSCEV);
136 static unsigned getNewAlignment(const SCEV *AASCEV, const SCEV *AlignSCEV
    [all...]
LoopStrengthReduce.cpp 29 // The SCEV for %i is {0,+,1}<%L>. The SCEV for %i.next is {1,+,1}<%L>, however
136 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
    [all...]
InductiveRangeCheckElimination.cpp 119 const SCEV *Offset;
120 const SCEV *Scale;
131 const SCEV *&Index, Value *&UpperLimit);
137 const SCEV *getOffset() const { return Offset; }
138 const SCEV *getScale() const { return Scale; }
170 const SCEV *Begin;
171 const SCEV *End;
174 Range(const SCEV *Begin, const SCEV *End) : Begin(Begin), End(End) {
179 const SCEV *getBegin() const { return Begin;
    [all...]
NaryReassociate.cpp 40 // an expression is computed before, we store each instruction seen and its SCEV
41 // into an SCEV-to-instruction map.
128 Instruction *tryReassociatedAdd(const SCEV *LHS, Value *RHS, Instruction *I);
133 // A lookup table quickly telling which instructions compute the given SCEV.
135 // computing to the same SCEV, so we map a SCEV to an instruction list. For
142 DenseMap<const SCEV *, SmallVector<Instruction *, 2>> SeenExprs;
217 const SCEV *AExpr = SE->getSCEV(A), *BExpr = SE->getSCEV(B);
218 const SCEV *RHSExpr = SE->getSCEV(RHS);
227 Instruction *NaryReassociate::tryReassociatedAdd(const SCEV *LHSExpr
    [all...]
StraightLineStrengthReduce.cpp 92 Candidate(Kind CT, const SCEV *B, ConstantInt *Idx, Value *S,
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,
323 Candidate::Kind CT, const SCEV *B, ConstantInt *Idx, Value *S,
440 const SCEV *B, ConstantInt *Idx, Value *S, uint64_t ElementSize,
453 const SCEV *Base,
462 // One alternative is matching the SCEV of ArrayIdx instead of ArrayId
    [all...]
IndVarSimplify.cpp 62 // implement a strong expression equivalence checker in SCEV. Until then, we
117 Value *LinearFunctionTestReplace(Loop *L, const SCEV *BackedgeTakenCount,
139 /// isValidRewrite - Return true if the SCEV expansion generated by the
140 /// rewriter can replace the original value. SCEV guarantees that it
144 // If an SCEV expression subsumed multiple pointers, its expansion could
148 // could fail in a dangerous way. Ultimately, SCEV will be improved to avoid
153 // because it understands lcssa phis while SCEV does not.
167 // SCEV may have rewritten an expression that produces the GEP's pointer
170 // base of a recurrence. This handles the case in which SCEV expansion
178 const SCEV *FromBase = SE->getPointerBase(SE->getSCEV(FromPtr))
    [all...]
LoopIdiomRecognize.cpp 148 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);
565 // step 5: Forget the "non-computable" trip-count SCEV associated with the
613 const SCEV *BECount = SE->getBackedgeTakenCount(CurLoop);
684 bool LoopIdiomRecognize::runOnLoopBlock(BasicBlock *BB, const SCEV *BECount,
728 bool LoopIdiomRecognize::processLoopStore(StoreInst *SI, const SCEV *BECount) {
788 processLoopMemSet(MemSetInst *MSI, const SCEV *BECount)
    [all...]
  /external/llvm/lib/Transforms/Utils/
SimplifyIndVar.cpp 46 /// other loop passes that preserve SCEV.
94 const SCEV *FoldedExpr = nullptr;
132 // Bypass the operand if SCEV can prove it has no effect.
140 assert(SE->getSCEV(UseInst) == FoldedExpr && "bad SCEV with folded oper");
162 const SCEV *S = SE->getSCEV(ICmp->getOperand(IVOperIdx));
163 const SCEV *X = SE->getSCEV(ICmp->getOperand(1 - IVOperIdx));
196 const SCEV *S = SE->getSCEV(Rem->getOperand(0));
197 const SCEV *X = SE->getSCEV(Rem->getOperand(1));
211 const SCEV *LessOne =
253 // Eliminate any operation that SCEV can prove is an identity function
    [all...]
  /external/llvm/unittests/Analysis/
ScalarEvolutionTest.cpp 29 // Manually clean up, since we allocated new SCEV objects after the
56 const SCEV *S0 = SE.getSCEV(V0);
57 const SCEV *S1 = SE.getSCEV(V1);
58 const SCEV *S2 = SE.getSCEV(V2);
60 const SCEV *P0 = SE.getAddExpr(S0, S0);
61 const SCEV *P1 = SE.getAddExpr(S1, S1);
62 const SCEV *P2 = SE.getAddExpr(S2, S2);
109 SmallVector<const SCEV *, 5> A;
115 const SCEV *A_rec = SE.getAddRecExpr(A, &L, SCEV::FlagAnyWrap)
    [all...]
  /external/llvm/lib/Target/PowerPC/
PPCLoopPreIncPrep.cpp 104 struct SCEVLess : std::binary_function<const SCEV *, const SCEV *, bool>
108 bool operator() (const SCEV *X, const SCEV *Y) const {
109 const SCEV *Diff = SE->getMinusSCEV(X, Y);
172 typedef std::multimap<const SCEV *, Instruction *, SCEVLess> Bucket;
206 const SCEV *LSCEV = SE->getSCEVAtScope(PtrValue, L);
218 const SCEV *Diff = SE->getMinusSCEV(K->first, LSCEV);
273 const SCEV *BasePtrStartSCEV = BasePtrSCEV->getStart();

Completed in 1142 milliseconds

1 2