@@ -59,15 +59,27 @@ class ConstantIntOp : public arith::ConstantOp {
59
59
// / Build a constant int op that produces an integer of the specified width.
60
60
static void build (OpBuilder &builder, OperationState &result, int64_t value,
61
61
unsigned width);
62
+ static ConstantIntOp create (OpBuilder &builder, Location ___location,
63
+ int64_t value, unsigned width);
64
+ static ConstantIntOp create (ImplicitLocOpBuilder &builder, int64_t value,
65
+ unsigned width);
62
66
63
67
// / Build a constant int op that produces an integer of the specified type,
64
68
// / which must be an integer type.
65
69
static void build (OpBuilder &builder, OperationState &result, Type type,
66
70
int64_t value);
71
+ static ConstantIntOp create (OpBuilder &builder, Location ___location, Type type,
72
+ int64_t value);
73
+ static ConstantIntOp create (ImplicitLocOpBuilder &builder, Type type,
74
+ int64_t value);
67
75
68
76
// / Build a constant int op that produces an integer from an APInt
69
77
static void build (OpBuilder &builder, OperationState &result, Type type,
70
78
const APInt &value);
79
+ static ConstantIntOp create (OpBuilder &builder, Location ___location, Type type,
80
+ const APInt &value);
81
+ static ConstantIntOp create (ImplicitLocOpBuilder &builder, Type type,
82
+ const APInt &value);
71
83
72
84
inline int64_t value () {
73
85
return cast<IntegerAttr>(arith::ConstantOp::getValue ()).getInt ();
@@ -85,6 +97,10 @@ class ConstantFloatOp : public arith::ConstantOp {
85
97
// / Build a constant float op that produces a float of the specified type.
86
98
static void build (OpBuilder &builder, OperationState &result, FloatType type,
87
99
const APFloat &value);
100
+ static ConstantFloatOp create (OpBuilder &builder, Location ___location,
101
+ FloatType type, const APFloat &value);
102
+ static ConstantFloatOp create (ImplicitLocOpBuilder &builder, FloatType type,
103
+ const APFloat &value);
88
104
89
105
inline APFloat value () {
90
106
return cast<FloatAttr>(arith::ConstantOp::getValue ()).getValue ();
@@ -100,6 +116,9 @@ class ConstantIndexOp : public arith::ConstantOp {
100
116
static ::mlir::TypeID resolveTypeID () { return TypeID::get<ConstantOp>(); }
101
117
// / Build a constant int op that produces an index.
102
118
static void build (OpBuilder &builder, OperationState &result, int64_t value);
119
+ static ConstantIndexOp create (OpBuilder &builder, Location ___location,
120
+ int64_t value);
121
+ static ConstantIndexOp create (ImplicitLocOpBuilder &builder, int64_t value);
103
122
104
123
inline int64_t value () {
105
124
return cast<IntegerAttr>(arith::ConstantOp::getValue ()).getInt ();
0 commit comments