1//===-- mlir-c/Dialect/PDL.h - C API for PDL Dialect --------------*- C -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM
4// Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef MLIR_C_DIALECT_PDL_H
11#define MLIR_C_DIALECT_PDL_H
12
13#include "mlir-c/IR.h"
14
15#ifdef __cplusplus
16extern "C" {
17#endif
18
19MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(PDL, pdl);
20
21//===---------------------------------------------------------------------===//
22// PDLType
23//===---------------------------------------------------------------------===//
24
25MLIR_CAPI_EXPORTED bool mlirTypeIsAPDLType(MlirType type);
26
27//===---------------------------------------------------------------------===//
28// AttributeType
29//===---------------------------------------------------------------------===//
30
31MLIR_CAPI_EXPORTED bool mlirTypeIsAPDLAttributeType(MlirType type);
32
33MLIR_CAPI_EXPORTED MlirTypeID mlirPDLAttributeTypeGetTypeID(void);
34
35MLIR_CAPI_EXPORTED MlirType mlirPDLAttributeTypeGet(MlirContext ctx);
36
37MLIR_CAPI_EXPORTED MlirStringRef mlirPDLAttributeTypeGetName(void);
38
39//===---------------------------------------------------------------------===//
40// OperationType
41//===---------------------------------------------------------------------===//
42
43MLIR_CAPI_EXPORTED bool mlirTypeIsAPDLOperationType(MlirType type);
44
45MLIR_CAPI_EXPORTED MlirTypeID mlirPDLOperationTypeGetTypeID(void);
46
47MLIR_CAPI_EXPORTED MlirType mlirPDLOperationTypeGet(MlirContext ctx);
48
49MLIR_CAPI_EXPORTED MlirStringRef mlirPDLOperationTypeGetName(void);
50
51//===---------------------------------------------------------------------===//
52// RangeType
53//===---------------------------------------------------------------------===//
54
55MLIR_CAPI_EXPORTED bool mlirTypeIsAPDLRangeType(MlirType type);
56
57MLIR_CAPI_EXPORTED MlirTypeID mlirPDLRangeTypeGetTypeID(void);
58
59MLIR_CAPI_EXPORTED MlirType mlirPDLRangeTypeGet(MlirType elementType);
60
61MLIR_CAPI_EXPORTED MlirStringRef mlirPDLRangeTypeGetName(void);
62
63MLIR_CAPI_EXPORTED MlirType mlirPDLRangeTypeGetElementType(MlirType type);
64
65//===---------------------------------------------------------------------===//
66// TypeType
67//===---------------------------------------------------------------------===//
68
69MLIR_CAPI_EXPORTED bool mlirTypeIsAPDLTypeType(MlirType type);
70
71MLIR_CAPI_EXPORTED MlirTypeID mlirPDLTypeTypeGetTypeID(void);
72
73MLIR_CAPI_EXPORTED MlirType mlirPDLTypeTypeGet(MlirContext ctx);
74
75MLIR_CAPI_EXPORTED MlirStringRef mlirPDLTypeTypeGetName(void);
76
77//===---------------------------------------------------------------------===//
78// ValueType
79//===---------------------------------------------------------------------===//
80
81MLIR_CAPI_EXPORTED bool mlirTypeIsAPDLValueType(MlirType type);
82
83MLIR_CAPI_EXPORTED MlirTypeID mlirPDLValueTypeGetTypeID(void);
84
85MLIR_CAPI_EXPORTED MlirType mlirPDLValueTypeGet(MlirContext ctx);
86
87MLIR_CAPI_EXPORTED MlirStringRef mlirPDLValueTypeGetName(void);
88
89#ifdef __cplusplus
90}
91#endif
92
93#endif // MLIR_C_DIALECT_PDL_H
94