LLZK 2.1.1
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Ops.capi.cpp.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op C API Definitions *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: Ops.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10
11#include <limits>
12
13using namespace mlir;
14using namespace llvm;
15
16bool llzkOperationIsA_Function_CallOp(MlirOperation inp) {
17 return llvm::isa<CallOp>(unwrap(inp));
18}
19
20intptr_t llzkFunction_CallOpGetArgOperandsCount(MlirOperation op) {
21 auto range = llvm::cast<CallOp>(unwrap(op)).getODSOperandIndexAndLength(0);
22 return range.second;
23}
24
25MlirValue llzkFunction_CallOpGetArgOperandsAt(MlirOperation op, intptr_t index) {
26 auto range = llvm::cast<CallOp>(unwrap(op)).getODSOperandIndexAndLength(0);
27 assert(index >= 0 && index < range.second && "variadic operand index out of range");
28 assert(
29 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
30 "operand index exceeds intptr_t range"
31 );
32 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first) + index);
33}
34
35void llzkFunction_CallOpSetArgOperands(MlirOperation op, intptr_t count, MlirValue const *values) {
36 if (count < 0)
37 return;
38 ::llvm::SmallVector<::mlir::Value> vals;
39 vals.reserve(static_cast<size_t>(count));
40 for (intptr_t i = 0; i < count; ++i)
41 vals.push_back(unwrap(values[i]));
42 ::llvm::cast<CallOp>(unwrap(op)).getArgOperandsMutable().assign(vals);
43}
44
45intptr_t llzkFunction_CallOpGetMapOperandsCount(MlirOperation op) {
46 auto range = llvm::cast<CallOp>(unwrap(op)).getODSOperandIndexAndLength(1);
47 return range.second;
48}
49
50MlirValue llzkFunction_CallOpGetMapOperandsAt(MlirOperation op, intptr_t index) {
51 auto range = llvm::cast<CallOp>(unwrap(op)).getODSOperandIndexAndLength(1);
52 assert(index >= 0 && index < range.second && "variadic operand index out of range");
53 assert(
54 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
55 "operand index exceeds intptr_t range"
56 );
57 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first) + index);
58}
59
60void llzkFunction_CallOpSetMapOperands(MlirOperation op, intptr_t groupCount, MlirValueRange const *groups) {
61 if (groupCount < 0)
62 return;
63
64 ::llvm::SmallVector<::mlir::Value> vals;
65 for (intptr_t g = 0; g < groupCount; ++g) {
66 assert(groups[g].size >= 0 && "group size must be non-negative");
67 for (intptr_t i = 0; i < groups[g].size; ++i) {
68 vals.push_back(unwrap(groups[g].values[i]));
69 }
70 }
71 ::llvm::cast<CallOp>(unwrap(op)).getMapOperandsMutable().join().assign(vals);
72
73 ::llvm::SmallVector<int32_t> newGroupSizes;
74 newGroupSizes.reserve(static_cast<size_t>(groupCount));
75 for (intptr_t g = 0; g < groupCount; ++g) {
76 assert(
77 groups[g].size <= static_cast<intptr_t>(std::numeric_limits<int32_t>::max()) &&
78 "group size exceeds int32_t range"
79 );
80 newGroupSizes.push_back(static_cast<int32_t>(groups[g].size));
81 }
82 MlirContext ctx = mlirOperationGetContext(op);
83 assert(
84 newGroupSizes.size() <= static_cast<size_t>(std::numeric_limits<intptr_t>::max()) &&
85 "group count exceeds intptr_t range"
86 );
87 mlirOperationSetAttributeByName(
88 op, mlirStringRefCreateFromCString("mapOpGroupSizes"),
89 mlirDenseI32ArrayGet(ctx, static_cast<intptr_t>(newGroupSizes.size()), newGroupSizes.data())
90 );
91}
92
93MlirAttribute llzkFunction_CallOpGetCallee(MlirOperation op) {
94 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("callee"));
95}
96
97void llzkFunction_CallOpSetCallee(MlirOperation op, MlirAttribute attr) {
98 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("callee"), attr);
99}
100
101MlirAttribute llzkFunction_CallOpGetTemplateParams(MlirOperation op) {
102 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("templateParams"));
103}
104
105void llzkFunction_CallOpSetTemplateParams(MlirOperation op, MlirAttribute attr) {
106 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("templateParams"), attr);
107}
108
109MlirAttribute llzkFunction_CallOpGetNumDimsPerMap(MlirOperation op) {
110 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("numDimsPerMap"));
111}
112
113void llzkFunction_CallOpSetNumDimsPerMap(MlirOperation op, MlirAttribute attr) {
114 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("numDimsPerMap"), attr);
115}
116
117MlirAttribute llzkFunction_CallOpGetMapOpGroupSizes(MlirOperation op) {
118 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("mapOpGroupSizes"));
119}
120
121void llzkFunction_CallOpSetMapOpGroupSizes(MlirOperation op, MlirAttribute attr) {
122 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("mapOpGroupSizes"), attr);
123}
124
125intptr_t llzkFunction_CallOpGetResult0Count(MlirOperation op) {
126 intptr_t count = mlirOperationGetNumResults(op);
127 assert(count >= 0 && "result count less than start index");
128 return count - 0;
129}
130
131MlirValue llzkFunction_CallOpGetResult0At(MlirOperation op, intptr_t index) {
132 return mlirOperationGetResult(op, 0 + index);
133}
134
136 return llvm::cast<CallOp>(unwrap(inp)).calleeContainsWitnessGen();
137}
138
140 return llvm::cast<CallOp>(unwrap(inp)).calleeIsStructCompute();
141}
142
144 return wrap(llvm::cast<CallOp>(unwrap(inp)).getSingleResultTypeOfCompute());
145}
146
148 return llvm::cast<CallOp>(unwrap(inp)).calleeIsStructConstrain();
149}
150
152 return wrap(llvm::cast<CallOp>(unwrap(inp)).getSelfValueFromConstrain());
153}
154
155MlirType llzkFunction_CallOpGetTypeSignature(MlirOperation inp) {
156 return wrap(llvm::cast<CallOp>(unwrap(inp)).getTypeSignature());
157}
158
159bool llzkFunction_CallOpCalleeIsCompute(MlirOperation inp) {
160 return llvm::cast<CallOp>(unwrap(inp)).calleeIsCompute();
161}
162
164 return llvm::cast<CallOp>(unwrap(inp)).calleeIsConstrain();
165}
166
167MlirOperation llzkFunction_CallOpResolveCallable(MlirOperation inp) {
168 return wrap(llvm::cast<CallOp>(unwrap(inp)).resolveCallable());
169}
170
171MlirValue llzkFunction_CallOpGetSelfValueFromCompute(MlirOperation inp) {
172 return wrap(llvm::cast<CallOp>(unwrap(inp)).getSelfValueFromCompute());
173}
174
176 return wrap(llvm::cast<CallOp>(unwrap(inp)).getSingleResultTypeOfWitnessGen());
177}
178
179MlirOperation llzkFunction_FuncDefOpBuild(MlirOpBuilder builder, MlirLocation location, MlirIdentifier sym_name, MlirAttribute function_type, MlirAttribute arg_attrs, MlirAttribute res_attrs) {
180 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString("function.def"), location);
181 MlirContext ctx = mlirOpBuilderGetContext(builder);
182 llvm::SmallVector<MlirNamedAttribute, 4> attributes;
183 if (!mlirAttributeIsNull(reinterpret_cast<MlirAttribute&>(sym_name))) {
184 attributes.push_back(mlirNamedAttributeGet(mlirIdentifierGet(ctx, mlirStringRefCreateFromCString("sym_name")), reinterpret_cast<MlirAttribute&>(sym_name)));
185 }
186 if (!mlirAttributeIsNull(function_type)) {
187 attributes.push_back(mlirNamedAttributeGet(mlirIdentifierGet(ctx, mlirStringRefCreateFromCString("function_type")), function_type));
188 }
189 if (!mlirAttributeIsNull(arg_attrs)) {
190 attributes.push_back(mlirNamedAttributeGet(mlirIdentifierGet(ctx, mlirStringRefCreateFromCString("arg_attrs")), arg_attrs));
191 }
192 if (!mlirAttributeIsNull(res_attrs)) {
193 attributes.push_back(mlirNamedAttributeGet(mlirIdentifierGet(ctx, mlirStringRefCreateFromCString("res_attrs")), res_attrs));
194 }
195 mlirOperationStateAddAttributes(&state, attributes.size(), attributes.data());
196 llvm::SmallVector<MlirRegion, 1> regions;
197 regions.push_back(mlirRegionCreate());
198 mlirOperationStateAddOwnedRegions(&state, regions.size(), regions.data());
199
200 return mlirOpBuilderInsert(builder, mlirOperationCreate(&state));
201}
202
203bool llzkOperationIsA_Function_FuncDefOp(MlirOperation inp) {
204 return llvm::isa<FuncDefOp>(unwrap(inp));
205}
206
207MlirAttribute llzkFunction_FuncDefOpGetSymName(MlirOperation op) {
208 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("sym_name"));
209}
210
211void llzkFunction_FuncDefOpSetSymName(MlirOperation op, MlirAttribute attr) {
212 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("sym_name"), attr);
213}
214
215MlirAttribute llzkFunction_FuncDefOpGetFunctionType(MlirOperation op) {
216 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("function_type"));
217}
218
219void llzkFunction_FuncDefOpSetFunctionType(MlirOperation op, MlirAttribute attr) {
220 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("function_type"), attr);
221}
222
223MlirAttribute llzkFunction_FuncDefOpGetArgAttrs(MlirOperation op) {
224 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("arg_attrs"));
225}
226
227void llzkFunction_FuncDefOpSetArgAttrs(MlirOperation op, MlirAttribute attr) {
228 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("arg_attrs"), attr);
229}
230
231MlirAttribute llzkFunction_FuncDefOpGetResAttrs(MlirOperation op) {
232 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("res_attrs"));
233}
234
235void llzkFunction_FuncDefOpSetResAttrs(MlirOperation op, MlirAttribute attr) {
236 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("res_attrs"), attr);
237}
238
239MlirRegion llzkFunction_FuncDefOpGetBody(MlirOperation op) {
240 return mlirOperationGetRegion(op, 0);
241}
242
244 return llvm::cast<FuncDefOp>(unwrap(inp)).isStructProduct();
245}
246
247void llzkFunction_FuncDefOpSetAllowNonNativeFieldOpsAttr(MlirOperation inp, bool newValue) {
248 llvm::cast<FuncDefOp>(unwrap(inp)).setAllowNonNativeFieldOpsAttr(newValue);
249}
250
252 return llvm::cast<FuncDefOp>(unwrap(inp)).hasAllowNonNativeFieldOpsAttr();
253}
254
255bool llzkFunction_FuncDefOpNameIsProduct(MlirOperation inp) {
256 return llvm::cast<FuncDefOp>(unwrap(inp)).nameIsProduct();
257}
258
259bool llzkFunction_FuncDefOpHasArgPublicAttr(MlirOperation inp, unsigned index) {
260 return llvm::cast<FuncDefOp>(unwrap(inp)).hasArgPublicAttr(index);
261}
262
264 return llvm::cast<FuncDefOp>(unwrap(inp)).hasAllowWitnessAttr();
265}
266
268 return llvm::cast<FuncDefOp>(unwrap(inp)).isStructConstrain();
269}
270
271bool llzkFunction_FuncDefOpNameIsCompute(MlirOperation inp) {
272 return llvm::cast<FuncDefOp>(unwrap(inp)).nameIsCompute();
273}
274
275bool llzkFunction_FuncDefOpIsDeclaration(MlirOperation inp) {
276 return llvm::cast<FuncDefOp>(unwrap(inp)).isDeclaration();
277}
278
280 return wrap(llvm::cast<FuncDefOp>(unwrap(inp)).getSingleResultTypeOfCompute());
281}
282
284 return wrap(llvm::cast<FuncDefOp>(unwrap(inp)).getSelfValueFromConstrain());
285}
286
288 return llvm::cast<FuncDefOp>(unwrap(inp)).nameIsConstrain();
289}
290
292 return llvm::cast<FuncDefOp>(unwrap(inp)).isStructCompute();
293}
294
295MlirRegion llzkFunction_FuncDefOpGetCallableRegion(MlirOperation inp) {
296 return wrap(llvm::cast<FuncDefOp>(unwrap(inp)).getCallableRegion());
297}
298
299void llzkFunction_FuncDefOpSetAllowConstraintAttr(MlirOperation inp, bool newValue) {
300 llvm::cast<FuncDefOp>(unwrap(inp)).setAllowConstraintAttr(newValue);
301}
302
304 return llvm::cast<FuncDefOp>(unwrap(inp)).hasAllowConstraintAttr();
305}
306
307bool llzkFunction_FuncDefOpIsInStruct(MlirOperation inp) {
308 return llvm::cast<FuncDefOp>(unwrap(inp)).isInStruct();
309}
310
311void llzkFunction_FuncDefOpSetAllowWitnessAttr(MlirOperation inp, bool newValue) {
312 llvm::cast<FuncDefOp>(unwrap(inp)).setAllowWitnessAttr(newValue);
313}
314
316 return wrap(llvm::cast<FuncDefOp>(unwrap(inp)).getSelfValueFromCompute());
317}
318
319bool llzkFunction_FuncDefOpHasArgName(MlirOperation inp, unsigned index) {
320 return llvm::cast<FuncDefOp>(unwrap(inp)).hasArgName(index);
321}
322
323MlirAttribute llzkFunction_FuncDefOpGetFullyQualifiedName(MlirOperation inp, bool requireParent) {
324 return wrap(llvm::cast<FuncDefOp>(unwrap(inp)).getFullyQualifiedName(requireParent));
325}
326
327MlirOperation llzkFunction_ReturnOpBuild(MlirOpBuilder builder, MlirLocation location, intptr_t operandsSize, MlirValue const *operands) {
328 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString("function.return"), location);
329 mlirOperationStateAddOperands(&state, operandsSize, operands);
330
331 return mlirOpBuilderInsert(builder, mlirOperationCreate(&state));
332}
333
334bool llzkOperationIsA_Function_ReturnOp(MlirOperation inp) {
335 return llvm::isa<ReturnOp>(unwrap(inp));
336}
337
338intptr_t llzkFunction_ReturnOpGetOperandsCount(MlirOperation op) {
339 auto range = llvm::cast<ReturnOp>(unwrap(op)).getODSOperandIndexAndLength(0);
340 return range.second;
341}
342
343MlirValue llzkFunction_ReturnOpGetOperandsAt(MlirOperation op, intptr_t index) {
344 auto range = llvm::cast<ReturnOp>(unwrap(op)).getODSOperandIndexAndLength(0);
345 assert(index >= 0 && index < range.second && "variadic operand index out of range");
346 assert(
347 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
348 "operand index exceeds intptr_t range"
349 );
350 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first) + index);
351}
352
353void llzkFunction_ReturnOpSetOperands(MlirOperation op, intptr_t count, MlirValue const *values) {
354 if (count < 0)
355 return;
356 ::llvm::SmallVector<::mlir::Value> vals;
357 vals.reserve(static_cast<size_t>(count));
358 for (intptr_t i = 0; i < count; ++i)
359 vals.push_back(unwrap(values[i]));
360 ::llvm::cast<ReturnOp>(unwrap(op)).getOperandsMutable().assign(vals);
361}
MlirContext mlirOpBuilderGetContext(MlirOpBuilder builder)
Returns the MLIR context associated with builder.
Definition Builder.cpp:95
MlirOperation mlirOpBuilderInsert(MlirOpBuilder builder, MlirOperation op)
Inserts op at the current insertion point of builder and returns it.
Definition Builder.cpp:167
bool llzkFunction_FuncDefOpNameIsProduct(MlirOperation inp)
Return true iff the function name is FUNC_NAME_PRODUCT (if needed, a check that this FuncDefOp is loc...
MlirRegion llzkFunction_FuncDefOpGetCallableRegion(MlirOperation inp)
Required by FunctionOpInterface.
void llzkFunction_FuncDefOpSetResAttrs(MlirOperation op, MlirAttribute attr)
Set ResAttrs attribute of llzk::function::FuncDefOp Operation.
MlirOperation llzkFunction_FuncDefOpBuild(MlirOpBuilder builder, MlirLocation location, MlirIdentifier sym_name, MlirAttribute function_type, MlirAttribute arg_attrs, MlirAttribute res_attrs)
Build a llzk::function::FuncDefOp Operation.
MlirValue llzkFunction_ReturnOpGetOperandsAt(MlirOperation op, intptr_t index)
Get Operands operand at index from llzk::function::ReturnOp Operation.
bool llzkFunction_FuncDefOpIsStructProduct(MlirOperation inp)
Return true iff the function is within a StructDefOp and named FUNC_NAME_PRODUCT.
intptr_t llzkFunction_CallOpGetResult0Count(MlirOperation op)
Get number of Result0 results in llzk::function::CallOp Operation.
MlirAttribute llzkFunction_FuncDefOpGetFullyQualifiedName(MlirOperation inp, bool requireParent)
Return the full name for this function from the root module, including all surrounding symbol table n...
bool llzkFunction_CallOpCalleeIsStructConstrain(MlirOperation inp)
Return true iff the callee function name is FUNC_NAME_CONSTRAIN within a StructDefOp.
void llzkFunction_FuncDefOpSetFunctionType(MlirOperation op, MlirAttribute attr)
Set FunctionType attribute of llzk::function::FuncDefOp Operation.
MlirAttribute llzkFunction_CallOpGetMapOpGroupSizes(MlirOperation op)
Get MapOpGroupSizes attribute from llzk::function::CallOp Operation.
bool llzkFunction_CallOpCalleeIsCompute(MlirOperation inp)
Return true iff the callee function name is FUNC_NAME_COMPUTE (this does not check if the callee func...
MlirAttribute llzkFunction_CallOpGetTemplateParams(MlirOperation op)
Get TemplateParams attribute from llzk::function::CallOp Operation.
intptr_t llzkFunction_CallOpGetMapOperandsCount(MlirOperation op)
Get number of MapOperands operands in llzk::function::CallOp Operation.
intptr_t llzkFunction_CallOpGetArgOperandsCount(MlirOperation op)
Get number of ArgOperands operands in llzk::function::CallOp Operation.
void llzkFunction_CallOpSetMapOperands(MlirOperation op, intptr_t groupCount, MlirValueRange const *groups)
Set MapOperands operand groups of llzk::function::CallOp Operation.
void llzkFunction_ReturnOpSetOperands(MlirOperation op, intptr_t count, MlirValue const *values)
Set Operands operands of llzk::function::ReturnOp Operation.
bool llzkFunction_FuncDefOpHasAllowWitnessAttr(MlirOperation inp)
Return true iff the function def has the allow_witness attribute.
MlirValue llzkFunction_FuncDefOpGetSelfValueFromConstrain(MlirOperation inp)
Return the "self" value (i.e.
MlirAttribute llzkFunction_FuncDefOpGetResAttrs(MlirOperation op)
Get ResAttrs attribute from llzk::function::FuncDefOp Operation.
MlirType llzkFunction_CallOpGetSingleResultTypeOfCompute(MlirOperation inp)
Assuming the callee is FUNC_NAME_COMPUTE, return the single StructType result.
MlirOperation llzkFunction_ReturnOpBuild(MlirOpBuilder builder, MlirLocation location, intptr_t operandsSize, MlirValue const *operands)
Build a llzk::function::ReturnOp Operation.
bool llzkFunction_FuncDefOpIsDeclaration(MlirOperation inp)
Required by SymbolOpInterface.
void llzkFunction_CallOpSetCallee(MlirOperation op, MlirAttribute attr)
Set Callee attribute of llzk::function::CallOp Operation.
bool llzkFunction_CallOpCalleeContainsWitnessGen(MlirOperation inp)
Return true iff the callee function can contain witness generation code (this does not check if the c...
bool llzkFunction_FuncDefOpHasAllowConstraintAttr(MlirOperation inp)
Return true iff the function def has the allow_constraint attribute.
bool llzkFunction_FuncDefOpIsInStruct(MlirOperation inp)
Return true iff the function is within a StructDefOp.
void llzkFunction_FuncDefOpSetArgAttrs(MlirOperation op, MlirAttribute attr)
Set ArgAttrs attribute of llzk::function::FuncDefOp Operation.
void llzkFunction_FuncDefOpSetAllowConstraintAttr(MlirOperation inp, bool newValue)
Add (resp. remove) the allow_constraint attribute to (resp. from) the function def.
void llzkFunction_CallOpSetArgOperands(MlirOperation op, intptr_t count, MlirValue const *values)
Set ArgOperands operands of llzk::function::CallOp Operation.
bool llzkFunction_FuncDefOpHasArgName(MlirOperation inp, unsigned index)
Return true iff the argument at the given index has a function.arg_name attribute.
MlirValue llzkFunction_CallOpGetSelfValueFromConstrain(MlirOperation inp)
Return the "self" value (i.e.
bool llzkFunction_FuncDefOpHasArgPublicAttr(MlirOperation inp, unsigned index)
Return true iff the argument at the given index has pub attribute.
void llzkFunction_FuncDefOpSetAllowNonNativeFieldOpsAttr(MlirOperation inp, bool newValue)
Add (resp. remove) the allow_non_native_field_ops attribute to (resp. from) the function def.
bool llzkFunction_FuncDefOpIsStructConstrain(MlirOperation inp)
Return true iff the function is within a StructDefOp and named FUNC_NAME_CONSTRAIN.
MlirValue llzkFunction_CallOpGetArgOperandsAt(MlirOperation op, intptr_t index)
Get ArgOperands operand at index from llzk::function::CallOp Operation.
MlirType llzkFunction_FuncDefOpGetSingleResultTypeOfCompute(MlirOperation inp)
Assuming the name is FUNC_NAME_COMPUTE, return the single StructType result.
void llzkFunction_CallOpSetTemplateParams(MlirOperation op, MlirAttribute attr)
Set TemplateParams attribute of llzk::function::CallOp Operation.
void llzkFunction_CallOpSetNumDimsPerMap(MlirOperation op, MlirAttribute attr)
Set NumDimsPerMap attribute of llzk::function::CallOp Operation.
bool llzkOperationIsA_Function_ReturnOp(MlirOperation inp)
Returns true if the Operation is a llzk::function::ReturnOp.
bool llzkOperationIsA_Function_CallOp(MlirOperation inp)
Returns true if the Operation is a llzk::function::CallOp.
MlirAttribute llzkFunction_CallOpGetCallee(MlirOperation op)
Get Callee attribute from llzk::function::CallOp Operation.
MlirType llzkFunction_CallOpGetSingleResultTypeOfWitnessGen(MlirOperation inp)
Assuming the callee contains witness generation code, return the single StructType result.
MlirAttribute llzkFunction_FuncDefOpGetArgAttrs(MlirOperation op)
Get ArgAttrs attribute from llzk::function::FuncDefOp Operation.
bool llzkFunction_FuncDefOpNameIsConstrain(MlirOperation inp)
Return true iff the function name is FUNC_NAME_CONSTRAIN (if needed, a check that this FuncDefOp is l...
MlirValue llzkFunction_FuncDefOpGetSelfValueFromCompute(MlirOperation inp)
Return the "self" value (i.e.
bool llzkFunction_FuncDefOpIsStructCompute(MlirOperation inp)
Return true iff the function is within a StructDefOp and named FUNC_NAME_COMPUTE.
void llzkFunction_FuncDefOpSetAllowWitnessAttr(MlirOperation inp, bool newValue)
Add (resp. remove) the allow_witness attribute to (resp. from) the function def.
intptr_t llzkFunction_ReturnOpGetOperandsCount(MlirOperation op)
Get number of Operands operands in llzk::function::ReturnOp Operation.
MlirValue llzkFunction_CallOpGetMapOperandsAt(MlirOperation op, intptr_t index)
Get MapOperands operand at index from llzk::function::CallOp Operation.
bool llzkFunction_FuncDefOpHasAllowNonNativeFieldOpsAttr(MlirOperation inp)
Return true iff the function def has the allow_non_native_field_ops attribute.
void llzkFunction_FuncDefOpSetSymName(MlirOperation op, MlirAttribute attr)
Set SymName attribute of llzk::function::FuncDefOp Operation.
MlirRegion llzkFunction_FuncDefOpGetBody(MlirOperation op)
Get Body region from llzk::function::FuncDefOp Operation.
MlirType llzkFunction_CallOpGetTypeSignature(MlirOperation inp)
Return the FunctionType inferred from the arg operands and result types of this CallOp.
MlirValue llzkFunction_CallOpGetSelfValueFromCompute(MlirOperation inp)
Return the "self" value (i.e.
bool llzkFunction_CallOpCalleeIsStructCompute(MlirOperation inp)
Return true iff the callee function name is FUNC_NAME_COMPUTE within a StructDefOp.
MlirAttribute llzkFunction_FuncDefOpGetFunctionType(MlirOperation op)
Get FunctionType attribute from llzk::function::FuncDefOp Operation.
MlirValue llzkFunction_CallOpGetResult0At(MlirOperation op, intptr_t index)
Get Result0 result at index from llzk::function::CallOp Operation.
MlirOperation llzkFunction_CallOpResolveCallable(MlirOperation inp)
Required by CallOpInterface.
bool llzkFunction_FuncDefOpNameIsCompute(MlirOperation inp)
Return true iff the function name is FUNC_NAME_COMPUTE (if needed, a check that this FuncDefOp is loc...
bool llzkOperationIsA_Function_FuncDefOp(MlirOperation inp)
Returns true if the Operation is a llzk::function::FuncDefOp.
void llzkFunction_CallOpSetMapOpGroupSizes(MlirOperation op, MlirAttribute attr)
Set MapOpGroupSizes attribute of llzk::function::CallOp Operation.
MlirAttribute llzkFunction_CallOpGetNumDimsPerMap(MlirOperation op)
Get NumDimsPerMap attribute from llzk::function::CallOp Operation.
MlirAttribute llzkFunction_FuncDefOpGetSymName(MlirOperation op)
Get SymName attribute from llzk::function::FuncDefOp Operation.
bool llzkFunction_CallOpCalleeIsConstrain(MlirOperation inp)
Return true iff the callee function name is FUNC_NAME_CONSTRAIN (this does not check if the callee fu...
Representation of an mlir::ValueRange
Definition Support.h:47
intptr_t size
Number of values in the range.
Definition Support.h:51