13 #ifndef MLIR_CONVERSION_SPIRVTOLLVM_SPIRVTOLLVM_H
14 #define MLIR_CONVERSION_SPIRVTOLLVM_SPIRVTOLLVM_H
21 class LLVMTypeConverter;
25 template <
typename SPIRVOp>
40 LLVMTypeConverter &typeConverter,
41 spirv::ClientAPI clientAPIForAddressSpaceMapping =
42 spirv::ClientAPI::Unknown);
46 const LLVMTypeConverter &typeConverter, RewritePatternSet &patterns,
47 spirv::ClientAPI clientAPIForAddressSpaceMapping =
48 spirv::ClientAPI::Unknown);
53 const LLVMTypeConverter &typeConverter, RewritePatternSet &patterns);
57 const LLVMTypeConverter &typeConverter, RewritePatternSet &patterns);
const TypeConverter * typeConverter
An optional type converter for use by this pattern.
Conversion from types to the LLVM IR dialect.
MLIRContext is the top-level object for a collection of MLIR operations.
OpConversionPattern is a wrapper around ConversionPattern that allows for matching and rewriting agai...
This class represents the benefit of a pattern match in a unitless scheme that ranges from 0 (very li...
SPIRVToLLVMConversion(MLIRContext *context, const LLVMTypeConverter &typeConverter, PatternBenefit benefit=1)
Include the generated interface declarations.
void populateSPIRVToLLVMTypeConversion(LLVMTypeConverter &typeConverter, spirv::ClientAPI clientAPIForAddressSpaceMapping=spirv::ClientAPI::Unknown)
Populates type conversions with additional SPIR-V types.
void populateSPIRVToLLVMFunctionConversionPatterns(const LLVMTypeConverter &typeConverter, RewritePatternSet &patterns)
Populates the given list with patterns for function conversion from SPIR-V to LLVM.
void populateSPIRVToLLVMConversionPatterns(const LLVMTypeConverter &typeConverter, RewritePatternSet &patterns, spirv::ClientAPI clientAPIForAddressSpaceMapping=spirv::ClientAPI::Unknown)
Populates the given list with patterns that convert from SPIR-V to LLVM.
void encodeBindAttribute(ModuleOp module)
Encodes global variable's descriptor set and binding into its name if they both exist.
void populateSPIRVToLLVMModuleConversionPatterns(const LLVMTypeConverter &typeConverter, RewritePatternSet &patterns)
Populates the given patterns for module conversion from SPIR-V to LLVM.