-
Notifications
You must be signed in to change notification settings - Fork 437
Expand file tree
/
Copy pathRTGTest.h
More file actions
157 lines (108 loc) · 5.85 KB
/
RTGTest.h
File metadata and controls
157 lines (108 loc) · 5.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
//===- RTGTest.h - C interface for the for RTGTest 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 CIRCT_C_DIALECT_RTGTEST_H
#define CIRCT_C_DIALECT_RTGTEST_H
#include "mlir-c/IR.h"
#ifdef __cplusplus
extern "C" {
#endif
//===----------------------------------------------------------------------===//
// Dialect API.
//===----------------------------------------------------------------------===//
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(RTGTest, rtgtest);
//===----------------------------------------------------------------------===//
// Type API.
//===----------------------------------------------------------------------===//
/// If the type is an RTGTest CPUType.
MLIR_CAPI_EXPORTED bool rtgtestTypeIsACPU(MlirType type);
/// Creates an RTGTest CPU type in the context.
MLIR_CAPI_EXPORTED MlirType rtgtestCPUTypeGet(MlirContext ctxt);
/// If the type is an RTGTest IntegerRegisterType.
MLIR_CAPI_EXPORTED bool rtgtestTypeIsAIntegerRegister(MlirType type);
/// Creates an RTGTest IntegerRegisterType in the context.
MLIR_CAPI_EXPORTED MlirType rtgtestIntegerRegisterTypeGet(MlirContext ctxt);
//===----------------------------------------------------------------------===//
// Attribute API.
//===----------------------------------------------------------------------===//
/// If the type is an RTGTest CPUAttr.
MLIR_CAPI_EXPORTED bool rtgtestAttrIsACPU(MlirAttribute attr);
/// Creates an RTGTest CPU attribute in the context.
MLIR_CAPI_EXPORTED MlirAttribute rtgtestCPUAttrGet(MlirContext ctxt,
unsigned id);
/// Returns the core ID represented by the CPU attribute.
MLIR_CAPI_EXPORTED unsigned rtgtestCPUAttrGetId(MlirAttribute attr);
// Registers.
//===----------------------------------------------------------------------===//
/// If the type is an RTGTest RegZeroAttr.
MLIR_CAPI_EXPORTED bool rtgtestAttrIsARegZero(MlirAttribute attr);
/// Creates an RTGTest RegZero attribute in the context.
MLIR_CAPI_EXPORTED MlirAttribute rtgtestRegZeroAttrGet(MlirContext ctxt);
/// If the attribute is an RTGTest RegRaAttr.
MLIR_CAPI_EXPORTED bool rtgtestAttrIsARegRa(MlirAttribute attr);
/// Creates an RTGTest RegRa attribute in the context.
MLIR_CAPI_EXPORTED MlirAttribute rtgtestRegRaAttrGet(MlirContext ctxt);
/// If the attribute is an RTGTest RegSpAttr.
MLIR_CAPI_EXPORTED bool rtgtestAttrIsARegSp(MlirAttribute attr);
/// Creates an RTGTest RegSp attribute in the context.
MLIR_CAPI_EXPORTED MlirAttribute rtgtestRegSpAttrGet(MlirContext ctxt);
/// If the attribute is an RTGTest RegGpAttr.
MLIR_CAPI_EXPORTED bool rtgtestAttrIsARegGp(MlirAttribute attr);
/// Creates an RTGTest RegGp attribute in the context.
MLIR_CAPI_EXPORTED MlirAttribute rtgtestRegGpAttrGet(MlirContext ctxt);
/// If the attribute is an RTGTest RegTpAttr.
MLIR_CAPI_EXPORTED bool rtgtestAttrIsARegTp(MlirAttribute attr);
/// Creates an RTGTest RegTp attribute in the context.
MLIR_CAPI_EXPORTED MlirAttribute rtgtestRegTpAttrGet(MlirContext ctxt);
/// If the attribute is an RTGTest RegT0Attr.
MLIR_CAPI_EXPORTED bool rtgtestAttrIsARegT0(MlirAttribute attr);
/// Creates an RTGTest RegT0 attribute in the context.
MLIR_CAPI_EXPORTED MlirAttribute rtgtestRegT0AttrGet(MlirContext ctxt);
/// If the attribute is an RTGTest RegT1Attr.
MLIR_CAPI_EXPORTED bool rtgtestAttrIsARegT1(MlirAttribute attr);
/// Creates an RTGTest RegT1 attribute in the context.
MLIR_CAPI_EXPORTED MlirAttribute rtgtestRegT1AttrGet(MlirContext ctxt);
/// If the attribute is an RTGTest RegT2Attr.
MLIR_CAPI_EXPORTED bool rtgtestAttrIsARegT2(MlirAttribute attr);
/// Creates an RTGTest RegT2 attribute in the context.
MLIR_CAPI_EXPORTED MlirAttribute rtgtestRegT2AttrGet(MlirContext ctxt);
/// If the attribute is an RTGTest RegS0Attr.
MLIR_CAPI_EXPORTED bool rtgtestAttrIsARegS0(MlirAttribute attr);
/// Creates an RTGTest RegS0 attribute in the context.
MLIR_CAPI_EXPORTED MlirAttribute rtgtestRegS0AttrGet(MlirContext ctxt);
/// If the attribute is an RTGTest RegS1Attr.
MLIR_CAPI_EXPORTED bool rtgtestAttrIsARegS1(MlirAttribute attr);
/// Creates an RTGTest RegS1 attribute in the context.
MLIR_CAPI_EXPORTED MlirAttribute rtgtestRegS1AttrGet(MlirContext ctxt);
/// If the attribute is an RTGTest RegA0Attr.
MLIR_CAPI_EXPORTED bool rtgtestAttrIsARegA0(MlirAttribute attr);
/// Creates an RTGTest RegA0 attribute in the context.
MLIR_CAPI_EXPORTED MlirAttribute rtgtestRegA0AttrGet(MlirContext ctxt);
/// If the attribute is an RTGTest RegA1Attr.
MLIR_CAPI_EXPORTED bool rtgtestAttrIsARegA1(MlirAttribute attr);
/// Creates an RTGTest RegA1 attribute in the context.
MLIR_CAPI_EXPORTED MlirAttribute rtgtestRegA1AttrGet(MlirContext ctxt);
/// If the attribute is an RTGTest RegA2Attr.
MLIR_CAPI_EXPORTED bool rtgtestAttrIsARegA2(MlirAttribute attr);
/// Creates an RTGTest RegA2 attribute in the context.
MLIR_CAPI_EXPORTED MlirAttribute rtgtestRegA2AttrGet(MlirContext ctxt);
/// If the attribute is an RTGTest RegA3Attr.
MLIR_CAPI_EXPORTED bool rtgtestAttrIsARegA3(MlirAttribute attr);
/// Creates an RTGTest RegA3 attribute in the context.
MLIR_CAPI_EXPORTED MlirAttribute rtgtestRegA3AttrGet(MlirContext ctxt);
/// If the attribute is an RTGTest RegA4Attr.
MLIR_CAPI_EXPORTED bool rtgtestAttrIsARegA4(MlirAttribute attr);
/// Creates an RTGTest RegA4 attribute in the context.
MLIR_CAPI_EXPORTED MlirAttribute rtgtestRegA4AttrGet(MlirContext ctxt);
/// If the attribute is an RTGTest RegA5Attr.
MLIR_CAPI_EXPORTED bool rtgtestAttrIsARegA5(MlirAttribute attr);
/// Creates an RTGTest RegA5 attribute in the context.
MLIR_CAPI_EXPORTED MlirAttribute rtgtestRegA5AttrGet(MlirContext ctxt);
#ifdef __cplusplus
}
#endif
#endif // CIRCT_C_DIALECT_RTGTEST_H