[Mlir-commits] [mlir] [mlir][spirv] Implement vector type legalization for function signatures (PR #98337)

Jakub Kuderski llvmlistbot at llvm.org
Fri Jul 12 11:51:15 PDT 2024


================
@@ -813,6 +860,250 @@ void mlir::populateBuiltinFuncToSPIRVPatterns(SPIRVTypeConverter &typeConverter,
   patterns.add<FuncOpConversion>(typeConverter, patterns.getContext());
 }
 
+//===----------------------------------------------------------------------===//
+// func::FuncOp Conversion Patterns
+//===----------------------------------------------------------------------===//
+
+namespace {
+/// A pattern for rewriting function signature to convert vector arguments of
+/// functions to be of valid types
+class FuncOpVectorUnroll : public OpRewritePattern<func::FuncOp> {
+public:
----------------
kuhar wrote:

```suggestion
struct FuncOpVectorUnroll final : OpRewritePattern<func::FuncOp> {
```

https://github.com/llvm/llvm-project/pull/98337


More information about the Mlir-commits mailing list