[Mlir-commits] [llvm] [mlir] Add missing dialects to C API (PR #82190)
Sergio Sánchez Ramírez
llvmlistbot at llvm.org
Mon Jul 29 05:49:47 PDT 2024
https://github.com/mofeing updated https://github.com/llvm/llvm-project/pull/82190
>From 7a6fad16da78f2844289423a7846e61582f2d026 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?=
<sergio.sanchez.ramirez+git at bsc.es>
Date: Sun, 18 Feb 2024 22:49:24 +0100
Subject: [PATCH 1/6] Add missing dialects to C API
---
mlir/include/mlir-c/Dialect/AMX.h | 25 ++++++++++++++++++++
mlir/include/mlir-c/Dialect/Affine.h | 25 ++++++++++++++++++++
mlir/include/mlir-c/Dialect/ArmNeon.h | 26 +++++++++++++++++++++
mlir/include/mlir-c/Dialect/ArmSME.h | 25 ++++++++++++++++++++
mlir/include/mlir-c/Dialect/ArmSVE.h | 25 ++++++++++++++++++++
mlir/include/mlir-c/Dialect/Bufferization.h | 25 ++++++++++++++++++++
mlir/include/mlir-c/Dialect/Complex.h | 25 ++++++++++++++++++++
mlir/include/mlir-c/Dialect/DLTI.h | 25 ++++++++++++++++++++
mlir/include/mlir-c/Dialect/EmitC.h | 25 ++++++++++++++++++++
mlir/include/mlir-c/Dialect/IRDL.h | 25 ++++++++++++++++++++
mlir/include/mlir-c/Dialect/Index.h | 25 ++++++++++++++++++++
mlir/include/mlir-c/Dialect/MPI.h | 25 ++++++++++++++++++++
mlir/include/mlir-c/Dialect/Mesh.h | 25 ++++++++++++++++++++
mlir/include/mlir-c/Dialect/OpenACC.h | 25 ++++++++++++++++++++
mlir/include/mlir-c/Dialect/PDLInterp.h | 25 ++++++++++++++++++++
mlir/include/mlir-c/Dialect/Tosa.h | 25 ++++++++++++++++++++
mlir/include/mlir-c/Dialect/UB.h | 25 ++++++++++++++++++++
mlir/include/mlir-c/Dialect/x86Vector.h | 25 ++++++++++++++++++++
18 files changed, 451 insertions(+)
create mode 100644 mlir/include/mlir-c/Dialect/AMX.h
create mode 100644 mlir/include/mlir-c/Dialect/Affine.h
create mode 100644 mlir/include/mlir-c/Dialect/ArmNeon.h
create mode 100644 mlir/include/mlir-c/Dialect/ArmSME.h
create mode 100644 mlir/include/mlir-c/Dialect/ArmSVE.h
create mode 100644 mlir/include/mlir-c/Dialect/Bufferization.h
create mode 100644 mlir/include/mlir-c/Dialect/Complex.h
create mode 100644 mlir/include/mlir-c/Dialect/DLTI.h
create mode 100644 mlir/include/mlir-c/Dialect/EmitC.h
create mode 100644 mlir/include/mlir-c/Dialect/IRDL.h
create mode 100644 mlir/include/mlir-c/Dialect/Index.h
create mode 100644 mlir/include/mlir-c/Dialect/MPI.h
create mode 100644 mlir/include/mlir-c/Dialect/Mesh.h
create mode 100644 mlir/include/mlir-c/Dialect/OpenACC.h
create mode 100644 mlir/include/mlir-c/Dialect/PDLInterp.h
create mode 100644 mlir/include/mlir-c/Dialect/Tosa.h
create mode 100644 mlir/include/mlir-c/Dialect/UB.h
create mode 100644 mlir/include/mlir-c/Dialect/x86Vector.h
diff --git a/mlir/include/mlir-c/Dialect/AMX.h b/mlir/include/mlir-c/Dialect/AMX.h
new file mode 100644
index 0000000000000..ac4695a107ae6
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/AMX.h
@@ -0,0 +1,25 @@
+//===-- mlir-c/Dialect/AMX.h - C API for AMX Dialect --------*- C -*-===//
+//
+// 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_C_DIALECT_AMX_H
+#define MLIR_C_DIALECT_AMX_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(AMX, amx);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_AMX_H
diff --git a/mlir/include/mlir-c/Dialect/Affine.h b/mlir/include/mlir-c/Dialect/Affine.h
new file mode 100644
index 0000000000000..0f4e010f91255
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/Affine.h
@@ -0,0 +1,25 @@
+//===-- mlir-c/Dialect/Affine.h - C API for Affine Dialect --------*- C -*-===//
+//
+// 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_C_DIALECT_AFFINE_H
+#define MLIR_C_DIALECT_AFFINE_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Affine, affine);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_AFFINE_H
diff --git a/mlir/include/mlir-c/Dialect/ArmNeon.h b/mlir/include/mlir-c/Dialect/ArmNeon.h
new file mode 100644
index 0000000000000..fdc859d9ff631
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/ArmNeon.h
@@ -0,0 +1,26 @@
+//===-- mlir-c/Dialect/ArmNeon.h - C API for ArmNeon Dialect --------*- C
+//-*-===//
+//
+// 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_C_DIALECT_ARMNEON_H
+#define MLIR_C_DIALECT_ARMNEON_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(ArmNeon, arm_neon);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_ARMNEON_H
diff --git a/mlir/include/mlir-c/Dialect/ArmSME.h b/mlir/include/mlir-c/Dialect/ArmSME.h
new file mode 100644
index 0000000000000..a27f38e5b65f4
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/ArmSME.h
@@ -0,0 +1,25 @@
+//===-- mlir-c/Dialect/ArmSME.h - C API for ArmSME Dialect --------*- C -*-===//
+//
+// 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_C_DIALECT_ARMSME_H
+#define MLIR_C_DIALECT_ARMSME_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(ArmSME, arm_sme);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_ARMSME_H
diff --git a/mlir/include/mlir-c/Dialect/ArmSVE.h b/mlir/include/mlir-c/Dialect/ArmSVE.h
new file mode 100644
index 0000000000000..8f5838c630446
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/ArmSVE.h
@@ -0,0 +1,25 @@
+//===-- mlir-c/Dialect/ArmSVE.h - C API for ArmSVE Dialect --------*- C -*-===//
+//
+// 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_C_DIALECT_ARMSME_H
+#define MLIR_C_DIALECT_ARMSME_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(ArmSVE, arm_sve);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_ARMSME_H
diff --git a/mlir/include/mlir-c/Dialect/Bufferization.h b/mlir/include/mlir-c/Dialect/Bufferization.h
new file mode 100644
index 0000000000000..76c2c16be53b2
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/Bufferization.h
@@ -0,0 +1,25 @@
+//===-- mlir-c/Dialect/Bufferization.h - C API for Bufferization Dialect --------*- C -*-===//
+//
+// 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_C_DIALECT_BUFFERIZATION_H
+#define MLIR_C_DIALECT_BUFFERIZATION_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Bufferization, bufferization);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_BUFFERIZATION_H
diff --git a/mlir/include/mlir-c/Dialect/Complex.h b/mlir/include/mlir-c/Dialect/Complex.h
new file mode 100644
index 0000000000000..75d6c50fc8c13
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/Complex.h
@@ -0,0 +1,25 @@
+//===-- mlir-c/Dialect/Complex.h - C API for Complex Dialect --------*- C -*-===//
+//
+// 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_C_DIALECT_COMPLEX_H
+#define MLIR_C_DIALECT_COMPLEX_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Complex, complex);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_COMPLEX_H
diff --git a/mlir/include/mlir-c/Dialect/DLTI.h b/mlir/include/mlir-c/Dialect/DLTI.h
new file mode 100644
index 0000000000000..d0f79d9c4bc6a
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/DLTI.h
@@ -0,0 +1,25 @@
+//===-- mlir-c/Dialect/DLTI.h - C API for DLTI Dialect --------*- C -*-===//
+//
+// 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_C_DIALECT_DLTI_H
+#define MLIR_C_DIALECT_DLTI_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(DLTI, dlti);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_DLTI_H
diff --git a/mlir/include/mlir-c/Dialect/EmitC.h b/mlir/include/mlir-c/Dialect/EmitC.h
new file mode 100644
index 0000000000000..3c38e7fb539bc
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/EmitC.h
@@ -0,0 +1,25 @@
+//===-- mlir-c/Dialect/EmitC.h - C API for EmitC Dialect --------*- C -*-===//
+//
+// 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_C_DIALECT_EMITC_H
+#define MLIR_C_DIALECT_EMITC_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(EmitC, emitc);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_EMITC_H
diff --git a/mlir/include/mlir-c/Dialect/IRDL.h b/mlir/include/mlir-c/Dialect/IRDL.h
new file mode 100644
index 0000000000000..30838b63355f5
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/IRDL.h
@@ -0,0 +1,25 @@
+//===-- mlir-c/Dialect/IRDL.h - C API for IRDL Dialect --------*- C -*-===//
+//
+// 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_C_DIALECT_IRDL_H
+#define MLIR_C_DIALECT_IRDL_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(IRDL, irdl);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_IRDL_H
diff --git a/mlir/include/mlir-c/Dialect/Index.h b/mlir/include/mlir-c/Dialect/Index.h
new file mode 100644
index 0000000000000..c75c37a29d7c6
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/Index.h
@@ -0,0 +1,25 @@
+//===-- mlir-c/Dialect/Index.h - C API for Index Dialect --------*- C -*-===//
+//
+// 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_C_DIALECT_INDEX_H
+#define MLIR_C_DIALECT_INDEX_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Index, index);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_INDEX_H
diff --git a/mlir/include/mlir-c/Dialect/MPI.h b/mlir/include/mlir-c/Dialect/MPI.h
new file mode 100644
index 0000000000000..c90c3db7bdcc6
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/MPI.h
@@ -0,0 +1,25 @@
+//===-- mlir-c/Dialect/MPI.h - C API for MPI Dialect --------*- C -*-===//
+//
+// 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_C_DIALECT_MPI_H
+#define MLIR_C_DIALECT_MPI_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(MPI, mpi);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_MPI_H
diff --git a/mlir/include/mlir-c/Dialect/Mesh.h b/mlir/include/mlir-c/Dialect/Mesh.h
new file mode 100644
index 0000000000000..7d00562e441c2
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/Mesh.h
@@ -0,0 +1,25 @@
+//===-- mlir-c/Dialect/Mesh.h - C API for Mesh Dialect --------*- C -*-===//
+//
+// 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_C_DIALECT_MESH_H
+#define MLIR_C_DIALECT_MESH_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Mesh, mesh);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_MESH_H
diff --git a/mlir/include/mlir-c/Dialect/OpenACC.h b/mlir/include/mlir-c/Dialect/OpenACC.h
new file mode 100644
index 0000000000000..c37e75d2a23da
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/OpenACC.h
@@ -0,0 +1,25 @@
+//===-- mlir-c/Dialect/OpenACC.h - C API for OpenACC Dialect --------*- C -*-===//
+//
+// 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_C_DIALECT_OPENACC_H
+#define MLIR_C_DIALECT_OPENACC_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(OpenACC, acc);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_OPENACC_H
diff --git a/mlir/include/mlir-c/Dialect/PDLInterp.h b/mlir/include/mlir-c/Dialect/PDLInterp.h
new file mode 100644
index 0000000000000..49a5a7a934a98
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/PDLInterp.h
@@ -0,0 +1,25 @@
+//===-- mlir-c/Dialect/PDLInterp.h - C API for PDLInterp Dialect --------*- C -*-===//
+//
+// 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_C_DIALECT_PDLINTERP_H
+#define MLIR_C_DIALECT_PDLINTERP_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(PDLInterp, pdl_interp);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_PDLINTERP_H
diff --git a/mlir/include/mlir-c/Dialect/Tosa.h b/mlir/include/mlir-c/Dialect/Tosa.h
new file mode 100644
index 0000000000000..b16a1d86c258a
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/Tosa.h
@@ -0,0 +1,25 @@
+//===-- mlir-c/Dialect/Tosa.h - C API for Tosa Dialect --------*- C -*-===//
+//
+// 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_C_DIALECT_TOSA_H
+#define MLIR_C_DIALECT_TOSA_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Tosa, tosa);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_TOSA_H
diff --git a/mlir/include/mlir-c/Dialect/UB.h b/mlir/include/mlir-c/Dialect/UB.h
new file mode 100644
index 0000000000000..e9d64348a1727
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/UB.h
@@ -0,0 +1,25 @@
+//===-- mlir-c/Dialect/UB.h - C API for UB Dialect --------*- C -*-===//
+//
+// 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_C_DIALECT_UB_H
+#define MLIR_C_DIALECT_UB_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(UB, ub);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_UB_H
diff --git a/mlir/include/mlir-c/Dialect/x86Vector.h b/mlir/include/mlir-c/Dialect/x86Vector.h
new file mode 100644
index 0000000000000..013e294b03200
--- /dev/null
+++ b/mlir/include/mlir-c/Dialect/x86Vector.h
@@ -0,0 +1,25 @@
+//===-- mlir-c/Dialect/x86Vector.h - C API for x86Vector Dialect --------*- C -*-===//
+//
+// 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_C_DIALECT_X86VECTOR_H
+#define MLIR_C_DIALECT_X86VECTOR_H
+
+#include "mlir-c/IR.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(x86Vector, x86vector);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // MLIR_C_DIALECT_X86VECTOR_H
>From d4b0c277b1923aad1263a3c8c7ddb1f306d5c449 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?=
<sergio.sanchez.ramirez+git at bsc.es>
Date: Sun, 18 Feb 2024 23:14:40 +0100
Subject: [PATCH 2/6] Format code
---
mlir/include/mlir-c/Dialect/Bufferization.h | 3 ++-
mlir/include/mlir-c/Dialect/Complex.h | 3 ++-
mlir/include/mlir-c/Dialect/OpenACC.h | 3 ++-
mlir/include/mlir-c/Dialect/PDLInterp.h | 3 ++-
mlir/include/mlir-c/Dialect/x86Vector.h | 3 ++-
5 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/mlir/include/mlir-c/Dialect/Bufferization.h b/mlir/include/mlir-c/Dialect/Bufferization.h
index 76c2c16be53b2..9c4ef19e5493d 100644
--- a/mlir/include/mlir-c/Dialect/Bufferization.h
+++ b/mlir/include/mlir-c/Dialect/Bufferization.h
@@ -1,4 +1,5 @@
-//===-- mlir-c/Dialect/Bufferization.h - C API for Bufferization Dialect --------*- C -*-===//
+//===-- mlir-c/Dialect/Bufferization.h - C API for Bufferization Dialect
+//--------*- C -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM
// Exceptions.
diff --git a/mlir/include/mlir-c/Dialect/Complex.h b/mlir/include/mlir-c/Dialect/Complex.h
index 75d6c50fc8c13..3a508cfcad75b 100644
--- a/mlir/include/mlir-c/Dialect/Complex.h
+++ b/mlir/include/mlir-c/Dialect/Complex.h
@@ -1,4 +1,5 @@
-//===-- mlir-c/Dialect/Complex.h - C API for Complex Dialect --------*- C -*-===//
+//===-- mlir-c/Dialect/Complex.h - C API for Complex Dialect --------*- C
+//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM
// Exceptions.
diff --git a/mlir/include/mlir-c/Dialect/OpenACC.h b/mlir/include/mlir-c/Dialect/OpenACC.h
index c37e75d2a23da..8ceb004b0f653 100644
--- a/mlir/include/mlir-c/Dialect/OpenACC.h
+++ b/mlir/include/mlir-c/Dialect/OpenACC.h
@@ -1,4 +1,5 @@
-//===-- mlir-c/Dialect/OpenACC.h - C API for OpenACC Dialect --------*- C -*-===//
+//===-- mlir-c/Dialect/OpenACC.h - C API for OpenACC Dialect --------*- C
+//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM
// Exceptions.
diff --git a/mlir/include/mlir-c/Dialect/PDLInterp.h b/mlir/include/mlir-c/Dialect/PDLInterp.h
index 49a5a7a934a98..7212196f0168b 100644
--- a/mlir/include/mlir-c/Dialect/PDLInterp.h
+++ b/mlir/include/mlir-c/Dialect/PDLInterp.h
@@ -1,4 +1,5 @@
-//===-- mlir-c/Dialect/PDLInterp.h - C API for PDLInterp Dialect --------*- C -*-===//
+//===-- mlir-c/Dialect/PDLInterp.h - C API for PDLInterp Dialect --------*- C
+//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM
// Exceptions.
diff --git a/mlir/include/mlir-c/Dialect/x86Vector.h b/mlir/include/mlir-c/Dialect/x86Vector.h
index 013e294b03200..c6fd893fdaf71 100644
--- a/mlir/include/mlir-c/Dialect/x86Vector.h
+++ b/mlir/include/mlir-c/Dialect/x86Vector.h
@@ -1,4 +1,5 @@
-//===-- mlir-c/Dialect/x86Vector.h - C API for x86Vector Dialect --------*- C -*-===//
+//===-- mlir-c/Dialect/x86Vector.h - C API for x86Vector Dialect --------*- C
+//-*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM
// Exceptions.
>From f00dc89b46c84bacb271100f2b73a8debfaf5d17 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?=
<sergio.sanchez.ramirez+git at bsc.es>
Date: Sun, 18 Feb 2024 23:40:18 +0100
Subject: [PATCH 3/6] Add pass support to C API
---
mlir/include/mlir-c/Dialect/AMDGPU.h | 2 ++
mlir/include/mlir-c/Dialect/Affine.h | 2 ++
mlir/include/mlir-c/Dialect/Arith.h | 2 ++
mlir/include/mlir-c/Dialect/ArmSME.h | 2 ++
mlir/include/mlir-c/Dialect/ArmSVE.h | 2 ++
mlir/include/mlir-c/Dialect/Bufferization.h | 2 ++
mlir/include/mlir-c/Dialect/EmitC.h | 2 ++
mlir/include/mlir-c/Dialect/Func.h | 2 ++
mlir/include/mlir-c/Dialect/LLVM.h | 2 ++
mlir/include/mlir-c/Dialect/MLProgram.h | 2 ++
mlir/include/mlir-c/Dialect/Math.h | 2 ++
mlir/include/mlir-c/Dialect/MemRef.h | 2 ++
mlir/include/mlir-c/Dialect/Mesh.h | 2 ++
mlir/include/mlir-c/Dialect/NVGPU.h | 2 ++
mlir/include/mlir-c/Dialect/OpenACC.h | 2 ++
mlir/include/mlir-c/Dialect/SCF.h | 2 ++
mlir/include/mlir-c/Dialect/SPIRV.h | 2 ++
mlir/include/mlir-c/Dialect/Shape.h | 2 ++
mlir/include/mlir-c/Dialect/Tensor.h | 2 ++
mlir/include/mlir-c/Dialect/Tosa.h | 2 ++
mlir/include/mlir-c/Dialect/Transform.h | 2 ++
mlir/include/mlir-c/Dialect/Vector.h | 2 ++
mlir/include/mlir/Dialect/AMDGPU/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/Affine/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/Arith/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/ArmSME/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/ArmSVE/Transforms/CMakeLists.txt | 2 ++
.../mlir/Dialect/Bufferization/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/EmitC/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/Func/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/LLVMIR/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/MLProgram/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/Math/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/MemRef/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/Mesh/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/OpenACC/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/SCF/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/SPIRV/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/Shape/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/Tensor/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/Transform/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/Vector/Transforms/CMakeLists.txt | 2 ++
43 files changed, 86 insertions(+)
diff --git a/mlir/include/mlir-c/Dialect/AMDGPU.h b/mlir/include/mlir-c/Dialect/AMDGPU.h
index 142044f7f3afe..5ba9225aaab7a 100644
--- a/mlir/include/mlir-c/Dialect/AMDGPU.h
+++ b/mlir/include/mlir-c/Dialect/AMDGPU.h
@@ -22,4 +22,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(AMDGPU, amdgpu);
}
#endif
+#include "mlir/Dialect/AMDGPU/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_AMDGPU_H
diff --git a/mlir/include/mlir-c/Dialect/Affine.h b/mlir/include/mlir-c/Dialect/Affine.h
index 0f4e010f91255..a5359c7ffc157 100644
--- a/mlir/include/mlir-c/Dialect/Affine.h
+++ b/mlir/include/mlir-c/Dialect/Affine.h
@@ -22,4 +22,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Affine, affine);
}
#endif
+#include "mlir/Dialect/Affine/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_AFFINE_H
diff --git a/mlir/include/mlir-c/Dialect/Arith.h b/mlir/include/mlir-c/Dialect/Arith.h
index 41e7cb2b3a34a..af2e7c2e69287 100644
--- a/mlir/include/mlir-c/Dialect/Arith.h
+++ b/mlir/include/mlir-c/Dialect/Arith.h
@@ -30,4 +30,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Arith, arith);
}
#endif
+#include "mlir/Dialect/Arith/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_ARITH_H
diff --git a/mlir/include/mlir-c/Dialect/ArmSME.h b/mlir/include/mlir-c/Dialect/ArmSME.h
index a27f38e5b65f4..e3c628f3a6df9 100644
--- a/mlir/include/mlir-c/Dialect/ArmSME.h
+++ b/mlir/include/mlir-c/Dialect/ArmSME.h
@@ -22,4 +22,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(ArmSME, arm_sme);
}
#endif
+#include "mlir/Dialect/ArmSME/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_ARMSME_H
diff --git a/mlir/include/mlir-c/Dialect/ArmSVE.h b/mlir/include/mlir-c/Dialect/ArmSVE.h
index 8f5838c630446..e9d63572c6fff 100644
--- a/mlir/include/mlir-c/Dialect/ArmSVE.h
+++ b/mlir/include/mlir-c/Dialect/ArmSVE.h
@@ -22,4 +22,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(ArmSVE, arm_sve);
}
#endif
+#include "mlir/Dialect/ArmSVE/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_ARMSME_H
diff --git a/mlir/include/mlir-c/Dialect/Bufferization.h b/mlir/include/mlir-c/Dialect/Bufferization.h
index 9c4ef19e5493d..1bdbd14603028 100644
--- a/mlir/include/mlir-c/Dialect/Bufferization.h
+++ b/mlir/include/mlir-c/Dialect/Bufferization.h
@@ -23,4 +23,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Bufferization, bufferization);
}
#endif
+#include "mlir/Dialect/Bufferization/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_BUFFERIZATION_H
diff --git a/mlir/include/mlir-c/Dialect/EmitC.h b/mlir/include/mlir-c/Dialect/EmitC.h
index 3c38e7fb539bc..2d5a6f3279233 100644
--- a/mlir/include/mlir-c/Dialect/EmitC.h
+++ b/mlir/include/mlir-c/Dialect/EmitC.h
@@ -22,4 +22,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(EmitC, emitc);
}
#endif
+#include "mlir/Dialect/EmitC/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_EMITC_H
diff --git a/mlir/include/mlir-c/Dialect/Func.h b/mlir/include/mlir-c/Dialect/Func.h
index 1df759f0e8e3f..92c11b024b2cf 100644
--- a/mlir/include/mlir-c/Dialect/Func.h
+++ b/mlir/include/mlir-c/Dialect/Func.h
@@ -39,4 +39,6 @@ MLIR_CAPI_EXPORTED void mlirFuncSetArgAttr(MlirOperation op, intptr_t pos,
}
#endif
+#include "mlir/Dialect/Func/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_FUNC_H
diff --git a/mlir/include/mlir-c/Dialect/LLVM.h b/mlir/include/mlir-c/Dialect/LLVM.h
index ac216b01f364d..0f9e79d0165fb 100644
--- a/mlir/include/mlir-c/Dialect/LLVM.h
+++ b/mlir/include/mlir-c/Dialect/LLVM.h
@@ -102,4 +102,6 @@ mlirLLVMStructTypeSetBody(MlirType structType, intptr_t nFieldTypes,
}
#endif
+#include "mlir/Dialect/LLVMIR/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_LLVM_H
diff --git a/mlir/include/mlir-c/Dialect/MLProgram.h b/mlir/include/mlir-c/Dialect/MLProgram.h
index 0874955e35b27..df3a1f28e6ac6 100644
--- a/mlir/include/mlir-c/Dialect/MLProgram.h
+++ b/mlir/include/mlir-c/Dialect/MLProgram.h
@@ -22,4 +22,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(MLProgram, ml_program);
}
#endif
+#include "mlir/Dialect/MLProgram/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_MLPROGRAM_H
diff --git a/mlir/include/mlir-c/Dialect/Math.h b/mlir/include/mlir-c/Dialect/Math.h
index 5269e1a1b2cb0..5dd975f1a86a4 100644
--- a/mlir/include/mlir-c/Dialect/Math.h
+++ b/mlir/include/mlir-c/Dialect/Math.h
@@ -30,4 +30,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Math, math);
}
#endif
+#include "mlir/Dialect/Math/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_MATH_H
diff --git a/mlir/include/mlir-c/Dialect/MemRef.h b/mlir/include/mlir-c/Dialect/MemRef.h
index 087a4b3f85b1d..327fe25143f8e 100644
--- a/mlir/include/mlir-c/Dialect/MemRef.h
+++ b/mlir/include/mlir-c/Dialect/MemRef.h
@@ -30,4 +30,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(MemRef, memref);
}
#endif
+#include "mlir/Dialect/MemRef/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_MEMREF_H
diff --git a/mlir/include/mlir-c/Dialect/Mesh.h b/mlir/include/mlir-c/Dialect/Mesh.h
index 7d00562e441c2..71920144d1c3b 100644
--- a/mlir/include/mlir-c/Dialect/Mesh.h
+++ b/mlir/include/mlir-c/Dialect/Mesh.h
@@ -22,4 +22,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Mesh, mesh);
}
#endif
+#include "mlir/Dialect/Mesh/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_MESH_H
diff --git a/mlir/include/mlir-c/Dialect/NVGPU.h b/mlir/include/mlir-c/Dialect/NVGPU.h
index 580d566794c09..3137735aadbbf 100644
--- a/mlir/include/mlir-c/Dialect/NVGPU.h
+++ b/mlir/include/mlir-c/Dialect/NVGPU.h
@@ -22,4 +22,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(NVGPU, nvgpu);
}
#endif
+#include "mlir/Dialect/NVGPU/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_NVGPU_H
diff --git a/mlir/include/mlir-c/Dialect/OpenACC.h b/mlir/include/mlir-c/Dialect/OpenACC.h
index 8ceb004b0f653..d552b8561b8d2 100644
--- a/mlir/include/mlir-c/Dialect/OpenACC.h
+++ b/mlir/include/mlir-c/Dialect/OpenACC.h
@@ -23,4 +23,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(OpenACC, acc);
}
#endif
+#include "mlir/Dialect/OpenACC/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_OPENACC_H
diff --git a/mlir/include/mlir-c/Dialect/SCF.h b/mlir/include/mlir-c/Dialect/SCF.h
index 75f1b6839a21d..4d536b004f5ee 100644
--- a/mlir/include/mlir-c/Dialect/SCF.h
+++ b/mlir/include/mlir-c/Dialect/SCF.h
@@ -22,4 +22,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(SCF, scf);
}
#endif
+#include "mlir/Dialect/SCF/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_SCF_H
diff --git a/mlir/include/mlir-c/Dialect/SPIRV.h b/mlir/include/mlir-c/Dialect/SPIRV.h
index f22708c9db043..8b3af0f39b8b8 100644
--- a/mlir/include/mlir-c/Dialect/SPIRV.h
+++ b/mlir/include/mlir-c/Dialect/SPIRV.h
@@ -23,4 +23,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(SPIRV, spirv);
}
#endif
+#include "mlir/Dialect/SPIRV/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_SPIRV_H
diff --git a/mlir/include/mlir-c/Dialect/Shape.h b/mlir/include/mlir-c/Dialect/Shape.h
index 3fe3ddf5c578d..5681fdf8cbe4c 100644
--- a/mlir/include/mlir-c/Dialect/Shape.h
+++ b/mlir/include/mlir-c/Dialect/Shape.h
@@ -22,4 +22,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Shape, shape);
}
#endif
+#include "mlir/Dialect/Shape/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_SHAPE_H
diff --git a/mlir/include/mlir-c/Dialect/Tensor.h b/mlir/include/mlir-c/Dialect/Tensor.h
index 74cbc5a6f0fe1..6fb52fa00177c 100644
--- a/mlir/include/mlir-c/Dialect/Tensor.h
+++ b/mlir/include/mlir-c/Dialect/Tensor.h
@@ -22,4 +22,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Tensor, tensor);
}
#endif
+#include "mlir/Dialect/Tensor/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_TENSOR_H
diff --git a/mlir/include/mlir-c/Dialect/Tosa.h b/mlir/include/mlir-c/Dialect/Tosa.h
index b16a1d86c258a..8550f47ee0bbf 100644
--- a/mlir/include/mlir-c/Dialect/Tosa.h
+++ b/mlir/include/mlir-c/Dialect/Tosa.h
@@ -22,4 +22,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Tosa, tosa);
}
#endif
+#include "mlir/Dialect/Tosa/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_TOSA_H
diff --git a/mlir/include/mlir-c/Dialect/Transform.h b/mlir/include/mlir-c/Dialect/Transform.h
index 02c99b5921882..f5a02aba9e2be 100644
--- a/mlir/include/mlir-c/Dialect/Transform.h
+++ b/mlir/include/mlir-c/Dialect/Transform.h
@@ -80,4 +80,6 @@ MLIR_CAPI_EXPORTED MlirType mlirTransformParamTypeGetType(MlirType type);
}
#endif
+#include "mlir/Dialect/Transform/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_TRANSFORM_H
diff --git a/mlir/include/mlir-c/Dialect/Vector.h b/mlir/include/mlir-c/Dialect/Vector.h
index 6256c82d172ce..0afb93b0d175e 100644
--- a/mlir/include/mlir-c/Dialect/Vector.h
+++ b/mlir/include/mlir-c/Dialect/Vector.h
@@ -30,4 +30,6 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Vector, vector);
}
#endif
+#include "mlir/Dialect/Vector/Transforms/Passes.capi.h.inc"
+
#endif // MLIR_C_DIALECT_VECTOR_H
diff --git a/mlir/include/mlir/Dialect/AMDGPU/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/AMDGPU/Transforms/CMakeLists.txt
index 8880989f4fed4..3710ed9836384 100644
--- a/mlir/include/mlir/Dialect/AMDGPU/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/AMDGPU/Transforms/CMakeLists.txt
@@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name AMDGPU)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix AMDGPU)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix AMDGPU)
add_public_tablegen_target(MLIRAMDGPUTransformsIncGen)
add_dependencies(mlir-headers MLIRAMDGPUTransformsIncGen)
diff --git a/mlir/include/mlir/Dialect/Affine/CMakeLists.txt b/mlir/include/mlir/Dialect/Affine/CMakeLists.txt
index fe1b372f6e03d..6b1c81b00a3a5 100644
--- a/mlir/include/mlir/Dialect/Affine/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/Affine/CMakeLists.txt
@@ -3,6 +3,8 @@ add_subdirectory(TransformOps)
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name Affine)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix Affine)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Affine)
add_public_tablegen_target(MLIRAffinePassIncGen)
add_mlir_doc(Passes AffinePasses ./ -gen-pass-doc)
diff --git a/mlir/include/mlir/Dialect/Arith/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/Arith/Transforms/CMakeLists.txt
index 3f39e403adf12..e69dba2d03f46 100644
--- a/mlir/include/mlir/Dialect/Arith/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/Arith/Transforms/CMakeLists.txt
@@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name Arith)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix Arith)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Arith)
add_public_tablegen_target(MLIRArithTransformsIncGen)
add_mlir_doc(Passes ArithPasses ./ -gen-pass-doc)
diff --git a/mlir/include/mlir/Dialect/ArmSME/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/ArmSME/Transforms/CMakeLists.txt
index 509f3fc2519cb..c274d1c0c701a 100644
--- a/mlir/include/mlir/Dialect/ArmSME/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/ArmSME/Transforms/CMakeLists.txt
@@ -2,6 +2,8 @@ set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name ArmSME)
mlir_tablegen(PassesEnums.h.inc -gen-enum-decls)
mlir_tablegen(PassesEnums.cpp.inc -gen-enum-defs)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix ArmSME)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix ArmSME)
add_public_tablegen_target(MLIRArmSMETransformsIncGen)
add_dependencies(mlir-headers MLIRArmSMETransformsIncGen)
diff --git a/mlir/include/mlir/Dialect/ArmSVE/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/ArmSVE/Transforms/CMakeLists.txt
index 7226642daf861..3a53c1f8fa03f 100644
--- a/mlir/include/mlir/Dialect/ArmSVE/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/ArmSVE/Transforms/CMakeLists.txt
@@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name ArmSVE)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix ArmSVE)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix ArmSVE)
add_public_tablegen_target(MLIRArmSVEPassIncGen)
add_mlir_doc(Passes ArmSVEPasses ./ -gen-pass-doc)
diff --git a/mlir/include/mlir/Dialect/Bufferization/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/Bufferization/Transforms/CMakeLists.txt
index dcae4b8f26b89..ac370db266206 100644
--- a/mlir/include/mlir/Dialect/Bufferization/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/Bufferization/Transforms/CMakeLists.txt
@@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name Bufferization)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix Bufferization)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Bufferization)
add_public_tablegen_target(MLIRBufferizationPassIncGen)
add_dependencies(mlir-headers MLIRBufferizationPassIncGen)
diff --git a/mlir/include/mlir/Dialect/EmitC/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/EmitC/Transforms/CMakeLists.txt
index 0b507d75fa07a..2873d54452c15 100644
--- a/mlir/include/mlir/Dialect/EmitC/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/EmitC/Transforms/CMakeLists.txt
@@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name EmitC)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix EmitC)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix EmitC)
add_public_tablegen_target(MLIREmitCTransformsIncGen)
add_mlir_doc(Passes EmitCPasses ./ -gen-pass-doc)
diff --git a/mlir/include/mlir/Dialect/Func/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/Func/Transforms/CMakeLists.txt
index 33c72e3c075cc..a5c36e0f9ffe9 100644
--- a/mlir/include/mlir/Dialect/Func/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/Func/Transforms/CMakeLists.txt
@@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name Func)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix Func)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Func)
add_public_tablegen_target(MLIRFuncTransformsIncGen)
add_mlir_doc(Passes FuncPasses ./ -gen-pass-doc)
diff --git a/mlir/include/mlir/Dialect/LLVMIR/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/LLVMIR/Transforms/CMakeLists.txt
index becae6a95393a..45ace5ef48846 100644
--- a/mlir/include/mlir/Dialect/LLVMIR/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/LLVMIR/Transforms/CMakeLists.txt
@@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name LLVM)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix LLVM)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix LLVM)
add_public_tablegen_target(MLIRLLVMPassIncGen)
add_mlir_doc(Passes LLVMPasses ./ -gen-pass-doc)
diff --git a/mlir/include/mlir/Dialect/MLProgram/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/MLProgram/Transforms/CMakeLists.txt
index c5c11f17a9fa9..50134a907af56 100644
--- a/mlir/include/mlir/Dialect/MLProgram/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/MLProgram/Transforms/CMakeLists.txt
@@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name MLProgram)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix MLProgram)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix MLProgram)
add_public_tablegen_target(MLIRMLProgramPassIncGen)
add_dependencies(mlir-headers MLIRMLProgramPassIncGen)
diff --git a/mlir/include/mlir/Dialect/Math/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/Math/Transforms/CMakeLists.txt
index a37f069da46b0..01523f2048dc2 100644
--- a/mlir/include/mlir/Dialect/Math/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/Math/Transforms/CMakeLists.txt
@@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name Math)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix Math)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Math)
add_public_tablegen_target(MLIRMathTransformsIncGen)
add_mlir_doc(Passes MathPasses ./ -gen-pass-doc)
diff --git a/mlir/include/mlir/Dialect/MemRef/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/MemRef/Transforms/CMakeLists.txt
index 6f868f7be1b20..35a06536a8d28 100644
--- a/mlir/include/mlir/Dialect/MemRef/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/MemRef/Transforms/CMakeLists.txt
@@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name MemRef)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix MemRef)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix MemRef)
add_public_tablegen_target(MLIRMemRefPassIncGen)
add_dependencies(mlir-headers MLIRMemRefPassIncGen)
diff --git a/mlir/include/mlir/Dialect/Mesh/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/Mesh/Transforms/CMakeLists.txt
index 8d768485103b6..c0e178589b332 100644
--- a/mlir/include/mlir/Dialect/Mesh/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/Mesh/Transforms/CMakeLists.txt
@@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name Mesh)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix Mesh)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Mesh)
add_public_tablegen_target(MLIRMeshPassIncGen)
add_dependencies(mlir-headers MLIRMeshPassIncGen)
diff --git a/mlir/include/mlir/Dialect/OpenACC/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/OpenACC/Transforms/CMakeLists.txt
index ddbd5839576fc..9cf2f3045fc0f 100644
--- a/mlir/include/mlir/Dialect/OpenACC/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/OpenACC/Transforms/CMakeLists.txt
@@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name OpenACC)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix OpenACC)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix OpenACC)
add_public_tablegen_target(MLIROpenACCPassIncGen)
add_mlir_doc(Passes OpenACCPasses ./ -gen-pass-doc)
diff --git a/mlir/include/mlir/Dialect/SCF/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/SCF/Transforms/CMakeLists.txt
index 1192badea78e4..9df0dd7d108aa 100644
--- a/mlir/include/mlir/Dialect/SCF/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/SCF/Transforms/CMakeLists.txt
@@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name SCF)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix SCF)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix SCF)
add_public_tablegen_target(MLIRSCFPassIncGen)
add_dependencies(mlir-headers MLIRSCFPassIncGen)
diff --git a/mlir/include/mlir/Dialect/SPIRV/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/SPIRV/Transforms/CMakeLists.txt
index 045942091e952..c5a74ce23bda1 100644
--- a/mlir/include/mlir/Dialect/SPIRV/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/SPIRV/Transforms/CMakeLists.txt
@@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name SPIRV)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix SPIRV)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix SPIRV)
add_public_tablegen_target(MLIRSPIRVPassIncGen)
add_dependencies(mlir-headers MLIRSPIRVPassIncGen)
diff --git a/mlir/include/mlir/Dialect/Shape/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/Shape/Transforms/CMakeLists.txt
index 83a500d7b0ada..81c0a2e7b7998 100644
--- a/mlir/include/mlir/Dialect/Shape/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/Shape/Transforms/CMakeLists.txt
@@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name Shape)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix Shape)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Shape)
add_public_tablegen_target(MLIRShapeTransformsIncGen)
add_mlir_doc(Passes ShapePasses ./ -gen-pass-doc)
diff --git a/mlir/include/mlir/Dialect/Tensor/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/Tensor/Transforms/CMakeLists.txt
index b312cee099305..2f3f7854164c5 100644
--- a/mlir/include/mlir/Dialect/Tensor/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/Tensor/Transforms/CMakeLists.txt
@@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name Tensor)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix Tensor)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Tensor)
add_public_tablegen_target(MLIRTensorTransformsIncGen)
add_mlir_doc(Passes TensorPasses ./ -gen-pass-doc)
diff --git a/mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt
index d4e2661838314..d50074c1b8a5d 100644
--- a/mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt
@@ -2,6 +2,8 @@ set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name TosaOpt)
mlir_tablegen(PassesEnums.h.inc -gen-enum-decls)
mlir_tablegen(PassesEnums.cpp.inc -gen-enum-defs)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix Tosa)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Tosa)
add_public_tablegen_target(MLIRTosaPassIncGen)
add_dependencies(mlir-headers MLIRTosaPassIncGen)
diff --git a/mlir/include/mlir/Dialect/Transform/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/Transform/Transforms/CMakeLists.txt
index 3a399e6e0513e..a2f991735c612 100644
--- a/mlir/include/mlir/Dialect/Transform/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/Transform/Transforms/CMakeLists.txt
@@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name Transform)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix Transform)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Transform)
add_public_tablegen_target(MLIRTransformDialectTransformsIncGen)
add_mlir_doc(Passes TransformPasses ./ -gen-pass-doc)
diff --git a/mlir/include/mlir/Dialect/Vector/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/Vector/Transforms/CMakeLists.txt
index 2c288fe3b77fa..2808e7fb98fba 100644
--- a/mlir/include/mlir/Dialect/Vector/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/Vector/Transforms/CMakeLists.txt
@@ -4,6 +4,8 @@ mlir_tablegen(VectorTransformsEnums.cpp.inc -gen-enum-defs)
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name Vector)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix Vector)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Vector)
add_public_tablegen_target(MLIRVectorTransformsIncGen)
add_mlir_doc(Passes VectorPasses ./ -gen-pass-doc)
>From 4bd413dc71d7f1ad6448f6fd43399a68a9cf79fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?=
<sergio.sanchez.ramirez+git at bsc.es>
Date: Mon, 19 Feb 2024 00:22:28 +0100
Subject: [PATCH 4/6] Add PassesEnums
---
mlir/include/mlir/Dialect/ArmSME/Transforms/CMakeLists.txt | 2 ++
mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt | 2 ++
2 files changed, 4 insertions(+)
diff --git a/mlir/include/mlir/Dialect/ArmSME/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/ArmSME/Transforms/CMakeLists.txt
index c274d1c0c701a..e680db7ebb66f 100644
--- a/mlir/include/mlir/Dialect/ArmSME/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/ArmSME/Transforms/CMakeLists.txt
@@ -4,6 +4,8 @@ mlir_tablegen(PassesEnums.h.inc -gen-enum-decls)
mlir_tablegen(PassesEnums.cpp.inc -gen-enum-defs)
mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix ArmSME)
mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix ArmSME)
+mlir_tablegen(PassesEnums.h.inc -gen-enum-decls -gen-pass-capi-header --prefix ArmSME)
+mlir_tablegen(PassesEnums.cpp.inc -gen-enum-defs -gen-pass-capi-impl --prefix ArmSME)
add_public_tablegen_target(MLIRArmSMETransformsIncGen)
add_dependencies(mlir-headers MLIRArmSMETransformsIncGen)
diff --git a/mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt
index d50074c1b8a5d..ba91ee4f99be2 100644
--- a/mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt
@@ -4,6 +4,8 @@ mlir_tablegen(PassesEnums.h.inc -gen-enum-decls)
mlir_tablegen(PassesEnums.cpp.inc -gen-enum-defs)
mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix Tosa)
mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Tosa)
+mlir_tablegen(PassesEnums.capi.h.inc -gen-enum-decls -gen-pass-capi-header --prefix Tosa)
+mlir_tablegen(PassesEnums.capi.cpp.inc -gen-enum-defs -gen-pass-capi-impl --prefix Tosa)
add_public_tablegen_target(MLIRTosaPassIncGen)
add_dependencies(mlir-headers MLIRTosaPassIncGen)
>From ca92d728f5b7d4427a0c81a7070835da2588353d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?=
<15837247+mofeing at users.noreply.github.com>
Date: Mon, 19 Feb 2024 14:42:44 +0100
Subject: [PATCH 5/6] Rename `TosaOpt` to `Tosa`
---
mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt
index ba91ee4f99be2..e7df5fcb4bf8b 100644
--- a/mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt
@@ -2,10 +2,10 @@ set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name TosaOpt)
mlir_tablegen(PassesEnums.h.inc -gen-enum-decls)
mlir_tablegen(PassesEnums.cpp.inc -gen-enum-defs)
-mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix Tosa)
-mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Tosa)
-mlir_tablegen(PassesEnums.capi.h.inc -gen-enum-decls -gen-pass-capi-header --prefix Tosa)
-mlir_tablegen(PassesEnums.capi.cpp.inc -gen-enum-defs -gen-pass-capi-impl --prefix Tosa)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix TosaOpt)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix TosaOpt)
+mlir_tablegen(PassesEnums.capi.h.inc -gen-enum-decls -gen-pass-capi-header --prefix TosaOpt)
+mlir_tablegen(PassesEnums.capi.cpp.inc -gen-enum-defs -gen-pass-capi-impl --prefix TosaOpt)
add_public_tablegen_target(MLIRTosaPassIncGen)
add_dependencies(mlir-headers MLIRTosaPassIncGen)
>From cbdc3bb0106cfa427ae763edd34059f1d1a60777 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergio=20S=C3=A1nchez=20Ram=C3=ADrez?=
<sergio.sanchez.ramirez+git at bsc.es>
Date: Mon, 19 Feb 2024 14:49:08 +0100
Subject: [PATCH 6/6] Rename `TosaOpt` to `Tosa`
---
.../mlir/Dialect/Tosa/Transforms/CMakeLists.txt | 10 +++++-----
mlir/include/mlir/InitAllPasses.h | 2 +-
utils/bazel/llvm-project-overlay/mlir/BUILD.bazel | 6 +++---
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt b/mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt
index e7df5fcb4bf8b..53d7995267d9f 100644
--- a/mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt
+++ b/mlir/include/mlir/Dialect/Tosa/Transforms/CMakeLists.txt
@@ -1,11 +1,11 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
-mlir_tablegen(Passes.h.inc -gen-pass-decls -name TosaOpt)
+mlir_tablegen(Passes.h.inc -gen-pass-decls -name Tosa)
mlir_tablegen(PassesEnums.h.inc -gen-enum-decls)
mlir_tablegen(PassesEnums.cpp.inc -gen-enum-defs)
-mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix TosaOpt)
-mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix TosaOpt)
-mlir_tablegen(PassesEnums.capi.h.inc -gen-enum-decls -gen-pass-capi-header --prefix TosaOpt)
-mlir_tablegen(PassesEnums.capi.cpp.inc -gen-enum-defs -gen-pass-capi-impl --prefix TosaOpt)
+mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix Tosa)
+mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Tosa)
+mlir_tablegen(PassesEnums.capi.h.inc -gen-enum-decls -gen-pass-capi-header --prefix Tosa)
+mlir_tablegen(PassesEnums.capi.cpp.inc -gen-enum-defs -gen-pass-capi-impl --prefix Tosa)
add_public_tablegen_target(MLIRTosaPassIncGen)
add_dependencies(mlir-headers MLIRTosaPassIncGen)
diff --git a/mlir/include/mlir/InitAllPasses.h b/mlir/include/mlir/InitAllPasses.h
index e28921619fe58..613cd7676d027 100644
--- a/mlir/include/mlir/InitAllPasses.h
+++ b/mlir/include/mlir/InitAllPasses.h
@@ -85,7 +85,7 @@ inline void registerAllPasses() {
registerShapePasses();
spirv::registerSPIRVPasses();
tensor::registerTensorPasses();
- tosa::registerTosaOptPasses();
+ tosa::registerTosaPasses();
transform::registerTransformPasses();
vector::registerVectorPasses();
arm_sme::registerArmSMEPasses();
diff --git a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
index a21bc01aa1e3c..9b14009a0f157 100644
--- a/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
@@ -11533,21 +11533,21 @@ gentbl_cc_library(
(
[
"-gen-pass-decls",
- "-name=TosaOpt",
+ "-name=Tosa",
],
"include/mlir/Dialect/Tosa/Transforms/Passes.h.inc",
),
(
[
"-gen-enum-decls",
- "-name=TosaOpt",
+ "-name=Tosa",
],
"include/mlir/Dialect/Tosa/Transforms/PassesEnums.h.inc",
),
(
[
"-gen-enum-defs",
- "-name=TosaOpt",
+ "-name=Tosa",
],
"include/mlir/Dialect/Tosa/Transforms/PassesEnums.cpp.inc",
),
More information about the Mlir-commits
mailing list