@@ -25,46 +25,49 @@ MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(SMT, smt, mlir::smt::SMTDialect)
25
25
// Type API.
26
26
// ===----------------------------------------------------------------------===//
27
27
28
- bool smtTypeIsAnyNonFuncSMTValueType (MlirType type) {
28
+ bool mlirSMTTypeIsAnyNonFuncSMTValueType (MlirType type) {
29
29
return isAnyNonFuncSMTValueType (unwrap (type));
30
30
}
31
31
32
- bool smtTypeIsAnySMTValueType (MlirType type) {
32
+ bool mlirSMTTypeIsAnySMTValueType (MlirType type) {
33
33
return isAnySMTValueType (unwrap (type));
34
34
}
35
35
36
- bool smtTypeIsAArray (MlirType type) { return isa<ArrayType>(unwrap (type)); }
36
+ bool mlirSMTTypeIsAArray (MlirType type) { return isa<ArrayType>(unwrap (type)); }
37
37
38
- MlirType smtTypeGetArray (MlirContext ctx, MlirType domainType,
39
- MlirType rangeType) {
38
+ MlirType mlirSMTTypeGetArray (MlirContext ctx, MlirType domainType,
39
+ MlirType rangeType) {
40
40
return wrap (
41
41
ArrayType::get (unwrap (ctx), unwrap (domainType), unwrap (rangeType)));
42
42
}
43
43
44
- bool smtTypeIsABitVector (MlirType type) {
44
+ bool mlirSMTTypeIsABitVector (MlirType type) {
45
45
return isa<BitVectorType>(unwrap (type));
46
46
}
47
47
48
- MlirType smtTypeGetBitVector (MlirContext ctx, int32_t width) {
48
+ MlirType mlirSMTTypeGetBitVector (MlirContext ctx, int32_t width) {
49
49
return wrap (BitVectorType::get (unwrap (ctx), width));
50
50
}
51
51
52
- bool smtTypeIsABool (MlirType type) { return isa<BoolType>(unwrap (type)); }
52
+ bool mlirSMTTypeIsABool (MlirType type) { return isa<BoolType>(unwrap (type)); }
53
53
54
- MlirType smtTypeGetBool (MlirContext ctx) {
54
+ MlirType mlirSMTTypeGetBool (MlirContext ctx) {
55
55
return wrap (BoolType::get (unwrap (ctx)));
56
56
}
57
57
58
- bool smtTypeIsAInt (MlirType type) { return isa<IntType>(unwrap (type)); }
58
+ bool mlirSMTTypeIsAInt (MlirType type) { return isa<IntType>(unwrap (type)); }
59
59
60
- MlirType smtTypeGetInt (MlirContext ctx) {
60
+ MlirType mlirSMTTypeGetInt (MlirContext ctx) {
61
61
return wrap (IntType::get (unwrap (ctx)));
62
62
}
63
63
64
- bool smtTypeIsASMTFunc (MlirType type) { return isa<SMTFuncType>(unwrap (type)); }
64
+ bool mlirSMTTypeIsASMTFunc (MlirType type) {
65
+ return isa<SMTFuncType>(unwrap (type));
66
+ }
65
67
66
- MlirType smtTypeGetSMTFunc (MlirContext ctx, size_t numberOfDomainTypes,
67
- const MlirType *domainTypes, MlirType rangeType) {
68
+ MlirType mlirSMTTypeGetSMTFunc (MlirContext ctx, size_t numberOfDomainTypes,
69
+ const MlirType *domainTypes,
70
+ MlirType rangeType) {
68
71
SmallVector<Type> domainTypesVec;
69
72
domainTypesVec.reserve (numberOfDomainTypes);
70
73
@@ -74,10 +77,11 @@ MlirType smtTypeGetSMTFunc(MlirContext ctx, size_t numberOfDomainTypes,
74
77
return wrap (SMTFuncType::get (unwrap (ctx), domainTypesVec, unwrap (rangeType)));
75
78
}
76
79
77
- bool smtTypeIsASort (MlirType type) { return isa<SortType>(unwrap (type)); }
80
+ bool mlirSMTTypeIsASort (MlirType type) { return isa<SortType>(unwrap (type)); }
78
81
79
- MlirType smtTypeGetSort (MlirContext ctx, MlirIdentifier identifier,
80
- size_t numberOfSortParams, const MlirType *sortParams) {
82
+ MlirType mlirSMTTypeGetSort (MlirContext ctx, MlirIdentifier identifier,
83
+ size_t numberOfSortParams,
84
+ const MlirType *sortParams) {
81
85
SmallVector<Type> sortParamsVec;
82
86
sortParamsVec.reserve (numberOfSortParams);
83
87
@@ -91,31 +95,31 @@ MlirType smtTypeGetSort(MlirContext ctx, MlirIdentifier identifier,
91
95
// Attribute API.
92
96
// ===----------------------------------------------------------------------===//
93
97
94
- bool smtAttrCheckBVCmpPredicate (MlirContext ctx, MlirStringRef str) {
98
+ bool mlirSMTAttrCheckBVCmpPredicate (MlirContext ctx, MlirStringRef str) {
95
99
return symbolizeBVCmpPredicate (unwrap (str)).has_value ();
96
100
}
97
101
98
- bool smtAttrCheckIntPredicate (MlirContext ctx, MlirStringRef str) {
102
+ bool mlirSMTAttrCheckIntPredicate (MlirContext ctx, MlirStringRef str) {
99
103
return symbolizeIntPredicate (unwrap (str)).has_value ();
100
104
}
101
105
102
- bool smtAttrIsASMTAttribute (MlirAttribute attr) {
106
+ bool mlirSMTAttrIsASMTAttribute (MlirAttribute attr) {
103
107
return isa<BitVectorAttr, BVCmpPredicateAttr, IntPredicateAttr>(unwrap (attr));
104
108
}
105
109
106
- MlirAttribute smtAttrGetBitVector (MlirContext ctx, uint64_t value,
107
- unsigned width) {
110
+ MlirAttribute mlirSMTAttrGetBitVector (MlirContext ctx, uint64_t value,
111
+ unsigned width) {
108
112
return wrap (BitVectorAttr::get (unwrap (ctx), value, width));
109
113
}
110
114
111
- MlirAttribute smtAttrGetBVCmpPredicate (MlirContext ctx, MlirStringRef str) {
115
+ MlirAttribute mlirSMTAttrGetBVCmpPredicate (MlirContext ctx, MlirStringRef str) {
112
116
auto predicate = symbolizeBVCmpPredicate (unwrap (str));
113
117
assert (predicate.has_value () && " invalid predicate" );
114
118
115
119
return wrap (BVCmpPredicateAttr::get (unwrap (ctx), predicate.value ()));
116
120
}
117
121
118
- MlirAttribute smtAttrGetIntPredicate (MlirContext ctx, MlirStringRef str) {
122
+ MlirAttribute mlirSMTAttrGetIntPredicate (MlirContext ctx, MlirStringRef str) {
119
123
auto predicate = symbolizeIntPredicate (unwrap (str));
120
124
assert (predicate.has_value () && " invalid predicate" );
121
125
0 commit comments