Go to the documentation of this file.
16 #ifndef LLVM_ANALYSIS_DELINEARIZATION_H
17 #define LLVM_ANALYSIS_DELINEARIZATION_H
23 template <
typename T>
class SmallVectorImpl;
24 class GetElementPtrInst;
25 class ScalarEvolution;
32 SmallVectorImpl<const SCEV *> &Terms,
33 SmallVectorImpl<const SCEV *> &Sizes,
34 const SCEV *ElementSize);
39 SmallVectorImpl<const SCEV *> &Terms);
44 SmallVectorImpl<const SCEV *> &Subscripts,
45 SmallVectorImpl<const SCEV *> &Sizes);
110 void delinearize(ScalarEvolution &SE,
const SCEV *Expr,
111 SmallVectorImpl<const SCEV *> &Subscripts,
112 SmallVectorImpl<const SCEV *> &Sizes,
const SCEV *ElementSize);
124 const GetElementPtrInst *
GEP,
125 SmallVectorImpl<const SCEV *> &Subscripts,
126 SmallVectorImpl<int> &Sizes);
135 const SCEV *AccessFn,
136 SmallVectorImpl<const SCEV *> &Subscripts,
137 SmallVectorImpl<int> &Sizes);
149 #endif // LLVM_ANALYSIS_DELINEARIZATION_H
A set of analyses that are preserved following a run of a transformation pass.
This is an optimization pass for GlobalISel generic memory operations.
A CRTP mix-in to automatically provide informational APIs needed for passes.
bool tryDelinearizeFixedSizeImpl(ScalarEvolution *SE, Instruction *Inst, const SCEV *AccessFn, SmallVectorImpl< const SCEV * > &Subscripts, SmallVectorImpl< int > &Sizes)
Implementation of fixed size array delinearization.
This class implements an extremely fast bulk output stream that can only output to a stream.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
void collectParametricTerms(ScalarEvolution &SE, const SCEV *Expr, SmallVectorImpl< const SCEV * > &Terms)
Collect parametric terms occurring in step expressions (first step of delinearization).
void findArrayDimensions(ScalarEvolution &SE, SmallVectorImpl< const SCEV * > &Terms, SmallVectorImpl< const SCEV * > &Sizes, const SCEV *ElementSize)
Compute the array dimensions Sizes from the set of Terms extracted from the memory access function of...
bool getIndexExpressionsFromGEP(ScalarEvolution &SE, const GetElementPtrInst *GEP, SmallVectorImpl< const SCEV * > &Subscripts, SmallVectorImpl< int > &Sizes)
Gathers the individual index expressions from a GEP instruction.
void delinearize(ScalarEvolution &SE, const SCEV *Expr, SmallVectorImpl< const SCEV * > &Subscripts, SmallVectorImpl< const SCEV * > &Sizes, const SCEV *ElementSize)
Split this SCEVAddRecExpr into two vectors of SCEVs representing the subscripts and sizes of an array...
void computeAccessFunctions(ScalarEvolution &SE, const SCEV *Expr, SmallVectorImpl< const SCEV * > &Subscripts, SmallVectorImpl< const SCEV * > &Sizes)
Return in Subscripts the access functions for each dimension in Sizes (third step of delinearization)...
A container for analyses that lazily runs them and caches their results.
DelinearizationPrinterPass(raw_ostream &OS)