23 return IntegerType::get(type.getContext(), type.getIntOrFloatBitWidth(),
24 IntegerType::SignednessSemantics::Signless);
29 auto converted = converter.
convertType(type.getElementType());
32 return type.clone(converted);
37 if (inputs.size() != 1)
40 return builder.
create<UnrealizedConversionCastOp>(loc, resultType, inputs)
46 if (inputs.size() != 1)
49 return builder.
create<UnrealizedConversionCastOp>(loc, resultType, inputs)
This class defines the main interface for locations in MLIR and acts as a non-nullable wrapper around...
This class helps build Operations.
Operation * create(const OperationState &state)
Creates an operation given the fields represented as an OperationState.
Tensor types represent multi-dimensional arrays, and have two variants: RankedTensorType and Unranked...
void addConversion(FnT &&callback)
Register a conversion function.
LogicalResult convertType(Type t, SmallVectorImpl< Type > &results) const
Convert the given type.
void addSourceMaterialization(FnT &&callback)
This method registers a materialization that will be called when converting a legal replacement value...
void addTargetMaterialization(FnT &&callback)
This method registers a materialization that will be called when converting an illegal (source) value...
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
bool isUnsignedInteger() const
Return true if this is an unsigned integer type (with the specified width).
This class provides an abstraction over the different types of ranges over Values.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
void populateTosaTypeConversion(TypeConverter &converter)
Include the generated interface declarations.