mirror of
https://github.com/intel/llvm.git
synced 2026-02-06 15:18:53 +08:00
Add convenience builder for MemRefType.
PiperOrigin-RevId: 208245701
This commit is contained in:
committed by
jpienaar
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);
|
||||
|
||||
Reference in New Issue
Block a user