forked from OSchip/llvm-project
Add convenience builder for MemRefType.
PiperOrigin-RevId: 208245701
This commit is contained in:
parent
22ae97cffc
commit
067d70f20d
|
@ -70,6 +70,9 @@ public:
|
|||
IntegerType *getIntegerType(unsigned width);
|
||||
FunctionType *getFunctionType(ArrayRef<Type *> inputs,
|
||||
ArrayRef<Type *> results);
|
||||
MemRefType *getMemRefType(ArrayRef<int> shape, Type *elementType,
|
||||
ArrayRef<AffineMap *> affineMapComposition = {},
|
||||
unsigned memorySpace = 0);
|
||||
VectorType *getVectorType(ArrayRef<unsigned> shape, Type *elementType);
|
||||
RankedTensorType *getTensorType(ArrayRef<int> shape, Type *elementType);
|
||||
UnrankedTensorType *getTensorType(Type *elementType);
|
||||
|
|
|
@ -59,6 +59,12 @@ FunctionType *Builder::getFunctionType(ArrayRef<Type *> inputs,
|
|||
return FunctionType::get(inputs, results, context);
|
||||
}
|
||||
|
||||
MemRefType *Builder::getMemRefType(ArrayRef<int> shape, Type *elementType,
|
||||
ArrayRef<AffineMap *> affineMapComposition,
|
||||
unsigned memorySpace) {
|
||||
return MemRefType::get(shape, elementType, affineMapComposition, memorySpace);
|
||||
}
|
||||
|
||||
VectorType *Builder::getVectorType(ArrayRef<unsigned> shape,
|
||||
Type *elementType) {
|
||||
return VectorType::get(shape, elementType);
|
||||
|
|
Loading…
Reference in New Issue