13 #ifndef MLIR_IR_TYPEUTILITIES_H
14 #define MLIR_IR_TYPEUTILITIES_H
17 #include "llvm/ADT/STLExtras.h"
50 ArrayRef<int64_t> shape2);
74 TypeRange
insertTypesInto(TypeRange oldTypes, ArrayRef<unsigned> indices,
75 TypeRange newTypes, SmallVectorImpl<Type> &storage);
79 TypeRange
filterTypesOut(TypeRange types,
const BitVector &indices,
80 SmallVectorImpl<Type> &storage);
88 :
public llvm::mapped_iterator_base<OperandElementTypeIterator,
89 Operation::operand_iterator, Type> {
101 :
public llvm::mapped_iterator_base<ResultElementTypeIterator,
102 Operation::result_iterator, Type> {
Type mapElement(Value value) const
Map the element to the iterator result type.
Type mapElement(Value value) const
Map the element to the iterator result type.
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
@ Type
An inlay hint that for a type annotation.
Include the generated interface declarations.
LogicalResult verifyCompatibleShapes(TypeRange types1, TypeRange types2)
Returns success if the given two arrays have the same number of elements and each pair wise entries h...
SmallVector< Type, 10 > getFlattenedTypes(TupleType t)
Get the types within a nested Tuple.
bool isOpaqueTypeWithName(Type type, StringRef dialect, StringRef typeData)
Return true if the specified type is an opaque type with the specified dialect and typeData.
TypeRange filterTypesOut(TypeRange types, const BitVector &indices, SmallVectorImpl< Type > &storage)
Filters out any elements referenced by indices.
Type getElementTypeOrSelf(Type type)
Return the element type or return the type itself.
LogicalResult verifyCompatibleDims(ArrayRef< int64_t > dims)
Dimensions are compatible if all non-dynamic dims are equal.
LogicalResult verifyCompatibleShape(ArrayRef< int64_t > shape1, ArrayRef< int64_t > shape2)
Returns success if the given two shapes are compatible.
TypeRange insertTypesInto(TypeRange oldTypes, ArrayRef< unsigned > indices, TypeRange newTypes, SmallVectorImpl< Type > &storage)
Insert a set of newTypes into oldTypes at the given indices.