[Mlir-commits] [llvm] [mlir] [MLIR] Add initial convert-memref-to-emitc pass (PR #85389)

Marius Brehler llvmlistbot at llvm.org
Mon Mar 18 02:18:00 PDT 2024


================
@@ -0,0 +1,29 @@
+//===- MemRefToEmitC.h - Convert MemRef to EmitC --------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+#ifndef MLIR_CONVERSION_MEMREFTOEMITC_MEMREFTOEMITC_H
+#define MLIR_CONVERSION_MEMREFTOEMITC_MEMREFTOEMITC_H
+
+#include "mlir/Pass/Pass.h"
+
+namespace mlir {
+class RewritePatternSet;
+class TypeConverter;
+
+#define GEN_PASS_DECL_CONVERTMEMREFTOEMITC
+#include "mlir/Conversion/Passes.h.inc"
----------------
marbre wrote:

It can be combined, however, several passes split it:
```
mlir/include/mlir/Conversion/ArithToEmitC/ArithToEmitC.h
mlir/include/mlir/Conversion/ArithToEmitC/ArithToEmitCPass.h
mlir/include/mlir/Conversion/ComplexToSPIRV/ComplexToSPIRV.h
mlir/include/mlir/Conversion/ComplexToSPIRV/ComplexToSPIRVPass.h
mlir/include/mlir/Conversion/ControlFlowToSPIRV/ControlFlowToSPIRV.h
mlir/include/mlir/Conversion/ControlFlowToSPIRV/ControlFlowToSPIRVPass.h
mlir/include/mlir/Conversion/FuncToEmitC/FuncToEmitC.h
mlir/include/mlir/Conversion/FuncToEmitC/FuncToEmitCPass.h
mlir/include/mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h
mlir/include/mlir/Conversion/FuncToLLVM/ConvertFuncToLLVMPass.h
mlir/include/mlir/Conversion/GPUToSPIRV/GPUToSPIRV.h
mlir/include/mlir/Conversion/GPUToSPIRV/GPUToSPIRVPass.h
mlir/include/mlir/Conversion/MathToSPIRV/MathToSPIRV.h
mlir/include/mlir/Conversion/MathToSPIRV/MathToSPIRVPass.h
mlir/include/mlir/Conversion/MemRefToSPIRV/MemRefToSPIRV.h
mlir/include/mlir/Conversion/MemRefToSPIRV/MemRefToSPIRVPass.h
mlir/include/mlir/Conversion/SCFToGPU/SCFToGPU.h
mlir/include/mlir/Conversion/SCFToGPU/SCFToGPUPass.h
mlir/include/mlir/Conversion/SCFToSPIRV/SCFToSPIRV.h
mlir/include/mlir/Conversion/SCFToSPIRV/SCFToSPIRVPass.h
mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVM.h
mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVMPass.h
mlir/include/mlir/Conversion/TensorToLinalg/TensorToLinalg.h
mlir/include/mlir/Conversion/TensorToLinalg/TensorToLinalgPass.h
mlir/include/mlir/Conversion/TensorToSPIRV/TensorToSPIRV.h
mlir/include/mlir/Conversion/TensorToSPIRV/TensorToSPIRVPass.h
mlir/include/mlir/Conversion/VectorToSPIRV/VectorToSPIRV.h
mlir/include/mlir/Conversion/VectorToSPIRV/VectorToSPIRVPass.h
mlir/include/mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h
mlir/include/mlir/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.h
```
Same for the cpp files. We split as we were asked to do so during the review for `FuncToEmitC`.

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


More information about the Mlir-commits mailing list