MLIR  20.0.0git
Classes | Namespaces | Enumerations | Functions
SPIRVConversion.h File Reference
#include "mlir/Dialect/SPIRV/IR/SPIRVAttributes.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVTypes.h"
#include "mlir/Dialect/SPIRV/IR/TargetAndABI.h"
#include "mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h"
#include "mlir/Transforms/DialectConversion.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "mlir/Transforms/OneToNTypeConversion.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/Support/LogicalResult.h"

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

 mlir
 Include the generated interface declarations.
 
 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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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_t > mlir::spirv::getNativeVectorShapeImpl (vector::ReductionOp op)
 
SmallVector< int64_t > mlir::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)