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
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
167bool llzkFunction_CallOpCalleeIsProduct(MlirOperation inp) {
168 return llvm::cast<CallOp>(unwrap(inp)).calleeIsProduct();
169}
170
171MlirOperation llzkFunction_CallOpResolveCallable(MlirOperation inp) {
172 return wrap(llvm::cast<CallOp>(unwrap(inp)).resolveCallable());
173}
174
176 return llvm::cast<CallOp>(unwrap(inp)).calleeIsStructProduct();
177}
178
179MlirValue llzkFunction_CallOpGetSelfValueFromCompute(MlirOperation inp) {
180 return wrap(llvm::cast<CallOp>(unwrap(inp)).getSelfValueFromCompute());
181}
182
184 return wrap(llvm::cast<CallOp>(unwrap(inp)).getSingleResultTypeOfWitnessGen());
185}
186
187MlirOperation llzkFunction_FuncDefOpBuild(MlirOpBuilder builder, MlirLocation location, MlirIdentifier sym_name, MlirAttribute function_type, MlirAttribute arg_attrs, MlirAttribute res_attrs) {
188 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString("function.def"), location);
189 MlirContext ctx = mlirOpBuilderGetContext(builder);
190 llvm::SmallVector<MlirNamedAttribute, 4> attributes;
191 if (!mlirAttributeIsNull(reinterpret_cast<MlirAttribute&>(sym_name))) {
192 attributes.push_back(mlirNamedAttributeGet(mlirIdentifierGet(ctx, mlirStringRefCreateFromCString("sym_name")), reinterpret_cast<MlirAttribute&>(sym_name)));
193 }
194 if (!mlirAttributeIsNull(function_type)) {
195 attributes.push_back(mlirNamedAttributeGet(mlirIdentifierGet(ctx, mlirStringRefCreateFromCString("function_type")), function_type));
196 }
197 if (!mlirAttributeIsNull(arg_attrs)) {
198 attributes.push_back(mlirNamedAttributeGet(mlirIdentifierGet(ctx, mlirStringRefCreateFromCString("arg_attrs")), arg_attrs));
199 }
200 if (!mlirAttributeIsNull(res_attrs)) {
201 attributes.push_back(mlirNamedAttributeGet(mlirIdentifierGet(ctx, mlirStringRefCreateFromCString("res_attrs")), res_attrs));
202 }
203 mlirOperationStateAddAttributes(&state, attributes.size(), attributes.data());
204 llvm::SmallVector<MlirRegion, 1> regions;
205 regions.push_back(mlirRegionCreate());
206 mlirOperationStateAddOwnedRegions(&state, regions.size(), regions.data());
207
208 return mlirOpBuilderInsert(builder, mlirOperationCreate(&state));
209}
210
211bool llzkOperationIsA_Function_FuncDefOp(MlirOperation inp) {
212 return llvm::isa<FuncDefOp>(unwrap(inp));
213}
214
215MlirAttribute llzkFunction_FuncDefOpGetSymName(MlirOperation op) {
216 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("sym_name"));
217}
218
219void llzkFunction_FuncDefOpSetSymName(MlirOperation op, MlirAttribute attr) {
220 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("sym_name"), attr);
221}
222
223MlirAttribute llzkFunction_FuncDefOpGetFunctionType(MlirOperation op) {
224 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("function_type"));
225}
226
227void llzkFunction_FuncDefOpSetFunctionType(MlirOperation op, MlirAttribute attr) {
228 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("function_type"), attr);
229}
230
231MlirAttribute llzkFunction_FuncDefOpGetArgAttrs(MlirOperation op) {
232 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("arg_attrs"));
233}
234
235void llzkFunction_FuncDefOpSetArgAttrs(MlirOperation op, MlirAttribute attr) {
236 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("arg_attrs"), attr);
237}
238
239MlirAttribute llzkFunction_FuncDefOpGetResAttrs(MlirOperation op) {
240 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("res_attrs"));
241}
242
243void llzkFunction_FuncDefOpSetResAttrs(MlirOperation op, MlirAttribute attr) {
244 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("res_attrs"), attr);
245}
246
247MlirRegion llzkFunction_FuncDefOpGetBody(MlirOperation op) {
248 return mlirOperationGetRegion(op, 0);
249}
250
251void llzkFunction_FuncDefOpSetAllowNonNativeFieldOpsAttr(MlirOperation inp, bool newValue) {
252 llvm::cast<FuncDefOp>(unwrap(inp)).setAllowNonNativeFieldOpsAttr(newValue);
253}
254
256 return llvm::cast<FuncDefOp>(unwrap(inp)).isStructCompute();
257}
258
260 return llvm::cast<FuncDefOp>(unwrap(inp)).hasAllowNonNativeFieldOpsAttr();
261}
262
263bool llzkFunction_FuncDefOpNameIsProduct(MlirOperation inp) {
264 return llvm::cast<FuncDefOp>(unwrap(inp)).nameIsProduct();
265}
266
267bool llzkFunction_FuncDefOpHasArgPublicAttr(MlirOperation inp, unsigned index) {
268 return llvm::cast<FuncDefOp>(unwrap(inp)).hasArgPublicAttr(index);
269}
270
272 return llvm::cast<FuncDefOp>(unwrap(inp)).isStructProduct();
273}
274
276 return llvm::cast<FuncDefOp>(unwrap(inp)).hasAllowWitnessAttr();
277}
278
279bool llzkFunction_FuncDefOpHasResName(MlirOperation inp, unsigned index) {
280 return llvm::cast<FuncDefOp>(unwrap(inp)).hasResName(index);
281}
282
284 return llvm::cast<FuncDefOp>(unwrap(inp)).isStructConstrain();
285}
286
287bool llzkFunction_FuncDefOpNameIsCompute(MlirOperation inp) {
288 return llvm::cast<FuncDefOp>(unwrap(inp)).nameIsCompute();
289}
290
291bool llzkFunction_FuncDefOpIsDeclaration(MlirOperation inp) {
292 return llvm::cast<FuncDefOp>(unwrap(inp)).isDeclaration();
293}
294
296 return wrap(llvm::cast<FuncDefOp>(unwrap(inp)).getSingleResultTypeOfCompute());
297}
298
300 return wrap(llvm::cast<FuncDefOp>(unwrap(inp)).getSelfValueFromConstrain());
301}
302
304 return llvm::cast<FuncDefOp>(unwrap(inp)).nameIsConstrain();
305}
306
307MlirRegion llzkFunction_FuncDefOpGetCallableRegion(MlirOperation inp) {
308 return wrap(llvm::cast<FuncDefOp>(unwrap(inp)).getCallableRegion());
309}
310
311void llzkFunction_FuncDefOpSetAllowConstraintAttr(MlirOperation inp, bool newValue) {
312 llvm::cast<FuncDefOp>(unwrap(inp)).setAllowConstraintAttr(newValue);
313}
314
316 return llvm::cast<FuncDefOp>(unwrap(inp)).hasAllowConstraintAttr();
317}
318
319bool llzkFunction_FuncDefOpIsInStruct(MlirOperation inp) {
320 return llvm::cast<FuncDefOp>(unwrap(inp)).isInStruct();
321}
322
323void llzkFunction_FuncDefOpSetAllowWitnessAttr(MlirOperation inp, bool newValue) {
324 llvm::cast<FuncDefOp>(unwrap(inp)).setAllowWitnessAttr(newValue);
325}
326
328 return wrap(llvm::cast<FuncDefOp>(unwrap(inp)).getSelfValueFromCompute());
329}
330
331bool llzkFunction_FuncDefOpHasArgName(MlirOperation inp, unsigned index) {
332 return llvm::cast<FuncDefOp>(unwrap(inp)).hasArgName(index);
333}
334
335MlirAttribute llzkFunction_FuncDefOpGetFullyQualifiedName(MlirOperation inp, bool requireParent) {
336 return wrap(llvm::cast<FuncDefOp>(unwrap(inp)).getFullyQualifiedName(requireParent));
337}
338
339MlirOperation llzkFunction_ReturnOpBuild(MlirOpBuilder builder, MlirLocation location, intptr_t operandsSize, MlirValue const *operands) {
340 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString("function.return"), location);
341 mlirOperationStateAddOperands(&state, operandsSize, operands);
342
343 return mlirOpBuilderInsert(builder, mlirOperationCreate(&state));
344}
345
346bool llzkOperationIsA_Function_ReturnOp(MlirOperation inp) {
347 return llvm::isa<ReturnOp>(unwrap(inp));
348}
349
350intptr_t llzkFunction_ReturnOpGetOperandsCount(MlirOperation op) {
351 auto range = llvm::cast<ReturnOp>(unwrap(op)).getODSOperandIndexAndLength(0);
352 return range.second;
353}
354
355MlirValue llzkFunction_ReturnOpGetOperandsAt(MlirOperation op, intptr_t index) {
356 auto range = llvm::cast<ReturnOp>(unwrap(op)).getODSOperandIndexAndLength(0);
357 assert(index >= 0 && index < range.second && "variadic operand index out of range");
358 assert(
359 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
360 "operand index exceeds intptr_t range"
361 );
362 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first) + index);
363}
364
365void llzkFunction_ReturnOpSetOperands(MlirOperation op, intptr_t count, MlirValue const *values) {
366 if (count < 0)
367 return;
368 ::llvm::SmallVector<::mlir::Value> vals;
369 vals.reserve(static_cast<size_t>(count));
370 for (intptr_t i = 0; i < count; ++i)
371 vals.push_back(unwrap(values[i]));
372 ::llvm::cast<ReturnOp>(unwrap(op)).getOperandsMutable().assign(vals);
373}
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_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.
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.
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)
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