MLIR 22.0.0git
TypeUtilities.h File Reference
#include "mlir/IR/Operation.h"
#include "llvm/ADT/STLExtras.h"

Go to the source code of this file.

Classes

class  mlir::OperandElementTypeIterator
class  mlir::ResultElementTypeIterator

Namespaces

namespace  mlir
 Include the generated interface declarations.

Typedefs

using mlir::OperandElementTypeRange = iterator_range<OperandElementTypeIterator>
using mlir::ResultElementTypeRange = iterator_range<ResultElementTypeIterator>

Functions

Type mlir::getElementTypeOrSelf (Type type)
 Return the element type or return the type itself.
Type mlir::getElementTypeOrSelf (Attribute attr)
 Return the element type or return the type itself.
Type mlir::getElementTypeOrSelf (Value val)
SmallVector< Type, 10 > mlir::getFlattenedTypes (TupleType t)
 Get the types within a nested Tuple.
bool mlir::isOpaqueTypeWithName (Type type, StringRef dialect, StringRef typeData)
 Return true if the specified type is an opaque type with the specified dialect and typeData.
LogicalResult mlir::verifyCompatibleShape (ArrayRef< int64_t > shape1, ArrayRef< int64_t > shape2)
 Returns success if the given two shapes are compatible.
LogicalResult mlir::verifyCompatibleShape (Type type1, Type type2)
 Returns success if the given two types have compatible shape.
LogicalResult mlir::verifyCompatibleShapes (TypeRange types1, TypeRange types2)
 Returns success if the given two arrays have the same number of elements and each pair wise entries have compatible shape.
LogicalResult mlir::verifyCompatibleShapes (TypeRange types)
 Returns success if all given types have compatible shapes.
LogicalResult mlir::verifyCompatibleDims (ArrayRef< int64_t > dims)
 Dimensions are compatible if all non-dynamic dims are equal.
TypeRange mlir::insertTypesInto (TypeRange oldTypes, ArrayRef< unsigned > indices, TypeRange newTypes, SmallVectorImpl< Type > &storage)
 Insert a set of newTypes into oldTypes at the given indices.
TypeRange mlir::filterTypesOut (TypeRange types, const BitVector &indices, SmallVectorImpl< Type > &storage)
 Filters out any elements referenced by indices.