llvm::LegalizeRuleSet

Builder for the ordered legalization rules of one opcode (or alias group).

Synopsis

Declared in <llvm/CodeGen/GlobalISel/LegalizerInfo.h>

class LegalizeRuleSet;

Member Functions

NameDescription
LegalizeRuleSet [constructor]Construct an empty legalize rule set.
aliasTo Make this rule set an alias of Opcode.
alignNumElementsTo Set number of elements to nearest larger multiple of NumElts.
alwaysLegal Mark the instruction legal unconditionally.
apply Apply the ruleset to the given LegalityQuery.
bitcastIf The specified type index is coerced if predicate is true.
clampMaxNumElements Limit the number of elements in EltTy vectors to at most MaxElements.
clampMaxNumElementsStrict Express EltTy vectors using only vectors (or scalars) of NumElts lanes.
clampMinNumElements Limit the number of elements in EltTy vectors to at least MinElements.
clampNumElements Limit vector element counts to the range described by MinTy and MaxTy.
clampScalar clampScalar overloads
clampScalarOrElt Limit the range of scalar or element sizes to MinTy and MaxTy.
custom Unconditionally custom lower.
customFor customFor overloads
customForCartesianProduct customForCartesianProduct overloads
customIf The instruction is custom when Predicate is true.
fewerElementsIf Remove elements to reach the type selected by the mutation if the predicate is true.
getAlias Return the opcode this rule set aliases, or zero if none.
immIdx Mark immediate index ImmIdx as covered and return it.
isAliasedByAnother Return whether another opcode aliases this rule set.
legalFor legalFor overloads
legalForCartesianProduct legalForCartesianProduct overloads
legalForTypeWithAnyImm legalForTypeWithAnyImm overloads
legalForTypesWithMemDesc legalForTypesWithMemDesc overloads
legalIf The instruction is legal if predicate is true.
libcall The instruction is emitted as a library call.
libcallFor libcallFor overloads
libcallForCartesianProduct libcallForCartesianProduct overloads
libcallIf Like legalIf, but for the Libcall action.
lower The instruction is lowered.
lowerFor lowerFor overloads
lowerForCartesianProduct lowerForCartesianProduct overloads
lowerIf lowerIf overloads
lowerIfMemSizeNotByteSizePow2 Lower a memory op whose access size is not a power-of-two byte size.
lowerIfMemSizeNotPow2 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.
maxScalar Ensure the scalar is at most as wide as Ty.
maxScalarEltSameAsIf Conditionally narrow the scalar or elt to match the size of another.
maxScalarIf Conditionally limit the maximum size of the scalar.
maxScalarOrElt Ensure the scalar or element is at most as wide as Ty.
maxScalarSameAs Narrow the scalar to match the size of another.
minScalar minScalar overloads
minScalarEltSameAsIf Conditionally widen the scalar or elt to match the size of another.
minScalarIf Ensure the scalar is at least as wide as Ty if condition is met.
minScalarOrElt Ensure the scalar or element is at least as wide as Ty.
minScalarOrEltIf Ensure the scalar or element is at least as wide as Ty when Predicate holds.
minScalarSameAs Widen the scalar to match the size of another.
moreElementsIf Add more elements to reach the type selected by the mutation if the predicate is true.
moreElementsToNextPow2 Add more elements to the vector to reach the next power of two.
narrowScalar Narrow the scalar at TypeIdx using Mutation.
narrowScalarFor Narrow the scalar, specified in mutation, when type indexes 0 and 1 is any type pair in the given list.
narrowScalarIf Narrow the scalar to the one selected by the mutation if the predicate is true.
scalarSameSizeAs Change the type TypeIdx to have the same scalar size as type SameSizeIdx.
scalarize Scalarize the vector at TypeIdx into its element type.
scalarizeIf Scalarize the vector at TypeIdx when Predicate holds.
setIsAliasedByAnother Record that another opcode aliases this rule set.
unsupported The instruction is unsupported.
unsupportedFor Mark the instruction unsupported when type index 0 is any type in Types.
unsupportedIf Mark the instruction unsupported when Predicate is true.
unsupportedIfMemSizeNotPow2 Mark the instruction unsupported if the memory size in bytes is not a power of 2.
verifyImmIdxsCoverage Check if there is no imm index which is obviously not handled by the LegalizeRuleSet in any way at all.
verifyTypeIdxsCoverage Check if there is no type index which is obviously not handled by the LegalizeRuleSet in any way at all.
widenScalarFor widenScalarFor overloads
widenScalarIf Widen the scalar to the one selected by the mutation if the predicate is true.
widenScalarOrEltToNextPow2 Widen the scalar or vector element type to the next power of two.
widenScalarOrEltToNextPow2OrMinSize Widen the scalar or element to the next power of two, or at least MinSize.
widenScalarToNextMultipleOf Widen the scalar to the next multiple of Size.
widenScalarToNextPow2 Widen the scalar to the next power of two that is at least MinSize.
widenVectorEltsToVectorMinSize Ensure the vector size is at least as wide as VectorSize by promoting the element.