[MLIR][SPIRVToLLVM] Implementation of spv.func conversion, and return ops
This patch provides an implementation for `spv.func` conversion. The pattern is populated in a separate method added to the pass. At the moment, the type signature conversion only includes the supported types. The conversion pattern also matches SPIR-V function control attributes to LLVM function attributes. Those are modelled as `passthrough` attributes in LLVM dialect. The following mapping are used: - None: no attributes passed - Inline: `alwaysinline` seems to be the right equivalent (`inlinehint` is semantically weaker in my opinion) - DontInline: `noinline` - Pure and Const: I think those can be modelled as `readonly` and `readnone` attributes respectively. Also, 2 patterns added for return ops conversion (`spv.Return` for void return and `spv.ReturnValue` for a single value return). Differential Revision: https://reviews.llvm.org/D81931
Loading
Please sign in to comment