class BoUpSLP
Declaration
class BoUpSLP { /* full declaration omitted */ };
Description
Bottom Up SLP Vectorizer.
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:526
Method Overview
- public BoUpSLP(llvm::Function * Func, llvm::ScalarEvolution * Se, llvm::TargetTransformInfo * Tti, llvm::TargetLibraryInfo * TLi, llvm::AliasAnalysis * Aa, llvm::LoopInfo * Li, llvm::DominatorTree * Dt, llvm::AssumptionCache * AC, llvm::DemandedBits * DB, const llvm::DataLayout * DL, llvm::OptimizationRemarkEmitter * ORE)
- public Optional<ArrayRef<unsigned int>> bestOrder() const
- public void buildTree(ArrayRef<llvm::Value *> Roots, ArrayRef<llvm::Value *> UserIgnoreLst = None)
- public void buildTree(ArrayRef<llvm::Value *> Roots, llvm::slpvectorizer::BoUpSLP::ExtraValueToDebugLocsMap & ExternallyUsedValues, ArrayRef<llvm::Value *> UserIgnoreLst = None)
- public unsigned int canMapToVector(llvm::Type * T, const llvm::DataLayout & DL) const
- public void computeMinimumValueSizes()
- public void deleteTree()
- public void eraseInstructions(ArrayRef<llvm::Value *> AV)
- public unsigned int getMaxVecRegSize() const
- public unsigned int getMinVecRegSize() const
- public llvm::OptimizationRemarkEmitter * getORE()
- public int getSpillCost() const
- public int getTreeCost()
- public unsigned int getTreeSize() const
- public unsigned int getVectorElementSize(llvm::Value * V) const
- public bool isDeleted(llvm::Instruction * I) const
- public bool isLoadCombineReductionCandidate(unsigned int ReductionOpcode) const
- public bool isTreeTinyAndNotFullyVectorizable() const
- public void optimizeGatherSequence()
- public llvm::Value * vectorizeTree()
- public llvm::Value * vectorizeTree(llvm::slpvectorizer::BoUpSLP::ExtraValueToDebugLocsMap & ExternallyUsedValues)
- public ~BoUpSLP()
Methods
¶BoUpSLP(llvm::Function* Func,
llvm::ScalarEvolution* Se,
llvm::TargetTransformInfo* Tti,
llvm::TargetLibraryInfo* TLi,
llvm::AliasAnalysis* Aa,
llvm::LoopInfo* Li,
llvm::DominatorTree* Dt,
llvm::AssumptionCache* AC,
llvm::DemandedBits* DB,
const llvm::DataLayout* DL,
llvm::OptimizationRemarkEmitter* ORE)
BoUpSLP(llvm::Function* Func,
llvm::ScalarEvolution* Se,
llvm::TargetTransformInfo* Tti,
llvm::TargetLibraryInfo* TLi,
llvm::AliasAnalysis* Aa,
llvm::LoopInfo* Li,
llvm::DominatorTree* Dt,
llvm::AssumptionCache* AC,
llvm::DemandedBits* DB,
const llvm::DataLayout* DL,
llvm::OptimizationRemarkEmitter* ORE)
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:538
Parameters
- llvm::Function* Func
- llvm::ScalarEvolution* Se
- llvm::TargetTransformInfo* Tti
- llvm::TargetLibraryInfo* TLi
- llvm::AliasAnalysis* Aa
- llvm::LoopInfo* Li
- llvm::DominatorTree* Dt
- llvm::AssumptionCache* AC
- llvm::DemandedBits* DB
- const llvm::DataLayout* DL
- llvm::OptimizationRemarkEmitter* ORE
¶Optional<ArrayRef<unsigned int>> bestOrder() const
Optional<ArrayRef<unsigned int>> bestOrder() const
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:613
Returns
The best order of instructions for vectorization.
¶void buildTree(
ArrayRef<llvm::Value*> Roots,
ArrayRef<llvm::Value*> UserIgnoreLst = None)
void buildTree(
ArrayRef<llvm::Value*> Roots,
ArrayRef<llvm::Value*> UserIgnoreLst = None)
Description
Construct a vectorizable tree that starts at \p Roots, ignoring users for the purpose of scheduling and extraction in the \p UserIgnoreLst.
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:581
Parameters
¶void buildTree(
ArrayRef<llvm::Value*> Roots,
llvm::slpvectorizer::BoUpSLP::
ExtraValueToDebugLocsMap&
ExternallyUsedValues,
ArrayRef<llvm::Value*> UserIgnoreLst = None)
void buildTree(
ArrayRef<llvm::Value*> Roots,
llvm::slpvectorizer::BoUpSLP::
ExtraValueToDebugLocsMap&
ExternallyUsedValues,
ArrayRef<llvm::Value*> UserIgnoreLst = None)
Description
Construct a vectorizable tree that starts at \p Roots, ignoring users for the purpose of scheduling and extraction in the \p UserIgnoreLst taking into account (and updating it, if required) list of externally used values stored in \p ExternallyUsedValues.
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:588
Parameters
- ArrayRef<llvm::Value*> Roots
- llvm::slpvectorizer::BoUpSLP:: ExtraValueToDebugLocsMap& ExternallyUsedValues
- ArrayRef<llvm::Value*> UserIgnoreLst = None
¶unsigned int canMapToVector(
llvm::Type* T,
const llvm::DataLayout& DL) const
unsigned int canMapToVector(
llvm::Type* T,
const llvm::DataLayout& DL) const
Description
Check if homogeneous aggregate is isomorphic to some VectorType. Accepts homogeneous multidimensional aggregate of scalars/vectors like {[4 x i16], [4 x i16]}, { < 2 x float>, < 2 x float> }, {{{i16, i16}, {i16, i16}}, {{i16, i16}, {i16, i16}}} and so on.
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:654
Parameters
- llvm::Type* T
- const llvm::DataLayout& DL
Returns
number of elements in vector if isomorphism exists, 0 otherwise.
¶void computeMinimumValueSizes()
void computeMinimumValueSizes()
Description
Compute the minimum type sizes required to represent the entries in a vectorizable tree.
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:636
¶void deleteTree()
void deleteTree()
Description
Clear the internal data structures that are created by 'buildTree'.
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:593
¶void eraseInstructions(ArrayRef<llvm::Value*> AV)
void eraseInstructions(ArrayRef<llvm::Value*> AV)
Description
Marks values operands for later deletion by replacing them with Undefs.
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:1372
Parameters
- ArrayRef<llvm::Value*> AV
¶unsigned int getMaxVecRegSize() const
unsigned int getMaxVecRegSize() const
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:639
¶unsigned int getMinVecRegSize() const
unsigned int getMinVecRegSize() const
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:644
¶llvm::OptimizationRemarkEmitter* getORE()
llvm::OptimizationRemarkEmitter* getORE()
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:669
¶int getSpillCost() const
int getSpillCost() const
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:573
Returns
the cost incurred by unwanted spills and fills, caused by holding live values over call sites.
¶int getTreeCost()
int getTreeCost()
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:577
Returns
the vectorization cost of the subtree that starts at \p VL. A negative number means that this is profitable.
¶unsigned int getTreeSize() const
unsigned int getTreeSize() const
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:607
¶unsigned int getVectorElementSize(
llvm::Value* V) const
unsigned int getVectorElementSize(
llvm::Value* V) const
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:632
Parameters
- llvm::Value* V
Returns
The vector element size in bits to use when vectorizing the expression tree ending at \p V. If V is a store, the size is the width of the stored value. Otherwise, the size is the width of the largest loaded value reaching V. This method is used by the vectorizer to calculate vectorization factors.
¶bool isDeleted(llvm::Instruction* I) const
bool isDeleted(llvm::Instruction* I) const
Description
Checks if the instruction is marked for deletion.
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:1369
Parameters
¶bool isLoadCombineReductionCandidate(
unsigned int ReductionOpcode) const
bool isLoadCombineReductionCandidate(
unsigned int ReductionOpcode) const
Description
Assume that a legal-sized 'or'-reduction of shifted/zexted loaded values can be load combined in the backend. Load combining may not be allowed in the IR optimizer, so we do not want to alter the pattern. For example, partially transforming a scalar bswap() pattern into vector code is effectively impossible for the backend to undo. TODO: If load combining is allowed in the IR optimizer, this analysis may not be necessary.
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:667
Parameters
- unsigned int ReductionOpcode
¶bool isTreeTinyAndNotFullyVectorizable() const
bool isTreeTinyAndNotFullyVectorizable() const
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:658
Returns
True if the VectorizableTree is both tiny and not fully vectorizable. We do not vectorize such trees.
¶void optimizeGatherSequence()
void optimizeGatherSequence()
Description
Perform LICM and CSE on the newly generated gather sequences.
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:610
¶llvm::Value* vectorizeTree()
llvm::Value* vectorizeTree()
Description
Vectorize the tree that starts with the elements in \p VL. Returns the vectorized root.
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:564
¶llvm::Value* vectorizeTree(
llvm::slpvectorizer::BoUpSLP::
ExtraValueToDebugLocsMap&
ExternallyUsedValues)
llvm::Value* vectorizeTree(
llvm::slpvectorizer::BoUpSLP::
ExtraValueToDebugLocsMap&
ExternallyUsedValues)
Description
Vectorize the tree but with the list of externally used values \p ExternallyUsedValues. Values in this MapVector can be replaced but the generated extractvalue instructions.
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:569
Parameters
- llvm::slpvectorizer::BoUpSLP:: ExtraValueToDebugLocsMap& ExternallyUsedValues
¶~BoUpSLP()
~BoUpSLP()
Declared at: llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp:1374