LLVM  9.0.0svn
Classes | Functions
llvm::LegalityPredicates Namespace Reference

Classes

struct  TypePairAndMemDesc
 

Functions

template<typename Predicate >
Predicate all (Predicate P0, Predicate P1)
 True iff P0 and P1 are true. More...
 
template<typename Predicate , typename... Args>
Predicate all (Predicate P0, Predicate P1, Args... args)
 True iff all given predicates are true. More...
 
LegalityPredicate typeIs (unsigned TypeIdx, LLT TypesInit)
 True iff the given type index is the specified types. More...
 
LegalityPredicate typeInSet (unsigned TypeIdx, std::initializer_list< LLT > TypesInit)
 True iff the given type index is one of the specified types. More...
 
LegalityPredicate typePairInSet (unsigned TypeIdx0, unsigned TypeIdx1, std::initializer_list< std::pair< LLT, LLT >> TypesInit)
 True iff the given types for the given pair of type indexes is one of the specified type pairs. More...
 
LegalityPredicate typePairAndMemDescInSet (unsigned TypeIdx0, unsigned TypeIdx1, unsigned MMOIdx, std::initializer_list< TypePairAndMemDesc > TypesAndMemDescInit)
 True iff the given types for the given pair of type indexes is one of the specified type pairs. More...
 
LegalityPredicate isScalar (unsigned TypeIdx)
 True iff the specified type index is a scalar. More...
 
LegalityPredicate isVector (unsigned TypeIdx)
 True iff the specified type index is a vector. More...
 
LegalityPredicate isPointer (unsigned TypeIdx)
 True iff the specified type index is a pointer (with any address space). More...
 
LegalityPredicate isPointer (unsigned TypeIdx, unsigned AddrSpace)
 True iff the specified type index is a pointer with the specified address space. More...
 
LegalityPredicate narrowerThan (unsigned TypeIdx, unsigned Size)
 True iff the specified type index is a scalar that's narrower than the given size. More...
 
LegalityPredicate widerThan (unsigned TypeIdx, unsigned Size)
 True iff the specified type index is a scalar that's wider than the given size. More...
 
LegalityPredicate scalarOrEltNarrowerThan (unsigned TypeIdx, unsigned Size)
 True iff the specified type index is a scalar or vector with an element type that's narrower than the given size. More...
 
LegalityPredicate scalarOrEltWiderThan (unsigned TypeIdx, unsigned Size)
 True iff the specified type index is a scalar or a vector with an element type that's wider than the given size. More...
 
LegalityPredicate sizeNotPow2 (unsigned TypeIdx)
 True iff the specified type index is a scalar whose size is not a power of. More...
 
LegalityPredicate scalarOrEltSizeNotPow2 (unsigned TypeIdx)
 True iff the specified type index is a scalar or vector whose element size is not a power of 2. More...
 
LegalityPredicate sameSize (unsigned TypeIdx0, unsigned TypeIdx1)
 True iff the specified type indices are both the same bit size. More...
 
LegalityPredicate memSizeInBytesNotPow2 (unsigned MMOIdx)
 True iff the specified MMO index has a size that is not a power of 2. More...
 
LegalityPredicate numElementsNotPow2 (unsigned TypeIdx)
 True iff the specified type index is a vector whose element count is not a power of 2. More...
 
LegalityPredicate atomicOrderingAtLeastOrStrongerThan (unsigned MMOIdx, AtomicOrdering Ordering)
 True iff the specified MMO index has at an atomic ordering of at Ordering or stronger. More...
 

Function Documentation

◆ all() [1/2]

template<typename Predicate >
Predicate llvm::LegalityPredicates::all ( Predicate  P0,
Predicate  P1 
)

◆ all() [2/2]

template<typename Predicate , typename... Args>
Predicate llvm::LegalityPredicates::all ( Predicate  P0,
Predicate  P1,
Args...  args 
)

◆ atomicOrderingAtLeastOrStrongerThan()

LegalityPredicate llvm::LegalityPredicates::atomicOrderingAtLeastOrStrongerThan ( unsigned  MMOIdx,
AtomicOrdering  Ordering 
)

True iff the specified MMO index has at an atomic ordering of at Ordering or stronger.

Definition at line 150 of file LegalityPredicates.cpp.

References llvm::isAtLeastOrStrongerThan().

Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), and all().

◆ isPointer() [1/2]

LegalityPredicate llvm::LegalityPredicates::isPointer ( unsigned  TypeIdx)

◆ isPointer() [2/2]

LegalityPredicate llvm::LegalityPredicates::isPointer ( unsigned  TypeIdx,
unsigned  AddrSpace 
)

True iff the specified type index is a pointer with the specified address space.

Definition at line 75 of file LegalityPredicates.cpp.

References llvm::LLT::getAddressSpace(), and llvm::LLT::isPointer().

Referenced by all().

◆ isScalar()

LegalityPredicate llvm::LegalityPredicates::isScalar ( unsigned  TypeIdx)

True iff the specified type index is a scalar.

Definition at line 57 of file LegalityPredicates.cpp.

Referenced by all(), llvm::MachineIRBuilder::buildBrCond(), llvm::MachineIRBuilder::buildInstr(), and llvm::LegalizeRuleSet::narrowScalar().

◆ isVector()

LegalityPredicate llvm::LegalityPredicates::isVector ( unsigned  TypeIdx)

◆ memSizeInBytesNotPow2()

LegalityPredicate llvm::LegalityPredicates::memSizeInBytesNotPow2 ( unsigned  MMOIdx)

True iff the specified MMO index has a size that is not a power of 2.

Definition at line 137 of file LegalityPredicates.cpp.

References llvm::isPowerOf2_32().

Referenced by all(), and llvm::LegalizeRuleSet::unsupportedIfMemSizeNotPow2().

◆ narrowerThan()

LegalityPredicate llvm::LegalityPredicates::narrowerThan ( unsigned  TypeIdx,
unsigned  Size 
)

True iff the specified type index is a scalar that's narrower than the given size.

Definition at line 83 of file LegalityPredicates.cpp.

References llvm::LLT::getSizeInBits(), llvm::LLT::isScalar(), and Size.

Referenced by all(), and llvm::LegalizeRuleSet::minScalar().

◆ numElementsNotPow2()

LegalityPredicate llvm::LegalityPredicates::numElementsNotPow2 ( unsigned  TypeIdx)

True iff the specified type index is a vector whose element count is not a power of 2.

Definition at line 143 of file LegalityPredicates.cpp.

References llvm::LLT::getNumElements(), llvm::isPowerOf2_32(), and llvm::LLT::isVector().

Referenced by all(), and llvm::LegalizeRuleSet::moreElementsToNextPow2().

◆ sameSize()

LegalityPredicate llvm::LegalityPredicates::sameSize ( unsigned  TypeIdx0,
unsigned  TypeIdx1 
)

True iff the specified type indices are both the same bit size.

Definition at line 129 of file LegalityPredicates.cpp.

Referenced by all(), and llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo().

◆ scalarOrEltNarrowerThan()

LegalityPredicate llvm::LegalityPredicates::scalarOrEltNarrowerThan ( unsigned  TypeIdx,
unsigned  Size 
)

True iff the specified type index is a scalar or vector with an element type that's narrower than the given size.

Definition at line 99 of file LegalityPredicates.cpp.

References llvm::LLT::getScalarSizeInBits(), and Size.

Referenced by all(), llvm::LegalizeRuleSet::minScalarOrElt(), and llvm::LegalizeRuleSet::minScalarOrEltIf().

◆ scalarOrEltSizeNotPow2()

LegalityPredicate llvm::LegalityPredicates::scalarOrEltSizeNotPow2 ( unsigned  TypeIdx)

True iff the specified type index is a scalar or vector whose element size is not a power of 2.

Definition at line 115 of file LegalityPredicates.cpp.

References llvm::LLT::getScalarSizeInBits(), and llvm::isPowerOf2_32().

Referenced by all(), and llvm::LegalizeRuleSet::widenScalarOrEltToNextPow2().

◆ scalarOrEltWiderThan()

LegalityPredicate llvm::LegalityPredicates::scalarOrEltWiderThan ( unsigned  TypeIdx,
unsigned  Size 
)

True iff the specified type index is a scalar or a vector with an element type that's wider than the given size.

Definition at line 107 of file LegalityPredicates.cpp.

References llvm::LLT::getScalarSizeInBits(), and Size.

Referenced by all(), and llvm::LegalizeRuleSet::maxScalarOrElt().

◆ sizeNotPow2()

LegalityPredicate llvm::LegalityPredicates::sizeNotPow2 ( unsigned  TypeIdx)

True iff the specified type index is a scalar whose size is not a power of.

Definition at line 122 of file LegalityPredicates.cpp.

References llvm::LLT::getSizeInBits(), llvm::isPowerOf2_32(), and llvm::LLT::isScalar().

Referenced by all(), and llvm::LegalizeRuleSet::widenScalarToNextPow2().

◆ typeInSet()

LegalityPredicate llvm::LegalityPredicates::typeInSet ( unsigned  TypeIdx,
std::initializer_list< LLT TypesInit 
)

True iff the given type index is one of the specified types.

Definition at line 23 of file LegalityPredicates.cpp.

References llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallVectorTemplateCommon< T >::end(), and llvm::find().

Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), and all().

◆ typeIs()

LegalityPredicate llvm::LegalityPredicates::typeIs ( unsigned  TypeIdx,
LLT  TypesInit 
)

True iff the given type index is the specified types.

Definition at line 17 of file LegalityPredicates.cpp.

Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), all(), and llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo().

◆ typePairAndMemDescInSet()

LegalityPredicate llvm::LegalityPredicates::typePairAndMemDescInSet ( unsigned  TypeIdx0,
unsigned  TypeIdx1,
unsigned  MMOIdx,
std::initializer_list< TypePairAndMemDesc TypesAndMemDescInit 
)

True iff the given types for the given pair of type indexes is one of the specified type pairs.

Definition at line 41 of file LegalityPredicates.cpp.

References llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::find_if(), and llvm::Match.

Referenced by all(), and llvm::LegalizeRuleSet::legalForTypesWithMemDesc().

◆ typePairInSet()

LegalityPredicate llvm::LegalityPredicates::typePairInSet ( unsigned  TypeIdx0,
unsigned  TypeIdx1,
std::initializer_list< std::pair< LLT, LLT >>  TypesInit 
)

True iff the given types for the given pair of type indexes is one of the specified type pairs.

Definition at line 31 of file LegalityPredicates.cpp.

References llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::find(), and llvm::Match.

Referenced by all().

◆ widerThan()

LegalityPredicate llvm::LegalityPredicates::widerThan ( unsigned  TypeIdx,
unsigned  Size 
)

True iff the specified type index is a scalar that's wider than the given size.

Definition at line 91 of file LegalityPredicates.cpp.

References llvm::LLT::getSizeInBits(), llvm::LLT::isScalar(), and Size.

Referenced by all(), llvm::LegalizeRuleSet::maxScalar(), and llvm::LegalizeRuleSet::maxScalarIf().