25 std::initializer_list<LLT> TypesInit) {
33 unsigned TypeIdx0,
unsigned TypeIdx1,
34 std::initializer_list<std::pair<LLT, LLT>> TypesInit) {
37 std::pair<LLT, LLT>
Match = {
Query.Types[TypeIdx0],
Query.Types[TypeIdx1]};
43 unsigned TypeIdx0,
unsigned TypeIdx1,
unsigned MMOIdx,
44 std::initializer_list<TypePairAndMemSize> TypesAndMemSizeInit) {
48 Query.MMODescrs[MMOIdx].SizeInBits};
50 TypesAndMemSize.
end();
56 return Query.Types[TypeIdx].isScalar();
63 const LLT &QueryTy =
Query.Types[TypeIdx];
71 const LLT &QueryTy =
Query.Types[TypeIdx];
78 const LLT &QueryTy =
Query.Types[TypeIdx];
91 const LLT &QueryTy =
Query.Types[TypeIdx];
This class represents lattice values for constants.
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...
The LegalityQuery object bundles together all the information that's needed to decide whether a given...
LegalityPredicate typeIs(unsigned TypeIdx, LLT TypesInit)
True iff the given type index is the specified types.
LegalityPredicate atomicOrderingAtLeastOrStrongerThan(unsigned MMOIdx, AtomicOrdering Ordering)
True iff the specified MMO index has at an atomic ordering of at Ordering or stronger.
AtomicOrdering
Atomic ordering for LLVM's memory model.
LegalityPredicate typePairAndMemSizeInSet(unsigned TypeIdx0, unsigned TypeIdx1, unsigned MMOIdx, std::initializer_list< TypePairAndMemSize > TypesAndMemSizeInit)
True iff the given types for the given pair of type indexes is one of the specified type pairs...
LegalityPredicate numElementsNotPow2(unsigned TypeIdx)
True iff the specified type index is a vector whose element count is not a power of 2...
bool isAtLeastOrStrongerThan(AtomicOrdering ao, AtomicOrdering other)
constexpr bool isPowerOf2_32(uint32_t Value)
Return true if the argument is a power of two > 0.
The instances of the Type class are immutable: once they are created, they are never changed...
LegalityPredicate narrowerThan(unsigned TypeIdx, unsigned Size)
True iff the specified type index is a scalar that's narrower than the given size.
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator begin()
LegalityPredicate memSizeInBytesNotPow2(unsigned MMOIdx)
True iff the specified MMO index has a size that is not a power of 2.
auto find(R &&Range, const T &Val) -> decltype(adl_begin(Range))
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
unsigned getSizeInBits() const
Returns the total size of the type. Must only be called on sized types.
LegalityPredicate isScalar(unsigned TypeIdx)
True iff the specified type index is a scalar.
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator end()
LegalityPredicate typeInSet(unsigned TypeIdx, std::initializer_list< LLT > TypesInit)
True iff the given type index is one of the specified types.
static void Query(const MachineInstr &MI, AliasAnalysis &AA, bool &Read, bool &Write, bool &Effects, bool &StackPointer)
uint16_t getNumElements() const
Returns the number of elements in a vector LLT.
std::function< bool(const LegalityQuery &)> LegalityPredicate
LegalityPredicate sizeNotPow2(unsigned TypeIdx)
True iff the specified type index is a scalar whose size is not a power of.
LegalityPredicate widerThan(unsigned TypeIdx, unsigned Size)
True iff the specified type index is a scalar that's wider than the given size.