MLIR 22.0.0git
SPIRVConversion.h File Reference

Go to the source code of this file.

Classes

struct  mlir::SPIRVConversionOptions
class  mlir::SPIRVTypeConverter
 Type conversion from builtin types to SPIR-V types for shader interface. More...
class  mlir::SPIRVConversionTarget

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::spirv

Enumerations

enum class  mlir::SPIRVSubByteTypeStorage { mlir::Packed }
 How sub-byte values are storaged in memory. More...

Functions

void mlir::populateBuiltinFuncToSPIRVPatterns (const SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns)
 Appends to a pattern list additional patterns for translating the builtin func op to the SPIR-V dialect.
void mlir::populateFuncOpVectorRewritePatterns (RewritePatternSet &patterns)
void mlir::populateReturnOpVectorRewritePatterns (RewritePatternSet &patterns)
Value mlir::spirv::getBuiltinVariableValue (Operation *op, BuiltIn builtin, Type integerType, OpBuilder &builder, StringRef prefix="__builtin__", StringRef suffix="__")
 Returns the value for the given builtin variable.
Value mlir::spirv::getPushConstantValue (Operation *op, unsigned elementCount, unsigned offset, Type integerType, OpBuilder &builder)
 Gets the value at the given offset of the push constant storage with a total of elementCount integerType integers.
Value mlir::spirv::linearizeIndex (ValueRange indices, ArrayRef< int64_t > strides, int64_t offset, Type integerType, Location loc, OpBuilder &builder)
 Generates IR to perform index linearization with the given indices and their corresponding strides, adding an initial offset.
Value mlir::spirv::getElementPtr (const SPIRVTypeConverter &typeConverter, MemRefType baseType, Value basePtr, ValueRange indices, Location loc, OpBuilder &builder)
 Performs the index computation to get to the element at indices of the memory pointed to by basePtr, using the layout map of baseType.
Value mlir::spirv::getOpenCLElementPtr (const SPIRVTypeConverter &typeConverter, MemRefType baseType, Value basePtr, ValueRange indices, Location loc, OpBuilder &builder)
Value mlir::spirv::getVulkanElementPtr (const SPIRVTypeConverter &typeConverter, MemRefType baseType, Value basePtr, ValueRange indices, Location loc, OpBuilder &builder)
int mlir::spirv::getComputeVectorSize (int64_t size)
SmallVector< int64_tmlir::spirv::getNativeVectorShapeImpl (vector::ReductionOp op)
SmallVector< int64_tmlir::spirv::getNativeVectorShapeImpl (vector::TransposeOp op)
std::optional< SmallVector< int64_t > > mlir::spirv::getNativeVectorShape (Operation *op)
LogicalResult mlir::spirv::unrollVectorsInSignatures (Operation *op)
LogicalResult mlir::spirv::unrollVectorsInFuncBodies (Operation *op)