14#ifndef LLVM_LIB_TRANSFORMS_VECTORIZE_SLPVECTORIZER_SLPMEMORYUTILS_H
15#define LLVM_LIB_TRANSFORMS_VECTORIZE_SLPVECTORIZER_SLPMEMORYUTILS_H
40 const TargetLibraryInfo &TLI,
unsigned MaxDepth,
41 bool CompareOpcodes =
true);
58 const DataLayout &
DL, ScalarEvolution &SE,
59 SmallVectorImpl<unsigned> &SortedIndices);
65 ArrayRef<unsigned> Order,
const TargetTransformInfo &
TTI,
66 const DataLayout &
DL, ScalarEvolution &SE, AssumptionCache &AC,
67 const DominatorTree &DT,
const TargetLibraryInfo &TLI,
69 const function_ref<
bool(
Value *)> AreAllUsersVectorized,
bool ReVec,
70 bool &IsMasked,
unsigned &InterleaveFactor,
71 SmallVectorImpl<int> &CompressMask, VectorType *&LoadVecTy);
77 ArrayRef<unsigned> Order,
const TargetTransformInfo &
TTI,
78 const DataLayout &
DL, ScalarEvolution &SE, AssumptionCache &AC,
79 const DominatorTree &DT,
const TargetLibraryInfo &TLI,
81 const function_ref<
bool(
Value *)> AreAllUsersVectorized,
bool ReVec);
88 ArrayRef<unsigned> Order,
89 const TargetTransformInfo &
TTI,
const DataLayout &
DL,
90 ScalarEvolution &SE, Align CommonAlignment,
91 SmallVectorImpl<int> &ReuseShuffleIndices,
92 FixedVectorType *&StoreVecTy);
98 Type *ElemTy,
const DataLayout &
DL,
99 ScalarEvolution &SE,
unsigned MaxDepth,
100 SmallVectorImpl<unsigned> &SortedIndices);
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static cl::opt< OutputCostKind > CostKind("cost-kind", cl::desc("Target cost kind"), cl::init(OutputCostKind::RecipThroughput), cl::values(clEnumValN(OutputCostKind::RecipThroughput, "throughput", "Reciprocal throughput"), clEnumValN(OutputCostKind::Latency, "latency", "Instruction latency"), clEnumValN(OutputCostKind::CodeSize, "code-size", "Code size"), clEnumValN(OutputCostKind::SizeAndLatency, "size-latency", "Code size and latency"), clEnumValN(OutputCostKind::All, "all", "Print all cost kinds")))
A cache of @llvm.assume calls within a function.
LLVM Basic Block Representation.
A parsed version of the target data layout string in and methods for querying it.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
Class to represent fixed width SIMD vectors.
This class represents an analyzed expression in the program.
The main scalar evolution driver.
Provides information about what library functions are available for the current target.
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
Base class of all SIMD vector types.
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
A private "module" namespace for types and utilities used by this pass.
Align computeCommonAlignment(ArrayRef< Value * > VL)
Calculates minimal alignment as a common alignment.
const SCEV * calculateRtStride(ArrayRef< Value * > PointerOps, Type *ElemTy, const DataLayout &DL, ScalarEvolution &SE, SmallVectorImpl< unsigned > &SortedIndices)
Checks if the provided list of pointers Pointers represents the strided pointers for type ElemTy.
bool isMaskedStoreCompress(ArrayRef< Value * > VL, ArrayRef< Value * > PointerOps, ArrayRef< unsigned > Order, const TargetTransformInfo &TTI, const DataLayout &DL, ScalarEvolution &SE, Align CommonAlignment, SmallVectorImpl< int > &ReuseShuffleIndices, FixedVectorType *&StoreVecTy)
Checks if the stores VL with pointers PointerOps can be lowered as a single masked store.
bool isMaskedLoadCompress(ArrayRef< Value * > VL, ArrayRef< Value * > PointerOps, ArrayRef< unsigned > Order, const TargetTransformInfo &TTI, const DataLayout &DL, ScalarEvolution &SE, AssumptionCache &AC, const DominatorTree &DT, const TargetLibraryInfo &TLI, const TargetTransformInfo::TargetCostKind CostKind, const function_ref< bool(Value *)> AreAllUsersVectorized, bool ReVec, bool &IsMasked, unsigned &InterleaveFactor, SmallVectorImpl< int > &CompressMask, VectorType *&LoadVecTy)
Checks if the VL can be transformed to a (masked)load + compress or (masked) interleaved load.
bool arePointersCompatible(Value *Ptr1, Value *Ptr2, const TargetLibraryInfo &TLI, unsigned MaxDepth, bool CompareOpcodes)
MaxDepth is the recursion limit for getUnderlyingObject.
bool clusterSortPtrAccesses(ArrayRef< Value * > VL, ArrayRef< BasicBlock * > BBs, Type *ElemTy, const DataLayout &DL, ScalarEvolution &SE, unsigned MaxDepth, SmallVectorImpl< unsigned > &SortedIndices)
Clusters VL pointers by (basic block, underlying object) pair and sorts each cluster by offset.
This is an optimization pass for GlobalISel generic memory operations.
RelativeUniformCounterPtr ValuesPtrExpr VTableAddr Value
ArrayRef(const T &OneElt) -> ArrayRef< T >