[MLIR] Add missing dialects to C API (#82190)

We are trying to make a wrapper of MLIR for Julia in
https://github.com/JuliaLabs/MLIR.jl, but some dialects are missing in
`libMLIR-C`. This PR adds them.
This commit is contained in:
Sergio Sánchez Ramírez 2026-01-07 21:51:33 +01:00 committed by GitHub
parent 7bbaf2e16b
commit 0d23e3f71f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
129 changed files with 1835 additions and 175 deletions

View File

@ -22,7 +22,7 @@
#include "flang/Optimizer/OpenMP/Support/RegisterOpenMPExtensions.h"
#include "mlir/Conversion/Passes.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
#include "mlir/Dialect/Affine/Passes.h"
#include "mlir/Dialect/Affine/Transforms/Passes.h"
#include "mlir/Dialect/Complex/IR/Complex.h"
#include "mlir/Dialect/ControlFlow/IR/ControlFlow.h"
#include "mlir/Dialect/DLTI/DLTI.h"

View File

@ -20,7 +20,7 @@
#include "toy/Parser.h"
#include "toy/Passes.h"
#include "mlir/Dialect/Affine/Passes.h"
#include "mlir/Dialect/Affine/Transforms/Passes.h"
#include "mlir/IR/AsmState.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/MLIRContext.h"

View File

@ -21,7 +21,7 @@
#include "toy/Parser.h"
#include "toy/Passes.h"
#include "mlir/Dialect/Affine/Passes.h"
#include "mlir/Dialect/Affine/Transforms/Passes.h"
#include "mlir/Dialect/LLVMIR/Transforms/Passes.h"
#include "mlir/ExecutionEngine/ExecutionEngine.h"
#include "mlir/ExecutionEngine/OptUtils.h"

View File

@ -21,7 +21,7 @@
#include "toy/Parser.h"
#include "toy/Passes.h"
#include "mlir/Dialect/Affine/Passes.h"
#include "mlir/Dialect/Affine/Transforms/Passes.h"
#include "mlir/Dialect/LLVMIR/Transforms/Passes.h"
#include "mlir/ExecutionEngine/ExecutionEngine.h"
#include "mlir/ExecutionEngine/OptUtils.h"

View File

@ -61,4 +61,6 @@ MLIR_CAPI_EXPORTED MlirStringRef mlirAMDGPUTDMGatherBaseTypeGetName(void);
}
#endif
#include "mlir/Dialect/AMDGPU/Transforms/Passes.capi.h.inc"
#endif // MLIR_C_DIALECT_AMDGPU_H

View File

@ -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

View File

@ -0,0 +1,27 @@
//===-- 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
#include "mlir/Dialect/Affine/Transforms/Passes.capi.h.inc"
#endif // MLIR_C_DIALECT_AFFINE_H

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,27 @@
//===-- 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
#include "mlir/Dialect/ArmSME/Transforms/Passes.capi.h.inc"
#endif // MLIR_C_DIALECT_ARMSME_H

View File

@ -0,0 +1,27 @@
//===-- 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
#include "mlir/Dialect/ArmSVE/Transforms/Passes.capi.h.inc"
#endif // MLIR_C_DIALECT_ARMSME_H

View File

@ -0,0 +1,28 @@
//===-- 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
#include "mlir/Dialect/Bufferization/Transforms/Passes.capi.h.inc"
#endif // MLIR_C_DIALECT_BUFFERIZATION_H

View File

@ -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

View File

@ -152,4 +152,6 @@ MLIR_CAPI_EXPORTED MlirTypeID mlirEmitCOpaqueAttrGetTypeID(void);
}
#endif
#include "mlir/Dialect/EmitC/Transforms/Passes.capi.h.inc"
#endif // MLIR_C_DIALECT_EmitC_H

View File

@ -43,4 +43,6 @@ MLIR_CAPI_EXPORTED void mlirFuncSetResultAttr(MlirOperation op, intptr_t pos,
}
#endif
#include "mlir/Dialect/Func/Transforms/Passes.capi.h.inc"
#endif // MLIR_C_DIALECT_FUNC_H

View File

@ -451,4 +451,6 @@ mlirLLVMDIModuleAttrGetScope(MlirAttribute diModule);
}
#endif
#include "mlir/Dialect/LLVMIR/Transforms/Passes.capi.h.inc"
#endif // MLIR_C_DIALECT_LLVM_H

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -35,4 +35,6 @@ MLIR_CAPI_EXPORTED MlirStringRef mlirNVGPUTensorMapDescriptorTypeGetName(void);
}
#endif
#include "mlir/Dialect/NVGPU/Transforms/Passes.capi.h.inc"
#endif // MLIR_C_DIALECT_NVGPU_H

View File

@ -0,0 +1,28 @@
//===-- 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
#include "mlir/Dialect/OpenACC/Transforms/Passes.capi.h.inc"
#endif // MLIR_C_DIALECT_OPENACC_H

View File

@ -0,0 +1,26 @@
//===-- 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

View File

@ -0,0 +1,25 @@
//===-- mlir-c/Dialect/Ptr.h - C API for Ptr 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_PTR_H
#define MLIR_C_DIALECT_PTR_H
#include "mlir-c/IR.h"
#ifdef __cplusplus
extern "C" {
#endif
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Ptr, ptr);
#ifdef __cplusplus
}
#endif
#endif // MLIR_C_DIALECT_PTR_H

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,27 @@
//===-- mlir-c/Dialect/Shard.h - C API for Shard 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_SHARD_H
#define MLIR_C_DIALECT_SHARD_H
#include "mlir-c/IR.h"
#ifdef __cplusplus
extern "C" {
#endif
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Shard, shard);
#ifdef __cplusplus
}
#endif
#include "mlir/Dialect/Shard/Transforms/Passes.capi.h.inc"
#endif // MLIR_C_DIALECT_SHARD_H

View File

@ -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

View File

@ -0,0 +1,27 @@
//===-- 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
#include "mlir/Dialect/Tosa/Transforms/Passes.capi.h.inc"
#endif // MLIR_C_DIALECT_TOSA_H

View File

@ -90,4 +90,6 @@ MLIR_CAPI_EXPORTED MlirType mlirTransformParamTypeGetType(MlirType type);
}
#endif
#include "mlir/Dialect/Transform/Transforms/Passes.capi.h.inc"
#endif // MLIR_C_DIALECT_TRANSFORM_H

View File

@ -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

View File

@ -0,0 +1,25 @@
//===-- mlir-c/Dialect/VCIX.h - C API for VCIX 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_VCIX_H
#define MLIR_C_DIALECT_VCIX_H
#include "mlir-c/IR.h"
#ifdef __cplusplus
extern "C" {
#endif
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(VCIX, vcix);
#ifdef __cplusplus
}
#endif
#endif // MLIR_C_DIALECT_VCIX_H

View File

@ -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

View File

@ -0,0 +1,25 @@
//===-- mlir-c/Dialect/WasmSSA.h - C API for WasmSSA 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_WASMSSA_H
#define MLIR_C_DIALECT_WASMSSA_H
#include "mlir-c/IR.h"
#ifdef __cplusplus
extern "C" {
#endif
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(WasmSSA, wasmssa);
#ifdef __cplusplus
}
#endif
#endif // MLIR_C_DIALECT_WASMSSA_H

View File

@ -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

View File

@ -0,0 +1,25 @@
//===-- mlir-c/Dialect/XeGPU.h - C API for XeGPU 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_XEGPU_H
#define MLIR_C_DIALECT_XEGPU_H
#include "mlir-c/IR.h"
#ifdef __cplusplus
extern "C" {
#endif
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(XeGPU, xegpu);
#ifdef __cplusplus
}
#endif
#endif // MLIR_C_DIALECT_XEGPU_H

View File

@ -0,0 +1,25 @@
//===-- mlir-c/Dialect/XeVM.h - C API for XeVM 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_XeVM_H
#define MLIR_C_DIALECT_XeVM_H
#include "mlir-c/IR.h"
#ifdef __cplusplus
extern "C" {
#endif
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(XeVM, xevm);
#ifdef __cplusplus
}
#endif
#endif // MLIR_C_DIALECT_XeVM_H

View File

@ -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_mlir_dialect_tablegen_target(MLIRAMDGPUTransformsIncGen)
add_mlir_doc(Passes AMDGPUPasses ./ -gen-pass-doc)

View File

@ -1,8 +1,3 @@
add_subdirectory(IR)
add_subdirectory(Transforms)
add_subdirectory(TransformOps)
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name Affine)
add_mlir_dialect_tablegen_target(MLIRAffinePassIncGen)
add_mlir_doc(Passes AffinePasses ./ -gen-pass-doc)

View File

@ -0,0 +1,7 @@
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_mlir_dialect_tablegen_target(MLIRAffinePassIncGen)
add_mlir_doc(Passes AffinePasses ./ -gen-pass-doc)

View File

@ -36,7 +36,7 @@ class AffineForOp;
enum FusionMode { Greedy, ProducerConsumer, Sibling };
#define GEN_PASS_DECL
#include "mlir/Dialect/Affine/Passes.h.inc"
#include "mlir/Dialect/Affine/Transforms/Passes.h.inc"
/// Creates a simplification pass for affine structures (maps and sets). In
/// addition, this pass also normalizes memrefs to have the trivial (identity)
@ -137,7 +137,7 @@ void populateAffineFoldMemRefAliasOpPatterns(RewritePatternSet &patterns);
/// Generate the code for registering passes.
#define GEN_PASS_REGISTRATION
#include "mlir/Dialect/Affine/Passes.h.inc"
#include "mlir/Dialect/Affine/Transforms/Passes.h.inc"
} // namespace affine
} // namespace mlir

View File

@ -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_mlir_dialect_tablegen_target(MLIRArithTransformsIncGen)
add_mlir_doc(Passes ArithPasses ./ -gen-pass-doc)

View File

@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name ArmSME)
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)
mlir_tablegen(PassesEnums.cpp.inc -gen-enum-defs)
add_mlir_dialect_tablegen_target(MLIRArmSMETransformsIncGen)

View File

@ -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_mlir_dialect_tablegen_target(MLIRArmSVEPassIncGen)
add_mlir_doc(Passes ArmSVEPasses ./ -gen-pass-doc)

View File

@ -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_mlir_dialect_tablegen_target(MLIRBufferizationPassIncGen)
add_mlir_doc(Passes BufferizationPasses ./ -gen-pass-doc)

View File

@ -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_mlir_dialect_tablegen_target(MLIREmitCTransformsIncGen)
add_mlir_doc(Passes EmitCPasses ./ -gen-pass-doc)

View File

@ -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_mlir_dialect_tablegen_target(MLIRFuncTransformsIncGen)
add_mlir_doc(Passes FuncPasses ./ -gen-pass-doc)

View File

@ -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_mlir_dialect_tablegen_target(MLIRLLVMPassIncGen)
add_mlir_doc(Passes LLVMPasses ./ -gen-pass-doc)

View File

@ -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_mlir_dialect_tablegen_target(MLIRMLProgramPassIncGen)
add_mlir_doc(Passes MLProgramPasses ./ -gen-pass-doc)

View File

@ -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_mlir_dialect_tablegen_target(MLIRMathTransformsIncGen)
add_mlir_doc(Passes MathPasses ./ -gen-pass-doc)

View File

@ -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_mlir_dialect_tablegen_target(MLIRMemRefPassIncGen)
add_mlir_doc(Passes MemRefPasses ./ -gen-pass-doc)

View File

@ -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_mlir_dialect_tablegen_target(MLIROpenACCPassIncGen)
add_mlir_doc(Passes OpenACCPasses ./ -gen-pass-doc)

View File

@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name OpenMP)
add_public_tablegen_target(MLIROpenMPPassIncGen)
mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix OpenMP)
mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix OpenMP)
add_mlir_dialect_tablegen_target(MLIROpenMPPassIncGen)
add_mlir_doc(Passes OpenMPPasses ./ -gen-pass-doc)

View File

@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name Quant)
mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix Quant)
mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Quant)
add_mlir_dialect_tablegen_target(MLIRQuantTransformsIncGen)
add_mlir_doc(Passes QuantPasses ./ -gen-pass-doc)

View File

@ -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_mlir_dialect_tablegen_target(MLIRSCFPassIncGen)
add_mlir_doc(Passes SCFPasses ./ -gen-pass-doc)

View File

@ -1,6 +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_mlir_dialect_tablegen_target(MLIRSPIRVPassIncGen)
add_mlir_doc(Passes SPIRVPasses ./ -gen-pass-doc)

View File

@ -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_mlir_dialect_tablegen_target(MLIRShapeTransformsIncGen)
add_mlir_doc(Passes ShapePasses ./ -gen-pass-doc)

View File

@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name Shard)
mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix Shard)
mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Shard)
add_mlir_dialect_tablegen_target(MLIRShardPassIncGen)
add_mlir_doc(Passes ShardPasses ./ -gen-pass-doc)

View File

@ -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_mlir_dialect_tablegen_target(MLIRTensorTransformsIncGen)
add_mlir_doc(Passes TensorPasses ./ -gen-pass-doc)

View File

@ -1,5 +1,9 @@
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 Tosa)
mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix Tosa)
add_mlir_dialect_tablegen_target(MLIRTosaPassIncGen)
add_mlir_doc(Passes TosaPasses ./ -gen-pass-doc)

View File

@ -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_mlir_dialect_tablegen_target(MLIRTransformDialectTransformsIncGen)
add_mlir_doc(Passes TransformPasses ./ -gen-pass-doc)

View File

@ -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_mlir_dialect_tablegen_target(MLIRVectorTransformsIncGen)
add_mlir_doc(Passes VectorPasses ./ -gen-pass-doc)

View File

@ -1,5 +1,7 @@
set(LLVM_TARGET_DEFINITIONS Passes.td)
mlir_tablegen(Passes.h.inc -gen-pass-decls -name XeGPU)
mlir_tablegen(Passes.capi.h.inc -gen-pass-capi-header --prefix XeGPU)
mlir_tablegen(Passes.capi.cpp.inc -gen-pass-capi-impl --prefix XeGPU)
add_mlir_dialect_tablegen_target(MLIRXeGPUPassIncGen)
add_mlir_doc(Passes XeGPUPasses ./ -gen-pass-doc)

View File

@ -0,0 +1,26 @@
//===- AMDGPUPasses.cpp - C API for AMDGPU Dialect Passes -----------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/AMDGPU/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/AMDGPU/Transforms/Passes.capi.h.inc"
using namespace mlir;
using namespace mlir::amdgpu;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/AMDGPU/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,13 @@
//===- AMX.cpp - C Interface for AMX dialect ------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir-c/Dialect/AMX.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/Dialect/AMX/AMXDialect.h"
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(AMX, amx, mlir::amx::AMXDialect)

View File

@ -0,0 +1,14 @@
//===- Affine.cpp - C Interface for Affine dialect ------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir-c/Dialect/Affine.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/Dialect/Affine/IR/AffineOps.h"
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Affine, affine,
mlir::affine::AffineDialect)

View File

@ -0,0 +1,26 @@
//===- AffinePasses.cpp - C API for Affine Dialect Passes -----------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/Affine/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/Affine/Transforms/Passes.capi.h.inc"
using namespace mlir;
using namespace mlir::affine;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/Affine/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,26 @@
//===- ArithPasses.cpp - C API for Arith Dialect Passes -------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/Arith/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/Arith/Transforms/Passes.capi.h.inc"
using namespace mlir;
using namespace mlir::arith;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/Arith/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,16 @@
//===- ArmNeon.cpp - C Interface for ArmNeon dialect ----------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir-c/Dialect/ArmNeon.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/Dialect/ArmNeon/ArmNeonDialect.h"
using namespace mlir::arm_neon;
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(ArmNeon, arm_neon,
mlir::arm_neon::ArmNeonDialect)

View File

@ -0,0 +1,16 @@
//===- ArmSME.cpp - C Interface for ArmSME dialect ------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir-c/Dialect/ArmSME.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/Dialect/ArmSME/IR/ArmSME.h"
using namespace mlir::arm_sme;
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(ArmSME, arm_sme,
mlir::arm_sme::ArmSMEDialect)

View File

@ -0,0 +1,26 @@
//===- ArmSMEPasses.cpp - C API for ArmSME Dialect Passes -----------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/ArmSME/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/ArmSME/Transforms/Passes.capi.h.inc"
using namespace mlir;
using namespace mlir::arm_sme;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/ArmSME/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,16 @@
//===- ArmSVE.cpp - C Interface for ArmSVE dialect ------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir-c/Dialect/ArmSVE.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/Dialect/ArmSVE/IR/ArmSVEDialect.h"
using namespace mlir::arm_sve;
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(ArmSVE, arm_sve,
mlir::arm_sve::ArmSVEDialect)

View File

@ -0,0 +1,26 @@
//===- ArmSVEPasses.cpp - C API for ArmSVE Dialect Passes -----------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/ArmSVE/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/ArmSVE/Transforms/Passes.capi.h.inc"
using namespace mlir;
using namespace mlir::arm_sve;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/ArmSVE/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,16 @@
//===- Bufferization.cpp - C Interface for Bufferization dialect ----------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir-c/Dialect/Bufferization.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
using namespace mlir::bufferization;
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Bufferization, bufferization,
mlir::bufferization::BufferizationDialect)

View File

@ -0,0 +1,26 @@
//===- BufferizationPasses.cpp - C API for Bufferization Dialect Passes ---===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/Bufferization/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/Bufferization/Transforms/Passes.capi.h.inc"
using namespace mlir;
using namespace mlir::bufferization;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/Bufferization/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -1,19 +1,84 @@
add_mlir_upstream_c_api_library(MLIRCAPIAffine
Affine.cpp
AffinePasses.cpp
PARTIAL_SOURCES_INTENDED
DEPENDS
MLIRAffinePassIncGen
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRAffineDialect
MLIRAffineTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIAMDGPU
AMDGPU.cpp
AMDGPUPasses.cpp
PARTIAL_SOURCES_INTENDED
DEPENDS
MLIRNVGPUPassIncGen
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRAMDGPUDialect
MLIRAMDGPUTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIAMX
AMX.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRAMDGPUDialect
MLIRAMXDialect
)
add_mlir_upstream_c_api_library(MLIRCAPIArith
Arith.cpp
ArithPasses.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRArithDialect
MLIRArithTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIArmNeon
ArmNeon.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRArmNeonDialect
MLIRArmNeonTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIArmSME
ArmSME.cpp
ArmSMEPasses.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRArmSMEDialect
MLIRArmSMETransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIArmSVE
ArmSVE.cpp
ArmSVEPasses.cpp
PARTIAL_SOURCES_INTENDED
DEPENDS
MLIRArmSVEPassIncGen
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRArmSVEDialect
MLIRArmSVETransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIAsync
@ -31,12 +96,27 @@ add_mlir_upstream_c_api_library(MLIRCAPIAsync
MLIRPass
)
add_mlir_upstream_c_api_library(MLIRCAPIBufferization
Bufferization.cpp
BufferizationPasses.cpp
PARTIAL_SOURCES_INTENDED
DEPENDS
MLIRBufferizationPassIncGen
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRBufferizationDialect
MLIRBufferizationTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIComplex
Complex.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRComplexDialect
)
@ -49,31 +129,35 @@ add_mlir_upstream_c_api_library(MLIRCAPIControlFlow
MLIRControlFlowDialect
)
add_mlir_upstream_c_api_library(MLIRCAPIDLTI
DLTI.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRDLTIDialect
)
add_mlir_upstream_c_api_library(MLIRCAPIEmitC
EmitC.cpp
EmitCPasses.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIREmitCDialect
MLIREmitCTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIMath
Math.cpp
add_mlir_upstream_c_api_library(MLIRCAPIFunc
Func.cpp
FuncPasses.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRMathDialect
)
add_mlir_upstream_c_api_library(MLIRCAPIMemRef
MemRef.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRMemRefDialect
MLIRFuncDialect
MLIRFuncTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIGPU
@ -108,15 +192,6 @@ add_mlir_upstream_c_api_library(MLIRCAPIIRDL
MLIRIRDL
)
add_mlir_upstream_c_api_library(MLIRCAPILLVM
LLVM.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRLLVMDialect
)
add_mlir_upstream_c_api_library(MLIRCAPILinalg
Linalg.cpp
LinalgPasses.cpp
@ -132,22 +207,77 @@ add_mlir_upstream_c_api_library(MLIRCAPILinalg
MLIRLinalgTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIMLProgram
MLProgram.cpp
add_mlir_upstream_c_api_library(MLIRCAPILLVM
LLVM.cpp
LLVMPasses.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRLLVMDialect
)
add_mlir_upstream_c_api_library(MLIRCAPIMath
Math.cpp
MathPasses.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRMathDialect
MLIRMathTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIMemRef
MemRef.cpp
MemRefPasses.cpp
PARTIAL_SOURCES_INTENDED
PARTIAL_SOURCES_INTENDED
DEPENDS
MLIRMemRefPassIncGen
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRMemRefDialect
MLIRMemRefTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIMLProgram
MLProgram.cpp
MLProgramPasses.cpp
PARTIAL_SOURCES_INTENDED
DEPENDS
MLIRMLProgramPassIncGen
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRMLProgramDialect
MLIRMLProgramTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIMPI
MPI.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRMPIDialect
)
add_mlir_upstream_c_api_library(MLIRCAPINVGPU
NVGPU.cpp
NVGPUPasses.cpp
PARTIAL_SOURCES_INTENDED
DEPENDS
MLIRNVGPUPassIncGen
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRNVGPUDialect
MLIRNVGPUTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPINVVM
@ -159,97 +289,18 @@ add_mlir_upstream_c_api_library(MLIRCAPINVVM
MLIRNVVMDialect
)
add_mlir_upstream_c_api_library(MLIRCAPIROCDL
ROCDL.cpp
add_mlir_upstream_c_api_library(MLIRCAPIOpenACC
OpenACC.cpp
OpenACCPasses.cpp
PARTIAL_SOURCES_INTENDED
DEPENDS
MLIROpenACCPassIncGen
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRROCDLDialect
)
add_mlir_upstream_c_api_library(MLIRCAPISCF
SCF.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRSCFDialect
)
add_mlir_upstream_c_api_library(MLIRCAPIShape
Shape.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRShapeDialect
)
add_mlir_upstream_c_api_library(MLIRCAPISparseTensor
SparseTensor.cpp
SparseTensorPasses.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRSparseTensorDialect
MLIRSparseTensorTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIFunc
Func.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRFuncDialect
)
add_mlir_upstream_c_api_library(MLIRCAPISPIRV
SPIRV.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRSPIRVDialect
)
add_mlir_upstream_c_api_library(MLIRCAPITensor
Tensor.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRTensorDialect
)
add_mlir_upstream_c_api_library(MLIRCAPITransformDialect
Transform.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRTransformDialect
)
add_mlir_upstream_c_api_library(MLIRCAPITransformDialectTransforms
TransformInterpreter.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRTransformDialectTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIQuant
Quant.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRQuantDialect
MLIROpenACCDialect
MLIROpenACCTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIOpenMP
@ -270,13 +321,78 @@ add_mlir_upstream_c_api_library(MLIRCAPIPDL
MLIRPDLDialect
)
add_mlir_upstream_c_api_library(MLIRCAPIVector
Vector.cpp
add_mlir_upstream_c_api_library(MLIRCAPIPDLInterp
PDLInterp.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRVectorDialect
MLIRPDLInterpDialect
)
add_mlir_upstream_c_api_library(MLIRCAPIPtr
Ptr.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRPtrDialect
)
add_mlir_upstream_c_api_library(MLIRCAPIQuant
Quant.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRQuantDialect
)
add_mlir_upstream_c_api_library(MLIRCAPIROCDL
ROCDL.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRROCDLDialect
)
add_mlir_upstream_c_api_library(MLIRCAPISCF
SCF.cpp
SCFPasses.cpp
PARTIAL_SOURCES_INTENDED
DEPENDS
MLIRSCFPassIncGen
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRSCFDialect
MLIRSCFTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIShape
Shape.cpp
ShapePasses.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRShapeDialect
)
add_mlir_upstream_c_api_library(MLIRCAPIShard
Shard.cpp
ShardPasses.cpp
PARTIAL_SOURCES_INTENDED
DEPENDS
MLIRShardPassIncGen
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRShardDialect
MLIRShardTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPISMT
@ -287,3 +403,140 @@ add_mlir_upstream_c_api_library(MLIRCAPISMT
MLIRCAPIIR
MLIRSMT
)
add_mlir_upstream_c_api_library(MLIRCAPISparseTensor
SparseTensor.cpp
SparseTensorPasses.cpp
PARTIAL_SOURCES_INTENDED
DEPENDS
MLIRSparseTensorPassIncGen
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRSparseTensorDialect
MLIRSparseTensorTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPISPIRV
SPIRV.cpp
SPIRVPasses.cpp
PARTIAL_SOURCES_INTENDED
DEPENDS
MLIRSPIRVPassIncGen
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRSPIRVDialect
MLIRSPIRVTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPITensor
Tensor.cpp
TensorPasses.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRTensorDialect
MLIRTensorTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPITosa
Tosa.cpp
TosaPasses.cpp
PARTIAL_SOURCES_INTENDED
DEPENDS
MLIRTosaPassIncGen
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRTosaDialect
MLIRTosaTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPITransformDialect
Transform.cpp
TransformPasses.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRTransformDialect
)
add_mlir_upstream_c_api_library(MLIRCAPITransformDialectTransforms
TransformInterpreter.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRTransformDialectTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIUB
UB.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRUBDialect
)
add_mlir_upstream_c_api_library(MLIRCAPIVCIX
VCIX.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRVCIXDialect
)
add_mlir_upstream_c_api_library(MLIRCAPIVector
Vector.cpp
VectorPasses.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRVectorDialect
MLIRVectorTransforms
)
add_mlir_upstream_c_api_library(MLIRCAPIWasmSSA
WasmSSA.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRWasmSSADialect
)
add_mlir_upstream_c_api_library(MLIRCAPIX86Vector
X86Vector.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRX86VectorDialect
)
add_mlir_upstream_c_api_library(MLIRCAPIXeGPU
XeGPU.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRXeGPUDialect
)
add_mlir_upstream_c_api_library(MLIRCAPIXeVM
XeVM.cpp
PARTIAL_SOURCES_INTENDED
LINK_LIBS PUBLIC
MLIRCAPIIR
MLIRXeVMDialect
)

View File

@ -0,0 +1,13 @@
//===- DLTI.cpp - C Interface for DLTI dialect ----------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir-c/Dialect/DLTI.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/Dialect/DLTI/DLTI.h"
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(DLTI, dlti, mlir::DLTIDialect)

View File

@ -11,6 +11,7 @@
#include "mlir/Dialect/EmitC/IR/EmitC.h"
using namespace mlir;
using namespace mlir::emitc;
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(EmitC, emitc, mlir::emitc::EmitCDialect)

View File

@ -0,0 +1,26 @@
//===- EmitCPasses.cpp - C API for EmitC Dialect Passes -------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/EmitC/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/EmitC/Transforms/Passes.capi.h.inc"
using namespace mlir;
using namespace mlir::emitc;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/EmitC/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,26 @@
//===- FuncPasses.cpp - C API for Func Dialect Passes ---------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/Func/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/Func/Transforms/Passes.capi.h.inc"
using namespace mlir;
using namespace mlir::func;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/Func/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,26 @@
//===- LLVMPasses.cpp - C API for LLVM Dialect Passes ---------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/LLVMIR/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/LLVMIR/Transforms/Passes.capi.h.inc"
using namespace mlir;
using namespace mlir::LLVM;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/LLVMIR/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,26 @@
//===- MLProgramPasses.cpp - C API for MLProgram Dialect Passes -----------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/MLProgram/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/MLProgram/Transforms/Passes.capi.h.inc"
using namespace mlir;
using namespace mlir::ml_program;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/MLProgram/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,13 @@
//===- MPI.cpp - C Interface for MPI dialect ------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir-c/Dialect/MPI.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/Dialect/MPI/IR/MPI.h"
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(MPI, mpi, mlir::mpi::MPIDialect)

View File

@ -0,0 +1,26 @@
//===- MathPasses.cpp - C API for Math Dialect Passes ---------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/Math/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/Math/Transforms/Passes.capi.h.inc"
using namespace mlir;
using namespace mlir::math;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/Math/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,26 @@
//===- MemRefPasses.cpp - C API for MemRef Dialect Passes -----------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/MemRef/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/MemRef/Transforms/Passes.capi.h.inc"
using namespace mlir;
using namespace mlir::memref;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/MemRef/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,25 @@
//===- NVGPUPasses.cpp - C API for NVGPU Dialect Passes -------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/NVGPU/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/NVGPU/Transforms/Passes.capi.h.inc"
using namespace mlir;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/NVGPU/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,15 @@
//===- OpenACC.cpp - C Interface for OpenACC dialect ----------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir-c/Dialect/OpenACC.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/Dialect/OpenACC/OpenACC.h"
using namespace mlir::acc;
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(OpenACC, acc, mlir::acc::OpenACCDialect)

View File

@ -0,0 +1,26 @@
//===- OpenACCPasses.cpp - C API for OpenACC Dialect Passes ---------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/OpenACC/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/OpenACC/Transforms/Passes.capi.h.inc"
using namespace mlir;
using namespace mlir::acc;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/OpenACC/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,14 @@
//===- PDLInterp.cpp - C Interface for PDLInterp dialect ------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir-c/Dialect/PDLInterp.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/Dialect/PDLInterp/IR/PDLInterp.h"
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(PDLInterp, pdl_interp,
mlir::pdl_interp::PDLInterpDialect)

View File

@ -0,0 +1,13 @@
//===- Ptr.cpp - C Interface for Ptr dialect ------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir-c/Dialect/Ptr.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/Dialect/Ptr/IR/PtrDialect.h"
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Ptr, ptr, mlir::ptr::PtrDialect)

View File

@ -0,0 +1,25 @@
//===- SCFPasses.cpp - C API for SCF Dialect Passes -----------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/SCF/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/SCF/Transforms/Passes.capi.h.inc"
using namespace mlir;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/SCF/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,26 @@
//===- SPIRVPasses.cpp - C API for SPIRV Dialect Passes -------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/SPIRV/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/SPIRV/Transforms/Passes.capi.h.inc"
using namespace mlir;
using namespace mlir::spirv;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/SPIRV/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,25 @@
//===- ShapePasses.cpp - C API for Shape Dialect Passes -------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/Shape/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/Shape/Transforms/Passes.capi.h.inc"
using namespace mlir;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/Shape/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,13 @@
//===- Shard.cpp - C Interface for Shard dialect --------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir-c/Dialect/Shard.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/Dialect/Shard/IR/ShardDialect.h"
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Shard, shard, mlir::shard::ShardDialect)

View File

@ -0,0 +1,26 @@
//===- ShardPasses.cpp - C API for Shard Dialect Passes -------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/Shard/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/Shard/Transforms/Passes.capi.h.inc"
using namespace mlir;
using namespace mlir::shard;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/Shard/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,26 @@
//===- TensorPasses.cpp - C API for Tensor Dialect Passes -----------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/Tensor/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/Tensor/Transforms/Passes.capi.h.inc"
using namespace mlir;
using namespace mlir::tensor;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/Tensor/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

View File

@ -0,0 +1,13 @@
//===- Tosa.cpp - C Interface for Tosa dialect ----------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir-c/Dialect/Tosa.h"
#include "mlir/CAPI/Registration.h"
#include "mlir/Dialect/Tosa/IR/TosaOps.h"
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Tosa, tosa, mlir::tosa::TosaDialect)

View File

@ -0,0 +1,26 @@
//===- TosaPasses.cpp - C API for Tosa Dialect Passes ---------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//
#include "mlir/CAPI/Pass.h"
#include "mlir/Dialect/Tosa/Transforms/Passes.h"
#include "mlir/Pass/Pass.h"
// Must include the declarations as they carry important visibility attributes.
#include "mlir/Dialect/Tosa/Transforms/Passes.capi.h.inc"
using namespace mlir;
using namespace mlir::tosa;
#ifdef __cplusplus
extern "C" {
#endif
#include "mlir/Dialect/Tosa/Transforms/Passes.capi.cpp.inc"
#ifdef __cplusplus
}
#endif

Some files were not shown because too many files have changed in this diff Show More