|
LLVM 24.0.0git
|
#include "llvm/CodeGen/GlobalISel/LegalizerInfo.h"
Public Member Functions | |
| LegalizeRuleSet ()=default | |
| bool | isAliasedByAnother () |
| void | setIsAliasedByAnother () |
| void | aliasTo (unsigned Opcode) |
| unsigned | getAlias () const |
| unsigned | immIdx (unsigned ImmIdx) |
| LegalizeRuleSet & | legalIf (LegalityPredicate Predicate) |
| The instruction is legal if predicate is true. | |
| LegalizeRuleSet & | legalFor (std::initializer_list< LLT > Types) |
| The instruction is legal when type index 0 is any type in the given list. | |
| LegalizeRuleSet & | legalFor (bool Pred, std::initializer_list< LLT > Types) |
| LegalizeRuleSet & | legalFor (std::initializer_list< std::pair< LLT, LLT > > Types) |
| The instruction is legal when type indexes 0 and 1 is any type pair in the given list. | |
| LegalizeRuleSet & | legalFor (bool Pred, std::initializer_list< std::pair< LLT, LLT > > Types) |
| LegalizeRuleSet & | legalFor (bool Pred, std::initializer_list< std::tuple< LLT, LLT, LLT > > Types) |
| LegalizeRuleSet & | legalForTypeWithAnyImm (std::initializer_list< LLT > Types) |
| The instruction is legal when type index 0 is any type in the given list and imm index 0 is anything. | |
| LegalizeRuleSet & | legalForTypeWithAnyImm (std::initializer_list< std::pair< LLT, LLT > > Types) |
| LegalizeRuleSet & | legalForTypesWithMemDesc (std::initializer_list< LegalityPredicates::TypePairAndMemDesc > TypesAndMemDesc) |
| The instruction is legal when type indexes 0 and 1 along with the memory size and minimum alignment is any type and size tuple in the given list. | |
| LegalizeRuleSet & | legalForTypesWithMemDesc (bool Pred, std::initializer_list< LegalityPredicates::TypePairAndMemDesc > TypesAndMemDesc) |
| LegalizeRuleSet & | legalForCartesianProduct (std::initializer_list< LLT > Types) |
| The instruction is legal when type indexes 0 and 1 are both in the given list. | |
| LegalizeRuleSet & | legalForCartesianProduct (std::initializer_list< LLT > Types0, std::initializer_list< LLT > Types1) |
| The instruction is legal when type indexes 0 and 1 are both their respective lists. | |
| LegalizeRuleSet & | legalForCartesianProduct (std::initializer_list< LLT > Types0, std::initializer_list< LLT > Types1, std::initializer_list< LLT > Types2) |
| The instruction is legal when type indexes 0, 1, and 2 are both their respective lists. | |
| LegalizeRuleSet & | alwaysLegal () |
| LegalizeRuleSet & | bitcastIf (LegalityPredicate Predicate, LegalizeMutation Mutation) |
| The specified type index is coerced if predicate is true. | |
| LegalizeRuleSet & | lower () |
| The instruction is lowered. | |
| LegalizeRuleSet & | lowerIf (LegalityPredicate Predicate) |
| The instruction is lowered if predicate is true. | |
| LegalizeRuleSet & | lowerIf (LegalityPredicate Predicate, LegalizeMutation Mutation) |
| The instruction is lowered if predicate is true. | |
| LegalizeRuleSet & | lowerFor (std::initializer_list< LLT > Types) |
| The instruction is lowered when type index 0 is any type in the given list. | |
| LegalizeRuleSet & | lowerFor (std::initializer_list< LLT > Types, LegalizeMutation Mutation) |
| The instruction is lowered when type index 0 is any type in the given list. | |
| LegalizeRuleSet & | lowerFor (std::initializer_list< std::pair< LLT, LLT > > Types) |
| The instruction is lowered when type indexes 0 and 1 is any type pair in the given list. | |
| LegalizeRuleSet & | lowerFor (bool Pred, std::initializer_list< std::pair< LLT, LLT > > Types) |
| The instruction is lowered when type indexes 0 and 1 is any type pair in the given list, provided Predicate pred is true. | |
| LegalizeRuleSet & | lowerFor (std::initializer_list< std::pair< LLT, LLT > > Types, LegalizeMutation Mutation) |
| The instruction is lowered when type indexes 0 and 1 is any type pair in the given list. | |
| LegalizeRuleSet & | lowerForCartesianProduct (std::initializer_list< LLT > Types0, std::initializer_list< LLT > Types1) |
| The instruction is lowered when type indexes 0 and 1 are both in their respective lists. | |
| LegalizeRuleSet & | lowerForCartesianProduct (std::initializer_list< LLT > Types0, std::initializer_list< LLT > Types1, std::initializer_list< LLT > Types2) |
| The instruction is lowered when type indexes 0, 1, and 2 are all in their respective lists. | |
| LegalizeRuleSet & | libcall () |
| The instruction is emitted as a library call. | |
| LegalizeRuleSet & | libcallIf (LegalityPredicate Predicate) |
| Like legalIf, but for the Libcall action. | |
| LegalizeRuleSet & | libcallFor (std::initializer_list< LLT > Types) |
| LegalizeRuleSet & | libcallFor (bool Pred, std::initializer_list< LLT > Types) |
| LegalizeRuleSet & | libcallFor (std::initializer_list< std::pair< LLT, LLT > > Types) |
| LegalizeRuleSet & | libcallFor (bool Pred, std::initializer_list< std::pair< LLT, LLT > > Types) |
| LegalizeRuleSet & | libcallForCartesianProduct (std::initializer_list< LLT > Types) |
| LegalizeRuleSet & | libcallForCartesianProduct (std::initializer_list< LLT > Types0, std::initializer_list< LLT > Types1) |
| LegalizeRuleSet & | widenScalarIf (LegalityPredicate Predicate, LegalizeMutation Mutation) |
| Widen the scalar to the one selected by the mutation if the predicate is true. | |
| LegalizeRuleSet & | widenScalarFor (std::initializer_list< LLT > Types, LegalizeMutation Mutation) |
| Widen the scalar, specified in mutation, when type index 0 is any type in the given list. | |
| LegalizeRuleSet & | widenScalarFor (std::initializer_list< std::pair< LLT, LLT > > Types, LegalizeMutation Mutation) |
| Widen the scalar, specified in mutation, when type indexes 0 and 1 is any type pair in the given list. | |
| LegalizeRuleSet & | narrowScalarIf (LegalityPredicate Predicate, LegalizeMutation Mutation) |
| Narrow the scalar to the one selected by the mutation if the predicate is true. | |
| LegalizeRuleSet & | narrowScalarFor (std::initializer_list< std::pair< LLT, LLT > > Types, LegalizeMutation Mutation) |
| Narrow the scalar, specified in mutation, when type indexes 0 and 1 is any type pair in the given list. | |
| LegalizeRuleSet & | moreElementsIf (LegalityPredicate Predicate, LegalizeMutation Mutation) |
| Add more elements to reach the type selected by the mutation if the predicate is true. | |
| LegalizeRuleSet & | fewerElementsIf (LegalityPredicate Predicate, LegalizeMutation Mutation) |
| Remove elements to reach the type selected by the mutation if the predicate is true. | |
| LegalizeRuleSet & | unsupported () |
| The instruction is unsupported. | |
| LegalizeRuleSet & | unsupportedIf (LegalityPredicate Predicate) |
| LegalizeRuleSet & | unsupportedFor (std::initializer_list< LLT > Types) |
| LegalizeRuleSet & | unsupportedIfMemSizeNotPow2 () |
| LegalizeRuleSet & | lowerIfMemSizeNotPow2 () |
| Lower a memory operation if the memory size, rounded to bytes, is not a power of 2. | |
| LegalizeRuleSet & | lowerIfMemSizeNotByteSizePow2 () |
| Lower a memory operation if the memory access size is not a round power of 2 byte size. | |
| LegalizeRuleSet & | customIf (LegalityPredicate Predicate) |
| LegalizeRuleSet & | customFor (std::initializer_list< LLT > Types) |
| LegalizeRuleSet & | customFor (bool Pred, std::initializer_list< LLT > Types) |
| LegalizeRuleSet & | customFor (std::initializer_list< std::pair< LLT, LLT > > Types) |
| The instruction is custom when type indexes 0 and 1 is any type pair in the given list. | |
| LegalizeRuleSet & | customFor (bool Pred, std::initializer_list< std::pair< LLT, LLT > > Types) |
| LegalizeRuleSet & | customForCartesianProduct (std::initializer_list< LLT > Types) |
| LegalizeRuleSet & | customForCartesianProduct (std::initializer_list< LLT > Types0, std::initializer_list< LLT > Types1) |
| The instruction is custom when type indexes 0 and 1 are both in their respective lists. | |
| LegalizeRuleSet & | customForCartesianProduct (std::initializer_list< LLT > Types0, std::initializer_list< LLT > Types1, std::initializer_list< LLT > Types2) |
| The instruction is custom when type indexes 0, 1, and 2 are all in their respective lists. | |
| LegalizeRuleSet & | customForCartesianProduct (bool Pred, std::initializer_list< LLT > Types0, std::initializer_list< LLT > Types1) |
| The instruction is custom when the predicate is true and type indexes 0 and 1 are all in their respective lists. | |
| LegalizeRuleSet & | custom () |
| Unconditionally custom lower. | |
| LegalizeRuleSet & | widenScalarToNextPow2 (unsigned TypeIdx, unsigned MinSize=0) |
| Widen the scalar to the next power of two that is at least MinSize. | |
| LegalizeRuleSet & | widenScalarToNextMultipleOf (unsigned TypeIdx, unsigned Size) |
| Widen the scalar to the next multiple of Size. | |
| LegalizeRuleSet & | widenScalarOrEltToNextPow2 (unsigned TypeIdx, unsigned MinSize=0) |
| Widen the scalar or vector element type to the next power of two that is at least MinSize. | |
| LegalizeRuleSet & | widenScalarOrEltToNextPow2OrMinSize (unsigned TypeIdx, unsigned MinSize=0) |
| Widen the scalar or vector element type to the next power of two that is at least MinSize. | |
| LegalizeRuleSet & | narrowScalar (unsigned TypeIdx, LegalizeMutation Mutation) |
| LegalizeRuleSet & | scalarize (unsigned TypeIdx) |
| LegalizeRuleSet & | scalarizeIf (LegalityPredicate Predicate, unsigned TypeIdx) |
| LegalizeRuleSet & | minScalarOrElt (unsigned TypeIdx, const LLT Ty) |
| Ensure the scalar or element is at least as wide as Ty. | |
| LegalizeRuleSet & | minScalarOrEltIf (LegalityPredicate Predicate, unsigned TypeIdx, const LLT Ty) |
| Ensure the scalar or element is at least as wide as Ty. | |
| LegalizeRuleSet & | widenVectorEltsToVectorMinSize (unsigned TypeIdx, unsigned VectorSize) |
| Ensure the vector size is at least as wide as VectorSize by promoting the element. | |
| LegalizeRuleSet & | minScalar (unsigned TypeIdx, const LLT Ty) |
| Ensure the scalar is at least as wide as Ty. | |
| LegalizeRuleSet & | minScalar (bool Pred, unsigned TypeIdx, const LLT Ty) |
| LegalizeRuleSet & | minScalarIf (LegalityPredicate Predicate, unsigned TypeIdx, const LLT Ty) |
| Ensure the scalar is at least as wide as Ty if condition is met. | |
| LegalizeRuleSet & | maxScalarOrElt (unsigned TypeIdx, const LLT Ty) |
| Ensure the scalar is at most as wide as Ty. | |
| LegalizeRuleSet & | maxScalar (unsigned TypeIdx, const LLT Ty) |
| Ensure the scalar is at most as wide as Ty. | |
| LegalizeRuleSet & | maxScalarIf (LegalityPredicate Predicate, unsigned TypeIdx, const LLT Ty) |
| Conditionally limit the maximum size of the scalar. | |
| LegalizeRuleSet & | clampScalar (unsigned TypeIdx, const LLT MinTy, const LLT MaxTy) |
| Limit the range of scalar sizes to MinTy and MaxTy. | |
| LegalizeRuleSet & | clampScalar (bool Pred, unsigned TypeIdx, const LLT MinTy, const LLT MaxTy) |
| LegalizeRuleSet & | clampScalarOrElt (unsigned TypeIdx, const LLT MinTy, const LLT MaxTy) |
| Limit the range of scalar sizes to MinTy and MaxTy. | |
| LegalizeRuleSet & | minScalarSameAs (unsigned TypeIdx, unsigned LargeTypeIdx) |
| Widen the scalar to match the size of another. | |
| LegalizeRuleSet & | maxScalarSameAs (unsigned TypeIdx, unsigned NarrowTypeIdx) |
| Narrow the scalar to match the size of another. | |
| LegalizeRuleSet & | scalarSameSizeAs (unsigned TypeIdx, unsigned SameSizeIdx) |
Change the type TypeIdx to have the same scalar size as type SameSizeIdx. | |
| LegalizeRuleSet & | minScalarEltSameAsIf (LegalityPredicate Predicate, unsigned TypeIdx, unsigned LargeTypeIdx) |
| Conditionally widen the scalar or elt to match the size of another. | |
| LegalizeRuleSet & | maxScalarEltSameAsIf (LegalityPredicate Predicate, unsigned TypeIdx, unsigned SmallTypeIdx) |
| Conditionally narrow the scalar or elt to match the size of another. | |
| LegalizeRuleSet & | moreElementsToNextPow2 (unsigned TypeIdx) |
| Add more elements to the vector to reach the next power of two. | |
| LegalizeRuleSet & | clampMinNumElements (unsigned TypeIdx, const LLT EltTy, unsigned MinElements) |
| Limit the number of elements in EltTy vectors to at least MinElements. | |
| LegalizeRuleSet & | alignNumElementsTo (unsigned TypeIdx, const LLT EltTy, unsigned NumElts) |
| Set number of elements to nearest larger multiple of NumElts. | |
| LegalizeRuleSet & | clampMaxNumElements (unsigned TypeIdx, const LLT EltTy, unsigned MaxElements) |
| Limit the number of elements in EltTy vectors to at most MaxElements. | |
| LegalizeRuleSet & | clampNumElements (unsigned TypeIdx, const LLT MinTy, const LLT MaxTy) |
| Limit the number of elements for the given vectors to at least MinTy's number of elements and at most MaxTy's number of elements. | |
| LegalizeRuleSet & | clampMaxNumElementsStrict (unsigned TypeIdx, const LLT EltTy, unsigned NumElts) |
Express EltTy vectors strictly using vectors with NumElts elements (or scalars when NumElts equals 1). | |
| LLVM_ABI bool | verifyTypeIdxsCoverage (unsigned NumTypeIdxs) const |
| Check if there is no type index which is obviously not handled by the LegalizeRuleSet in any way at all. | |
| LLVM_ABI bool | verifyImmIdxsCoverage (unsigned NumImmIdxs) const |
| Check if there is no imm index which is obviously not handled by the LegalizeRuleSet in any way at all. | |
| LLVM_ABI LegalizeActionStep | apply (const LegalityQuery &Query) const |
| Apply the ruleset to the given LegalityQuery. | |
Definition at line 425 of file LegalizerInfo.h.
|
default |
Referenced by alignNumElementsTo(), alwaysLegal(), bitcastIf(), clampMaxNumElements(), clampMaxNumElementsStrict(), clampMinNumElements(), clampNumElements(), clampScalar(), clampScalar(), clampScalarOrElt(), custom(), customFor(), customFor(), customFor(), customFor(), customForCartesianProduct(), customIf(), fewerElementsIf(), legalFor(), legalFor(), legalFor(), legalFor(), legalForCartesianProduct(), legalForCartesianProduct(), legalForCartesianProduct(), legalForTypesWithMemDesc(), legalForTypesWithMemDesc(), legalForTypeWithAnyImm(), legalForTypeWithAnyImm(), legalIf(), libcall(), libcallFor(), libcallFor(), libcallIf(), lower(), lowerFor(), lowerFor(), lowerFor(), lowerFor(), lowerFor(), lowerForCartesianProduct(), lowerForCartesianProduct(), lowerIf(), lowerIf(), lowerIfMemSizeNotByteSizePow2(), lowerIfMemSizeNotPow2(), maxScalar(), maxScalarEltSameAsIf(), maxScalarIf(), maxScalarOrElt(), maxScalarSameAs(), minScalar(), minScalar(), minScalarEltSameAsIf(), minScalarIf(), minScalarOrElt(), minScalarOrEltIf(), minScalarSameAs(), moreElementsIf(), moreElementsToNextPow2(), narrowScalar(), narrowScalarIf(), scalarize(), scalarizeIf(), scalarSameSizeAs(), unsupported(), unsupportedFor(), unsupportedIf(), unsupportedIfMemSizeNotPow2(), widenScalarFor(), widenScalarIf(), widenScalarOrEltToNextPow2(), widenScalarOrEltToNextPow2OrMinSize(), widenScalarToNextMultipleOf(), widenScalarToNextPow2(), and widenVectorEltsToVectorMinSize().
|
inline |
Definition at line 583 of file LegalizerInfo.h.
References assert().
|
inline |
Set number of elements to nearest larger multiple of NumElts.
Definition at line 1256 of file LegalizerInfo.h.
References llvm::alignTo(), llvm::LLT::fixed_vector(), llvm::LLT::getElementType(), llvm::LLT::getNumElements(), llvm::LLT::isFixedVector(), LegalizeRuleSet(), and llvm::LegalityQuery::Types.
Referenced by clampMaxNumElementsStrict().
|
inline |
Definition at line 685 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), llvm::ARMLegalizerInfo::ARMLegalizerInfo(), llvm::M68kLegalizerInfo::M68kLegalizerInfo(), llvm::MipsLegalizerInfo::MipsLegalizerInfo(), llvm::PPCLegalizerInfo::PPCLegalizerInfo(), llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
| LegalizeActionStep LegalizeRuleSet::apply | ( | const LegalityQuery & | Query | ) | const |
Apply the ruleset to the given LegalityQuery.
Definition at line 194 of file LegalizerInfo.cpp.
References assert(), llvm::dbgs(), hasNoSimpleLoops(), LLVM_DEBUG, Mutation, mutationIsSane(), and llvm::LegalityQuery::print().
Referenced by llvm::LegalizerInfo::getAction().
|
inline |
The specified type index is coerced if predicate is true.
Definition at line 692 of file LegalizerInfo.h.
References LegalizeRuleSet(), and Mutation.
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), and llvm::PPCLegalizerInfo::PPCLegalizerInfo().
|
inline |
Limit the number of elements in EltTy vectors to at most MaxElements.
Definition at line 1275 of file LegalizerInfo.h.
References llvm::LLT::getElementType(), llvm::ElementCount::getFixed(), llvm::LLT::getNumElements(), llvm::LLT::isFixedVector(), LegalizeRuleSet(), llvm::LLT::scalarOrVector(), and llvm::LegalityQuery::Types.
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), clampMaxNumElementsStrict(), clampNumElements(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
Express EltTy vectors strictly using vectors with NumElts elements (or scalars when NumElts equals 1).
First pad with undef elements to nearest larger multiple of NumElts. Then perform split with all sub-instructions having the same type. Using clampMaxNumElements (non-strict) can result in leftover instruction with different type (fewer elements then NumElts or scalar). No effect if the type is not a vector.
Definition at line 1319 of file LegalizerInfo.h.
References alignNumElementsTo(), clampMaxNumElements(), and LegalizeRuleSet().
Referenced by llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo().
|
inline |
Limit the number of elements in EltTy vectors to at least MinElements.
Definition at line 1237 of file LegalizerInfo.h.
References llvm::LLT::fixed_vector(), llvm::LLT::getElementType(), llvm::LLT::getNumElements(), llvm::LLT::isFixedVector(), LegalizeRuleSet(), and llvm::LegalityQuery::Types.
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), clampNumElements(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
Limit the number of elements for the given vectors to at least MinTy's number of elements and at most MaxTy's number of elements.
No effect if the type is not a vector or does not have the same element type as the constraints. The element type of MinTy and MaxTy must match.
Definition at line 1299 of file LegalizerInfo.h.
References assert(), clampMaxNumElements(), clampMinNumElements(), llvm::LLT::getElementType(), llvm::LLT::getNumElements(), llvm::LLT::isScalableVector(), and LegalizeRuleSet().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
Definition at line 1148 of file LegalizerInfo.h.
References clampScalar(), and LegalizeRuleSet().
|
inline |
Limit the range of scalar sizes to MinTy and MaxTy.
Definition at line 1142 of file LegalizerInfo.h.
References assert(), llvm::LLT::isScalar(), LegalizeRuleSet(), maxScalar(), and minScalar().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), llvm::ARMLegalizerInfo::ARMLegalizerInfo(), clampScalar(), llvm::MipsLegalizerInfo::MipsLegalizerInfo(), llvm::RISCVLegalizerInfo::RISCVLegalizerInfo(), llvm::WebAssemblyLegalizerInfo::WebAssemblyLegalizerInfo(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
Limit the range of scalar sizes to MinTy and MaxTy.
Definition at line 1156 of file LegalizerInfo.h.
References LegalizeRuleSet(), maxScalarOrElt(), and minScalarOrElt().
Referenced by llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo().
|
inline |
Unconditionally custom lower.
Definition at line 967 of file LegalizerInfo.h.
References customIf(), and LegalizeRuleSet().
Referenced by llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), llvm::ARMLegalizerInfo::ARMLegalizerInfo(), and llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo().
|
inline |
Definition at line 918 of file LegalizerInfo.h.
References LegalizeRuleSet().
|
inline |
Definition at line 929 of file LegalizerInfo.h.
References LegalizeRuleSet().
|
inline |
Definition at line 915 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), llvm::ARMLegalizerInfo::ARMLegalizerInfo(), llvm::RISCVLegalizerInfo::RISCVLegalizerInfo(), llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
The instruction is custom when type indexes 0 and 1 is any type pair in the given list.
Definition at line 926 of file LegalizerInfo.h.
References LegalizeRuleSet().
|
inline |
The instruction is custom when the predicate is true and type indexes 0 and 1 are all in their respective lists.
Definition at line 959 of file LegalizerInfo.h.
|
inline |
Definition at line 936 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::ARMLegalizerInfo::ARMLegalizerInfo(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
The instruction is custom when type indexes 0 and 1 are both in their respective lists.
Definition at line 942 of file LegalizerInfo.h.
|
inline |
The instruction is custom when type indexes 0, 1, and 2 are all in their respective lists.
Definition at line 949 of file LegalizerInfo.h.
|
inline |
Definition at line 909 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), custom(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
Remove elements to reach the type selected by the mutation if the predicate is true.
Definition at line 867 of file LegalizerInfo.h.
References LegalizeRuleSet(), and Mutation.
Referenced by llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), and llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo().
|
inline |
Definition at line 589 of file LegalizerInfo.h.
Definition at line 591 of file LegalizerInfo.h.
References assert(), llvm::MCOI::OPERAND_FIRST_GENERIC_IMM, and llvm::MCOI::OPERAND_LAST_GENERIC_IMM.
|
inline |
Definition at line 581 of file LegalizerInfo.h.
|
inline |
Definition at line 612 of file LegalizerInfo.h.
References LegalizeRuleSet().
|
inline |
Definition at line 622 of file LegalizerInfo.h.
References LegalizeRuleSet().
|
inline |
Definition at line 629 of file LegalizerInfo.h.
|
inline |
The instruction is legal when type index 0 is any type in the given list.
Definition at line 609 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), llvm::ARMLegalizerInfo::ARMLegalizerInfo(), llvm::M68kLegalizerInfo::M68kLegalizerInfo(), llvm::MipsLegalizerInfo::MipsLegalizerInfo(), llvm::PPCLegalizerInfo::PPCLegalizerInfo(), llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo(), llvm::WebAssemblyLegalizerInfo::WebAssemblyLegalizerInfo(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
The instruction is legal when type indexes 0 and 1 is any type pair in the given list.
Definition at line 619 of file LegalizerInfo.h.
References LegalizeRuleSet().
|
inline |
The instruction is legal when type indexes 0 and 1 are both in the given list.
That is, the type pair is in the cartesian product of the list.
Definition at line 667 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::ARMLegalizerInfo::ARMLegalizerInfo(), llvm::MipsLegalizerInfo::MipsLegalizerInfo(), llvm::PPCLegalizerInfo::PPCLegalizerInfo(), llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo(), llvm::WebAssemblyLegalizerInfo::WebAssemblyLegalizerInfo(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
The instruction is legal when type indexes 0 and 1 are both their respective lists.
Definition at line 672 of file LegalizerInfo.h.
References LegalizeRuleSet().
|
inline |
The instruction is legal when type indexes 0, 1, and 2 are both their respective lists.
Definition at line 678 of file LegalizerInfo.h.
References LegalizeRuleSet().
|
inline |
Definition at line 656 of file LegalizerInfo.h.
References LegalizeRuleSet(), and llvm::LegalityPredicates::typePairAndMemDescInSet().
|
inline |
The instruction is legal when type indexes 0 and 1 along with the memory size and minimum alignment is any type and size tuple in the given list.
Definition at line 649 of file LegalizerInfo.h.
References LegalizeRuleSet(), and llvm::LegalityPredicates::typePairAndMemDescInSet().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), and llvm::ARMLegalizerInfo::ARMLegalizerInfo().
|
inline |
The instruction is legal when type index 0 is any type in the given list and imm index 0 is anything.
Definition at line 636 of file LegalizerInfo.h.
References LegalizeRuleSet().
|
inline |
Definition at line 641 of file LegalizerInfo.h.
References LegalizeRuleSet().
|
inline |
The instruction is legal if predicate is true.
Definition at line 602 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), llvm::MipsLegalizerInfo::MipsLegalizerInfo(), llvm::PPCLegalizerInfo::PPCLegalizerInfo(), llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
The instruction is emitted as a library call.
Definition at line 773 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
Definition at line 791 of file LegalizerInfo.h.
References LegalizeRuleSet().
|
inline |
Definition at line 801 of file LegalizerInfo.h.
|
inline |
Definition at line 788 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::ARMLegalizerInfo::ARMLegalizerInfo(), and llvm::MipsLegalizerInfo::MipsLegalizerInfo().
|
inline |
Definition at line 797 of file LegalizerInfo.h.
|
inline |
Definition at line 807 of file LegalizerInfo.h.
Referenced by llvm::MipsLegalizerInfo::MipsLegalizerInfo().
|
inline |
Definition at line 811 of file LegalizerInfo.h.
|
inline |
Like legalIf, but for the Libcall action.
Definition at line 782 of file LegalizerInfo.h.
References LegalizeRuleSet().
|
inline |
The instruction is lowered.
Definition at line 701 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), llvm::ARMLegalizerInfo::ARMLegalizerInfo(), llvm::MipsLegalizerInfo::MipsLegalizerInfo(), llvm::PPCLegalizerInfo::PPCLegalizerInfo(), llvm::RISCVLegalizerInfo::RISCVLegalizerInfo(), llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo(), llvm::WebAssemblyLegalizerInfo::WebAssemblyLegalizerInfo(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
The instruction is lowered when type indexes 0 and 1 is any type pair in the given list, provided Predicate pred is true.
Definition at line 743 of file LegalizerInfo.h.
References LegalizeRuleSet().
|
inline |
The instruction is lowered when type index 0 is any type in the given list.
Keep type index 0 as the same type.
Definition at line 727 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), llvm::ARMLegalizerInfo::ARMLegalizerInfo(), llvm::MipsLegalizerInfo::MipsLegalizerInfo(), llvm::PPCLegalizerInfo::PPCLegalizerInfo(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
The instruction is lowered when type index 0 is any type in the given list.
Definition at line 732 of file LegalizerInfo.h.
References LegalizeRuleSet(), and Mutation.
|
inline |
The instruction is lowered when type indexes 0 and 1 is any type pair in the given list.
Keep type index 0 as the same type.
Definition at line 738 of file LegalizerInfo.h.
References LegalizeRuleSet().
|
inline |
The instruction is lowered when type indexes 0 and 1 is any type pair in the given list.
Definition at line 751 of file LegalizerInfo.h.
References LegalizeRuleSet(), and Mutation.
|
inline |
The instruction is lowered when type indexes 0 and 1 are both in their respective lists.
Definition at line 757 of file LegalizerInfo.h.
References LegalizeRuleSet().
|
inline |
The instruction is lowered when type indexes 0, 1, and 2 are all in their respective lists.
Definition at line 764 of file LegalizerInfo.h.
References LegalizeRuleSet().
|
inline |
The instruction is lowered if predicate is true.
Keep type index 0 as the same type.
Definition at line 710 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), and llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo().
|
inline |
The instruction is lowered if predicate is true.
Definition at line 718 of file LegalizerInfo.h.
References LegalizeRuleSet(), and Mutation.
|
inline |
Lower a memory operation if the memory access size is not a round power of 2 byte size.
This is stricter than lowerIfMemSizeNotPow2, and more likely what you want (e.g. this will lower s1, s7 and s24).
Definition at line 904 of file LegalizerInfo.h.
References LegalizeRuleSet(), and llvm::LegalityPredicates::memSizeNotByteSizePow2().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo().
|
inline |
Lower a memory operation if the memory size, rounded to bytes, is not a power of 2.
For example, this will not trigger for s1 or s7, but will for s24.
Definition at line 896 of file LegalizerInfo.h.
References LegalizeRuleSet(), and llvm::LegalityPredicates::memSizeInBytesNotPow2().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo().
|
inline |
Ensure the scalar is at most as wide as Ty.
Definition at line 1115 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), llvm::ARMLegalizerInfo::ARMLegalizerInfo(), clampScalar(), and llvm::MipsLegalizerInfo::MipsLegalizerInfo().
|
inline |
Conditionally narrow the scalar or elt to match the size of another.
Definition at line 1210 of file LegalizerInfo.h.
References LegalizeRuleSet(), narrowScalarIf(), T, and llvm::LegalityQuery::Types.
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo().
|
inline |
Conditionally limit the maximum size of the scalar.
For example, when the maximum size of one type depends on the size of another such as extracting N bits from an M bit container.
Definition at line 1126 of file LegalizerInfo.h.
References llvm::LLT::getSizeInBits(), llvm::LLT::isScalar(), LegalizeRuleSet(), and llvm::LegalityQuery::Types.
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), and llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo().
|
inline |
Ensure the scalar is at most as wide as Ty.
Definition at line 1106 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by clampScalarOrElt().
|
inline |
Narrow the scalar to match the size of another.
Definition at line 1174 of file LegalizerInfo.h.
References llvm::LegalizeMutations::changeElementSizeTo(), LegalizeRuleSet(), and llvm::LegalityQuery::Types.
Referenced by scalarSameSizeAs().
|
inline |
Definition at line 1083 of file LegalizerInfo.h.
References LegalizeRuleSet(), and minScalar().
|
inline |
Ensure the scalar is at least as wide as Ty.
Definition at line 1076 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), clampScalar(), minScalar(), llvm::MipsLegalizerInfo::MipsLegalizerInfo(), llvm::WebAssemblyLegalizerInfo::WebAssemblyLegalizerInfo(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
Conditionally widen the scalar or elt to match the size of another.
Definition at line 1193 of file LegalizerInfo.h.
References LegalizeRuleSet(), T, llvm::LegalityQuery::Types, and widenScalarIf().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo().
|
inline |
Ensure the scalar is at least as wide as Ty if condition is met.
Definition at line 1090 of file LegalizerInfo.h.
References llvm::LLT::getSizeInBits(), llvm::LLT::isScalar(), LegalizeRuleSet(), and llvm::LegalityQuery::Types.
|
inline |
Ensure the scalar or element is at least as wide as Ty.
Definition at line 1034 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), and clampScalarOrElt().
|
inline |
Ensure the scalar or element is at least as wide as Ty.
Definition at line 1043 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo().
|
inline |
Widen the scalar to match the size of another.
Definition at line 1162 of file LegalizerInfo.h.
References llvm::LegalizeMutations::changeElementSizeTo(), LegalizeRuleSet(), and llvm::LegalityQuery::Types.
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), and scalarSameSizeAs().
|
inline |
Add more elements to reach the type selected by the mutation if the predicate is true.
Definition at line 858 of file LegalizerInfo.h.
References LegalizeRuleSet(), and Mutation.
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), and llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo().
|
inline |
Add more elements to the vector to reach the next power of two.
No effect if the type is not a vector or the element count is a power of two.
Definition at line 1229 of file LegalizerInfo.h.
References LegalizeRuleSet(), and llvm::LegalizeMutations::moreElementsToNextPow2().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
Definition at line 1014 of file LegalizerInfo.h.
References LegalizeRuleSet(), and Mutation.
|
inline |
Narrow the scalar, specified in mutation, when type indexes 0 and 1 is any type pair in the given list.
Definition at line 851 of file LegalizerInfo.h.
References Mutation.
|
inline |
Narrow the scalar to the one selected by the mutation if the predicate is true.
Definition at line 841 of file LegalizerInfo.h.
References LegalizeRuleSet(), and Mutation.
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), and maxScalarEltSameAsIf().
|
inline |
Definition at line 1020 of file LegalizerInfo.h.
References LegalizeRuleSet(), and llvm::LegalizeMutations::scalarize().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
Definition at line 1026 of file LegalizerInfo.h.
References LegalizeRuleSet(), and llvm::LegalizeMutations::scalarize().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), and llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo().
|
inline |
Change the type TypeIdx to have the same scalar size as type SameSizeIdx.
Definition at line 1187 of file LegalizerInfo.h.
References LegalizeRuleSet(), maxScalarSameAs(), and minScalarSameAs().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::WebAssemblyLegalizerInfo::WebAssemblyLegalizerInfo(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
Definition at line 582 of file LegalizerInfo.h.
|
inline |
The instruction is unsupported.
Definition at line 876 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), and llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo().
|
inline |
Definition at line 884 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo().
|
inline |
Definition at line 880 of file LegalizerInfo.h.
References LegalizeRuleSet().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), and llvm::SPIRVLegalizerInfo::SPIRVLegalizerInfo().
|
inline |
Definition at line 888 of file LegalizerInfo.h.
References LegalizeRuleSet(), and llvm::LegalityPredicates::memSizeInBytesNotPow2().
Check if there is no imm index which is obviously not handled by the LegalizeRuleSet in any way at all.
NumTypeIdxs) set. Definition at line 245 of file LegalizerInfo.cpp.
References llvm::dbgs(), LLVM_DEBUG, and VerboseVerifyLegalizerInfo.
Referenced by llvm::LegalizerInfo::verify().
Check if there is no type index which is obviously not handled by the LegalizeRuleSet in any way at all.
NumTypeIdxs) set. Definition at line 214 of file LegalizerInfo.cpp.
References llvm::dbgs(), LLVM_DEBUG, and VerboseVerifyLegalizerInfo.
Referenced by llvm::LegalizerInfo::verify().
|
inline |
Widen the scalar, specified in mutation, when type index 0 is any type in the given list.
Definition at line 827 of file LegalizerInfo.h.
References LegalizeRuleSet(), and Mutation.
|
inline |
Widen the scalar, specified in mutation, when type indexes 0 and 1 is any type pair in the given list.
Definition at line 834 of file LegalizerInfo.h.
References Mutation.
|
inline |
Widen the scalar to the one selected by the mutation if the predicate is true.
Definition at line 818 of file LegalizerInfo.h.
References LegalizeRuleSet(), and Mutation.
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), and minScalarEltSameAsIf().
|
inline |
Widen the scalar or vector element type to the next power of two that is at least MinSize.
No effect if the scalar size is a power of two.
Definition at line 994 of file LegalizerInfo.h.
References LegalizeRuleSet(), and llvm::LegalizeMutations::widenScalarOrEltToNextPow2().
|
inline |
Widen the scalar or vector element type to the next power of two that is at least MinSize.
No effect if the scalar size is a power of two.
Definition at line 1004 of file LegalizerInfo.h.
References LegalizeRuleSet(), and llvm::LegalizeMutations::widenScalarOrEltToNextPow2().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo().
|
inline |
Widen the scalar to the next multiple of Size.
No effect if the type is not a scalar or is a multiple of Size.
Definition at line 984 of file LegalizerInfo.h.
References LegalizeRuleSet(), Size, and llvm::LegalizeMutations::widenScalarOrEltToNextMultipleOf().
Referenced by llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo().
|
inline |
Widen the scalar to the next power of two that is at least MinSize.
No effect if the type is a power of two, except if the type is smaller than MinSize, or if the type is a vector type.
Definition at line 974 of file LegalizerInfo.h.
References LegalizeRuleSet(), and llvm::LegalizeMutations::widenScalarOrEltToNextPow2().
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo(), llvm::AMDGPULegalizerInfo::AMDGPULegalizerInfo(), llvm::M68kLegalizerInfo::M68kLegalizerInfo(), llvm::RISCVLegalizerInfo::RISCVLegalizerInfo(), and llvm::X86LegalizerInfo::X86LegalizerInfo().
|
inline |
Ensure the vector size is at least as wide as VectorSize by promoting the element.
Definition at line 1055 of file LegalizerInfo.h.
References llvm::LLT::changeElementSize(), llvm::LLT::fixed_vector(), llvm::LLT::getElementType(), llvm::LLT::getNumElements(), llvm::LLT::getSizeInBits(), llvm::LLT::isFixedVector(), LegalizeRuleSet(), and llvm::LegalityQuery::Types.
Referenced by llvm::AArch64LegalizerInfo::AArch64LegalizerInfo().