|
LLVM 23.0.0git
|
A private "module" namespace for types and utilities used by this pass. More...
Classes | |
| class | BoUpSLP |
| Bottom Up SLP Vectorizer. More... | |
Functions | |
| bool | isConstant (Value *V) |
| bool | isVectorLikeInstWithConstOps (Value *V) |
Checks if V is one of vector-like instructions, i.e. | |
| unsigned | getNumElements (Type *Ty) |
| unsigned | getPartNumElems (unsigned Size, unsigned NumParts) |
Returns power-of-2 number of elements in a single register (part), given the total number of elements Size and number of registers (parts) NumParts. | |
| unsigned | getNumElems (unsigned Size, unsigned PartNumElems, unsigned Part) |
Returns correct remaining number of elements, considering total amount Size, (power-of-2 number) of elements in a single register PartNumElems and current register (part) Part. | |
| bool | allSameBlock (ArrayRef< Value * > VL) |
| bool | allConstant (ArrayRef< Value * > VL) |
| bool | isSplat (ArrayRef< Value * > VL) |
| bool | allSameOpcode (ArrayRef< Value * > VL) |
| std::optional< unsigned > | getExtractIndex (const Instruction *E) |
| bool | allSameType (ArrayRef< Value * > VL) |
| template<typename T> | |
| std::optional< unsigned > | getInsertExtractIndex (const Value *Inst, unsigned Offset) |
| template std::optional< unsigned > | getInsertExtractIndex< InsertElementInst > (const Value *, unsigned) |
| template std::optional< unsigned > | getInsertExtractIndex< ExtractElementInst > (const Value *, unsigned) |
A private "module" namespace for types and utilities used by this pass.
These are implementation details and should not be used by clients.
VL are constants (but not globals/constant expressions). Definition at line 84 of file SLPUtils.cpp.
References llvm::all_of(), and isConstant().
Referenced by slpvectorizer::BoUpSLP::getReorderingData(), slpvectorizer::BoUpSLP::getSpillCost(), slpvectorizer::BoUpSLP::isTreeNotExtendable(), and slpvectorizer::BoUpSLP::isTreeTinyAndNotFullyVectorizable().
VL are in the same block. Definition at line 62 of file SLPUtils.cpp.
References llvm::all_of(), llvm::cast(), llvm::dyn_cast(), llvm::ArrayRef< T >::end(), llvm::find_if(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), II, llvm::isa(), llvm::IsaPred, isVectorLikeInstWithConstOps(), and llvm::iterator_range().
Referenced by checkEVsForVecCalls(), slpvectorizer::BoUpSLP::isTreeNotExtendable(), and slpvectorizer::BoUpSLP::isTreeTinyAndNotFullyVectorizable().
VL use the same opcode. For comparison instructions, also checks if predicates match. PoisonValues are considered matching. Interchangeable instructions are not considered. Definition at line 105 of file SLPUtils.cpp.
References llvm::CmpInst::BAD_ICMP_PREDICATE, llvm::cast(), llvm::ArrayRef< T >::end(), llvm::find_if(), llvm::Instruction::getOpcode(), llvm::isa(), and llvm::IsaPred.
Referenced by getSameOpcode().
VL has the same Type as the first. Definition at line 147 of file SLPUtils.cpp.
References llvm::all_of(), and llvm::ArrayRef< T >::consume_front().
Referenced by slpvectorizer::BoUpSLP::buildTree(), slpvectorizer::BoUpSLP::buildTree(), and slpvectorizer::BoUpSLP::getReorderingData().
| std::optional< unsigned > llvm::slpvectorizer::getExtractIndex | ( | const Instruction * | E | ) |
Definition at line 123 of file SLPUtils.cpp.
References assert(), llvm::cast(), llvm::dyn_cast(), and getNumElements().
Referenced by slpvectorizer::BoUpSLP::getReorderingData().
| std::optional< unsigned > llvm::slpvectorizer::getInsertExtractIndex | ( | const Value * | Inst, |
| unsigned | Offset ) |
Offset as base offset for index. Only instantiated for InsertElementInst and ExtractElementInst (see SLPUtils.cpp). Definition at line 153 of file SLPUtils.cpp.
References llvm::dyn_cast(), and llvm::Offset.
Referenced by getElementIndex().
| template std::optional< unsigned > llvm::slpvectorizer::getInsertExtractIndex< ExtractElementInst > | ( | const Value * | , |
| unsigned | ) |
| template std::optional< unsigned > llvm::slpvectorizer::getInsertExtractIndex< InsertElementInst > | ( | const Value * | , |
| unsigned | ) |
Definition at line 46 of file SLPUtils.cpp.
References assert(), llvm::details::FixedOrScalableQuantity< LeafTy, ValueTy >::getFixedValue(), llvm::getVectorizedTypeVF(), llvm::isa(), and llvm::isVectorizedTy().
Referenced by slpvectorizer::BoUpSLP::analyzeRtStrideCandidate(), getAltInstrMask(), getExtractIndex(), getExtractWithExtendCost(), getNumberOfParts(), getVectorCallCosts(), getWidenedType(), and slpvectorizer::BoUpSLP::vectorizeTree().
Returns correct remaining number of elements, considering total amount Size, (power-of-2 number) of elements in a single register PartNumElems and current register (part) Part.
Definition at line 58 of file SLPUtils.cpp.
References Size.
Referenced by slpvectorizer::BoUpSLP::findReusedOrderedScalars(), and slpvectorizer::BoUpSLP::processBuildVector().
Returns power-of-2 number of elements in a single register (part), given the total number of elements Size and number of registers (parts) NumParts.
Definition at line 54 of file SLPUtils.cpp.
References llvm::bit_ceil(), llvm::divideCeil(), and Size.
Referenced by slpvectorizer::BoUpSLP::ShuffleCostEstimator::add(), slpvectorizer::BoUpSLP::ShuffleCostEstimator::add(), slpvectorizer::BoUpSLP::findReusedOrderedScalars(), and slpvectorizer::BoUpSLP::processBuildVector().
Definition at line 25 of file SLPUtils.cpp.
References llvm::isa().
Referenced by allConstant(), areCompatibleCmpOps(), arePointersCompatible(), slpvectorizer::BoUpSLP::findReusedOrderedScalars(), and isVectorLikeInstWithConstOps().
VL are identical or some of them are UndefValue. Definition at line 90 of file SLPUtils.cpp.
References llvm::isa().
Referenced by llvm::DOTGraphTraits< BoUpSLP * >::getNodeLabel(), and slpvectorizer::BoUpSLP::getReorderingData().
Checks if V is one of vector-like instructions, i.e.
undef, insertelement/extractelement with constant indices for fixed vector type or extractvalue instruction.
Definition at line 29 of file SLPUtils.cpp.
References assert(), llvm::dyn_cast(), I, llvm::isa(), and isConstant().
Referenced by allSameBlock(), generateKeySubkey(), getSameOpcode(), and tryToFindDuplicates().