16#ifndef LLVM_ANALYSIS_DELINEARIZATION_H
17#define LLVM_ANALYSIS_DELINEARIZATION_H
23template <
typename T>
class SmallVectorImpl;
24class GetElementPtrInst;
33 SmallVectorImpl<const SCEV *> &Terms,
34 SmallVectorImpl<const SCEV *> &Sizes,
35 const SCEV *ElementSize);
40 SmallVectorImpl<const SCEV *> &Terms);
45 SmallVectorImpl<const SCEV *> &Subscripts,
46 SmallVectorImpl<const SCEV *> &Sizes);
111void delinearize(ScalarEvolution &SE,
const SCEV *Expr,
112 SmallVectorImpl<const SCEV *> &Subscripts,
113 SmallVectorImpl<const SCEV *> &Sizes,
const SCEV *ElementSize);
118 SmallVectorImpl<uint64_t> &Sizes,
119 const SCEV *ElementSize);
140 SmallVectorImpl<const SCEV *> &Subscripts,
141 SmallVectorImpl<const SCEV *> &Sizes,
142 const SCEV *ElementSize);
154 const GetElementPtrInst *
GEP,
155 SmallVectorImpl<const SCEV *> &Subscripts,
156 SmallVectorImpl<int> &Sizes);
165 const SCEV *AccessFn,
166 SmallVectorImpl<const SCEV *> &Subscripts,
167 SmallVectorImpl<int> &Sizes);
This header defines various interfaces for pass management in LLVM.
A container for analyses that lazily runs them and caches their results.
A set of analyses that are preserved following a run of a transformation pass.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
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...
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)...
bool delinearizeFixedSizeArray(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 acces...
bool getIndexExpressionsFromGEP(ScalarEvolution &SE, const GetElementPtrInst *GEP, SmallVectorImpl< const SCEV * > &Subscripts, SmallVectorImpl< int > &Sizes)
Gathers the individual index expressions from a GEP instruction.
bool tryDelinearizeFixedSizeImpl(ScalarEvolution *SE, Instruction *Inst, const SCEV *AccessFn, SmallVectorImpl< const SCEV * > &Subscripts, SmallVectorImpl< int > &Sizes)
Implementation of fixed size array delinearization.
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...
bool findFixedSizeArrayDimensions(ScalarEvolution &SE, const SCEV *Expr, SmallVectorImpl< uint64_t > &Sizes, const SCEV *ElementSize)
Compute the dimensions of fixed size array from \Expr and save the results in Sizes.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
A CRTP mix-in to automatically provide informational APIs needed for passes.