LLZK 3.0.0
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
125MlirAttribute llzkFunction_CallOpGetArgAttrs(MlirOperation op) {
126 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("arg_attrs"));
127}
128
129void llzkFunction_CallOpSetArgAttrs(MlirOperation op, MlirAttribute attr) {
130 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("arg_attrs"), attr);
131}
132
133MlirAttribute llzkFunction_CallOpGetResAttrs(MlirOperation op) {
134 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("res_attrs"));
135}
136
137void llzkFunction_CallOpSetResAttrs(MlirOperation op, MlirAttribute attr) {
138 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("res_attrs"), attr);
139}
140
141intptr_t llzkFunction_CallOpGetResult0Count(MlirOperation op) {
142 intptr_t count = mlirOperationGetNumResults(op);
143 assert(count >= 0 && "result count less than start index");
144 return count - 0;
145}
146
147MlirValue llzkFunction_CallOpGetResult0At(MlirOperation op, intptr_t index) {
148 return mlirOperationGetResult(op, 0 + index);
149}
150
152 return llvm::cast<CallOp>(unwrap(inp)).calleeContainsWitnessGen();
153}
154
156 return llvm::cast<CallOp>(unwrap(inp)).calleeIsStructCompute();
157}
158
160 return wrap(llvm::cast<CallOp>(unwrap(inp)).getSingleResultTypeOfCompute());
161}
162
164 return llvm::cast<CallOp>(unwrap(inp)).calleeIsStructConstrain();
165}
166
168 return wrap(llvm::cast<CallOp>(unwrap(inp)).getSelfValueFromConstrain());
169}
170
171bool llzkFunction_CallOpCalleeIsCompute(MlirOperation inp) {
172 return llvm::cast<CallOp>(unwrap(inp)).calleeIsCompute();
173}
174
176 return llvm::cast<CallOp>(unwrap(inp)).calleeIsConstrain();
177}
178
179bool llzkFunction_CallOpCalleeIsProduct(MlirOperation inp) {
180 return llvm::cast<CallOp>(unwrap(inp)).calleeIsProduct();
181}
182
184 return llvm::cast<CallOp>(unwrap(inp)).calleeIsStructProduct();
185}
186
187bool llzkFunction_CallOpCalleeIsInStruct(MlirOperation inp) {
188 return llvm::cast<CallOp>(unwrap(inp)).calleeIsInStruct();
189}
190
191MlirValue llzkFunction_CallOpGetSelfValueFromProduct(MlirOperation inp) {
192 return wrap(llvm::cast<CallOp>(unwrap(inp)).getSelfValueFromProduct());
193}
194
195MlirValue llzkFunction_CallOpGetSelfValueFromCompute(MlirOperation inp) {
196 return wrap(llvm::cast<CallOp>(unwrap(inp)).getSelfValueFromCompute());
197}
198
200 return wrap(llvm::cast<CallOp>(unwrap(inp)).getSingleResultTypeOfWitnessGen());
201}
202
203MlirOperation llzkFunction_CallOpResolveCallable(MlirOperation inp) {
204 return wrap(llvm::cast<CallOp>(unwrap(inp)).resolveCallable());
205}
206
207MlirValue llzkFunction_CallOpGetSelfValue(MlirOperation inp) {
208 return wrap(llvm::cast<CallOp>(unwrap(inp)).getSelfValue());
209}
210
211MlirOperation llzkFunction_FuncDefOpBuild(MlirOpBuilder builder, MlirLocation location, MlirIdentifier sym_name, MlirAttribute function_type, MlirAttribute arg_attrs, MlirAttribute res_attrs) {
212 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString("function.def"), location);
213 MlirContext ctx = mlirOpBuilderGetContext(builder);
214 llvm::SmallVector<MlirNamedAttribute, 4> attributes;
215 if (!mlirAttributeIsNull(reinterpret_cast<MlirAttribute&>(sym_name))) {
216 attributes.push_back(mlirNamedAttributeGet(mlirIdentifierGet(ctx, mlirStringRefCreateFromCString("sym_name")), reinterpret_cast<MlirAttribute&>(sym_name)));
217 }
218 if (!mlirAttributeIsNull(function_type)) {
219 attributes.push_back(mlirNamedAttributeGet(mlirIdentifierGet(ctx, mlirStringRefCreateFromCString("function_type")), function_type));
220 }
221 if (!mlirAttributeIsNull(arg_attrs)) {
222 attributes.push_back(mlirNamedAttributeGet(mlirIdentifierGet(ctx, mlirStringRefCreateFromCString("arg_attrs")), arg_attrs));
223 }
224 if (!mlirAttributeIsNull(res_attrs)) {
225 attributes.push_back(mlirNamedAttributeGet(mlirIdentifierGet(ctx, mlirStringRefCreateFromCString("res_attrs")), res_attrs));
226 }
227 mlirOperationStateAddAttributes(&state, attributes.size(), attributes.data());
228 llvm::SmallVector<MlirRegion, 1> regions;
229 regions.push_back(mlirRegionCreate());
230 mlirOperationStateAddOwnedRegions(&state, regions.size(), regions.data());
231
232 return mlirOpBuilderInsert(builder, mlirOperationCreate(&state));
233}
234
235bool llzkOperationIsA_Function_FuncDefOp(MlirOperation inp) {
236 return llvm::isa<FuncDefOp>(unwrap(inp));
237}
238
239MlirAttribute llzkFunction_FuncDefOpGetSymName(MlirOperation op) {
240 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("sym_name"));
241}
242
243void llzkFunction_FuncDefOpSetSymName(MlirOperation op, MlirAttribute attr) {
244 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("sym_name"), attr);
245}
246
247MlirAttribute llzkFunction_FuncDefOpGetFunctionType(MlirOperation op) {
248 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("function_type"));
249}
250
251void llzkFunction_FuncDefOpSetFunctionType(MlirOperation op, MlirAttribute attr) {
252 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("function_type"), attr);
253}
254
255MlirAttribute llzkFunction_FuncDefOpGetArgAttrs(MlirOperation op) {
256 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("arg_attrs"));
257}
258
259void llzkFunction_FuncDefOpSetArgAttrs(MlirOperation op, MlirAttribute attr) {
260 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("arg_attrs"), attr);
261}
262
263MlirAttribute llzkFunction_FuncDefOpGetResAttrs(MlirOperation op) {
264 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("res_attrs"));
265}
266
267void llzkFunction_FuncDefOpSetResAttrs(MlirOperation op, MlirAttribute attr) {
268 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("res_attrs"), attr);
269}
270
271MlirRegion llzkFunction_FuncDefOpGetBody(MlirOperation op) {
272 return mlirOperationGetRegion(op, 0);
273}
274
275void llzkFunction_FuncDefOpSetAllowNonNativeFieldOpsAttr(MlirOperation inp, bool newValue) {
276 llvm::cast<FuncDefOp>(unwrap(inp)).setAllowNonNativeFieldOpsAttr(newValue);
277}
278
280 return llvm::cast<FuncDefOp>(unwrap(inp)).isStructProduct();
281}
282
284 return llvm::cast<FuncDefOp>(unwrap(inp)).hasAllowNonNativeFieldOpsAttr();
285}
286
287bool llzkFunction_FuncDefOpHasArgPublicAttr(MlirOperation inp, unsigned index) {
288 return llvm::cast<FuncDefOp>(unwrap(inp)).hasArgPublicAttr(index);
289}
290
291bool llzkFunction_FuncDefOpNameIsProduct(MlirOperation inp) {
292 return llvm::cast<FuncDefOp>(unwrap(inp)).nameIsProduct();
293}
294
296 return llvm::cast<FuncDefOp>(unwrap(inp)).hasAllowWitnessAttr();
297}
298
300 return llvm::cast<FuncDefOp>(unwrap(inp)).hasAllowVerifOpsAttr();
301}
302
303bool llzkFunction_FuncDefOpHasResName(MlirOperation inp, unsigned index) {
304 return llvm::cast<FuncDefOp>(unwrap(inp)).hasResName(index);
305}
306
308 return llvm::cast<FuncDefOp>(unwrap(inp)).isStructConstrain();
309}
310
311bool llzkFunction_FuncDefOpNameIsCompute(MlirOperation inp) {
312 return llvm::cast<FuncDefOp>(unwrap(inp)).nameIsCompute();
313}
314
315bool llzkFunction_FuncDefOpIsDeclaration(MlirOperation inp) {
316 return llvm::cast<FuncDefOp>(unwrap(inp)).isDeclaration();
317}
318
320 return wrap(llvm::cast<FuncDefOp>(unwrap(inp)).getSingleResultTypeOfCompute());
321}
322
324 return wrap(llvm::cast<FuncDefOp>(unwrap(inp)).getSelfValueFromConstrain());
325}
326
327void llzkFunction_FuncDefOpSetAllowVerifOpsAttr(MlirOperation inp, bool newValue) {
328 llvm::cast<FuncDefOp>(unwrap(inp)).setAllowVerifOpsAttr(newValue);
329}
330
332 return llvm::cast<FuncDefOp>(unwrap(inp)).nameIsConstrain();
333}
334
335void llzkFunction_FuncDefOpSetAllowConstraintAttr(MlirOperation inp, bool newValue) {
336 llvm::cast<FuncDefOp>(unwrap(inp)).setAllowConstraintAttr(newValue);
337}
338
339MlirRegion llzkFunction_FuncDefOpGetCallableRegion(MlirOperation inp) {
340 return wrap(llvm::cast<FuncDefOp>(unwrap(inp)).getCallableRegion());
341}
342
344 return llvm::cast<FuncDefOp>(unwrap(inp)).hasAllowConstraintAttr();
345}
346
347bool llzkFunction_FuncDefOpIsInStruct(MlirOperation inp) {
348 return llvm::cast<FuncDefOp>(unwrap(inp)).isInStruct();
349}
350
352 return llvm::cast<FuncDefOp>(unwrap(inp)).isStructCompute();
353}
354
355void llzkFunction_FuncDefOpSetAllowWitnessAttr(MlirOperation inp, bool newValue) {
356 llvm::cast<FuncDefOp>(unwrap(inp)).setAllowWitnessAttr(newValue);
357}
358
360 return wrap(llvm::cast<FuncDefOp>(unwrap(inp)).getSelfValueFromCompute());
361}
362
364 return wrap(llvm::cast<FuncDefOp>(unwrap(inp)).getSelfValueFromProduct());
365}
366
367bool llzkFunction_FuncDefOpHasArgName(MlirOperation inp, unsigned index) {
368 return llvm::cast<FuncDefOp>(unwrap(inp)).hasArgName(index);
369}
370
371MlirAttribute llzkFunction_FuncDefOpGetFullyQualifiedName(MlirOperation inp, bool requireParent) {
372 return wrap(llvm::cast<FuncDefOp>(unwrap(inp)).getFullyQualifiedName(requireParent));
373}
374
375MlirOperation llzkFunction_ReturnOpBuild(MlirOpBuilder builder, MlirLocation location, intptr_t operandsSize, MlirValue const *operands) {
376 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString("function.return"), location);
377 mlirOperationStateAddOperands(&state, operandsSize, operands);
378
379 return mlirOpBuilderInsert(builder, mlirOperationCreate(&state));
380}
381
382bool llzkOperationIsA_Function_ReturnOp(MlirOperation inp) {
383 return llvm::isa<ReturnOp>(unwrap(inp));
384}
385
386intptr_t llzkFunction_ReturnOpGetOperandsCount(MlirOperation op) {
387 auto range = llvm::cast<ReturnOp>(unwrap(op)).getODSOperandIndexAndLength(0);
388 return range.second;
389}
390
391MlirValue llzkFunction_ReturnOpGetOperandsAt(MlirOperation op, intptr_t index) {
392 auto range = llvm::cast<ReturnOp>(unwrap(op)).getODSOperandIndexAndLength(0);
393 assert(index >= 0 && index < range.second && "variadic operand index out of range");
394 assert(
395 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
396 "operand index exceeds intptr_t range"
397 );
398 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first) + index);
399}
400
401void llzkFunction_ReturnOpSetOperands(MlirOperation op, intptr_t count, MlirValue const *values) {
402 if (count < 0)
403 return;
404 ::llvm::SmallVector<::mlir::Value> vals;
405 vals.reserve(static_cast<size_t>(count));
406 for (intptr_t i = 0; i < count; ++i)
407 vals.push_back(unwrap(values[i]));
408 ::llvm::cast<ReturnOp>(unwrap(op)).getOperandsMutable().assign(vals);
409}
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_CallOpGetResAttrs(MlirOperation op)
Get ResAttrs attribute from llzk::function::CallOp Operation.
void llzkFunction_CallOpSetResAttrs(MlirOperation op, MlirAttribute attr)
Set ResAttrs attribute of llzk::function::CallOp 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...
void llzkFunction_CallOpSetArgAttrs(MlirOperation op, MlirAttribute attr)
Set ArgAttrs attribute of llzk::function::CallOp Operation.
MlirAttribute llzkFunction_CallOpGetTemplateParams(MlirOperation op)
Get TemplateParams attribute from llzk::function::CallOp Operation.
bool llzkFunction_FuncDefOpHasAllowVerifOpsAttr(MlirOperation inp)
Return true iff the function def has the allow_verif_ops attribute.
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.
MlirValue llzkFunction_CallOpGetSelfValueFromProduct(MlirOperation inp)
Return the "self" value (i.e.
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.
MlirValue llzkFunction_CallOpGetSelfValue(MlirOperation inp)
getSelfValue
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.
MlirValue llzkFunction_FuncDefOpGetSelfValueFromProduct(MlirOperation inp)
Return the "self" value (i.e.
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.
bool llzkFunction_CallOpCalleeIsInStruct(MlirOperation inp)
Return true iff the callee function is within a StructDefOp.
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_CallOpCalleeIsStructProduct(MlirOperation inp)
Return true iff the callee function name is FUNC_NAME_PRODUCT within a StructDefOp.
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.
bool llzkFunction_CallOpCalleeIsProduct(MlirOperation inp)
Return true iff the callee function name is FUNC_NAME_PRODUCT (this does not check if the callee func...
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.
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.
bool llzkFunction_FuncDefOpHasResName(MlirOperation inp, unsigned index)
Return true iff the result at the given index has a function.res_name attribute.
MlirValue llzkFunction_CallOpGetResult0At(MlirOperation op, intptr_t index)
Get Result0 result at index from llzk::function::CallOp Operation.
MlirOperation llzkFunction_CallOpResolveCallable(MlirOperation inp)
resolveCallable
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_FuncDefOpSetAllowVerifOpsAttr(MlirOperation inp, bool newValue)
Add (resp. remove) the allow_verif_ops attribute to (resp. from) the function def.
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...
MlirAttribute llzkFunction_CallOpGetArgAttrs(MlirOperation op)
Get ArgAttrs attribute from llzk::function::CallOp Operation.
Representation of an mlir::ValueRange.
Definition Support.h:47
intptr_t size
Number of values in the range.
Definition Support.h:51