14 auto testOperation = createIndexOperation();
19 mlirOperationDestroy(testOperation);
23 auto testOp = createIndexOperation();
29 mlirOperationDestroy(testOp);
33 auto testOp = createIndexOperation();
39 mlirOperationDestroy(testOp);
43 auto testOp = createIndexOperation();
46 auto dummyValue = mlirOperationGetResult(testOp, 0);
47 MlirValue values[] = {dummyValue};
51 mlirOperationDestroy(testOp);
55 auto testOp = createIndexOperation();
61 mlirOperationDestroy(testOp);
65 auto testOp = createIndexOperation();
71 mlirOperationDestroy(testOp);
75 auto testOp = createIndexOperation();
78 auto dummyValue = mlirOperationGetResult(testOp, 0);
80 groups[0].
values = &dummyValue;
85 mlirOperationDestroy(testOp);
89 auto testOp = createIndexOperation();
95 mlirOperationDestroy(testOp);
99 auto testOp = createIndexOperation();
105 mlirOperationDestroy(testOp);
109 auto testOp = createIndexOperation();
115 mlirOperationDestroy(testOp);
119 auto testOp = createIndexOperation();
125 mlirOperationDestroy(testOp);
129 auto testOp = createIndexOperation();
135 mlirOperationDestroy(testOp);
139 auto testOp = createIndexOperation();
145 mlirOperationDestroy(testOp);
149 auto testOp = createIndexOperation();
155 mlirOperationDestroy(testOp);
159 auto testOp = createIndexOperation();
165 mlirOperationDestroy(testOp);
169 auto testOp = createIndexOperation();
175 mlirOperationDestroy(testOp);
179 auto testOp = createIndexOperation();
185 mlirOperationDestroy(testOp);
189 auto testOp = createIndexOperation();
195 mlirOperationDestroy(testOp);
199 auto testOp = createIndexOperation();
205 mlirOperationDestroy(testOp);
209 auto testOp = createIndexOperation();
215 mlirOperationDestroy(testOp);
219 auto testOp = createIndexOperation();
225 mlirOperationDestroy(testOp);
230 auto testOperation = createIndexOperation();
237 mlirOperationDestroy(testOperation);
242 auto testOperation = createIndexOperation();
249 mlirOperationDestroy(testOperation);
254 auto testOperation = createIndexOperation();
261 mlirOperationDestroy(testOperation);
266 auto testOperation = createIndexOperation();
273 mlirOperationDestroy(testOperation);
278 auto testOperation = createIndexOperation();
285 mlirOperationDestroy(testOperation);
290 auto testOperation = createIndexOperation();
297 mlirOperationDestroy(testOperation);
302 auto testOperation = createIndexOperation();
309 mlirOperationDestroy(testOperation);
314 auto testOperation = createIndexOperation();
321 mlirOperationDestroy(testOperation);
326 auto testOperation = createIndexOperation();
333 mlirOperationDestroy(testOperation);
338 auto testOperation = createIndexOperation();
345 mlirOperationDestroy(testOperation);
350 auto testOperation = createIndexOperation();
357 mlirOperationDestroy(testOperation);
362 auto testOperation = createIndexOperation();
369 mlirOperationDestroy(testOperation);
374 auto testOperation = createIndexOperation();
381 mlirOperationDestroy(testOperation);
386 auto testOperation = createIndexOperation();
393 mlirOperationDestroy(testOperation);
398 auto testOperation = createIndexOperation();
405 mlirOperationDestroy(testOperation);
410 auto testOperation = createIndexOperation();
415 mlirOperationDestroy(testOperation);
421 auto testOp = createIndexOperation();
427 MlirLocation location = mlirLocationUnknownGet(context);
428 auto dummyValue = mlirOperationGetResult(testOp, 0);
429 auto sym_nameAttr = mlirOperationGetName(testOp);
430 auto function_typeAttr = createIndexAttribute();
431 auto arg_attrsAttr = createIndexAttribute();
432 auto res_attrsAttr = createIndexAttribute();
438 mlirOperationDestroy(testOp);
446 static std::unique_ptr<FuncDefOpBuildFuncHelper>
get();
457 auto testOp = createIndexOperation();
463 mlirOperationDestroy(testOp);
467 auto testOp = createIndexOperation();
473 mlirOperationDestroy(testOp);
477 auto testOp = createIndexOperation();
483 mlirOperationDestroy(testOp);
487 auto testOp = createIndexOperation();
493 mlirOperationDestroy(testOp);
497 auto testOp = createIndexOperation();
503 mlirOperationDestroy(testOp);
507 auto testOp = createIndexOperation();
513 mlirOperationDestroy(testOp);
517 auto testOp = createIndexOperation();
523 mlirOperationDestroy(testOp);
527 auto testOp = createIndexOperation();
533 mlirOperationDestroy(testOp);
537 auto testOp = createIndexOperation();
543 mlirOperationDestroy(testOp);
548 auto testOperation = createIndexOperation();
551 bool newValue =
false;
556 mlirOperationDestroy(testOperation);
561 auto testOperation = createIndexOperation();
568 mlirOperationDestroy(testOperation);
573 auto testOperation = createIndexOperation();
580 mlirOperationDestroy(testOperation);
585 auto testOperation = createIndexOperation();
593 mlirOperationDestroy(testOperation);
598 auto testOperation = createIndexOperation();
605 mlirOperationDestroy(testOperation);
610 auto testOperation = createIndexOperation();
617 mlirOperationDestroy(testOperation);
622 auto testOperation = createIndexOperation();
629 mlirOperationDestroy(testOperation);
634 auto testOperation = createIndexOperation();
642 mlirOperationDestroy(testOperation);
647 auto testOperation = createIndexOperation();
654 mlirOperationDestroy(testOperation);
659 auto testOperation = createIndexOperation();
666 mlirOperationDestroy(testOperation);
671 auto testOperation = createIndexOperation();
678 mlirOperationDestroy(testOperation);
683 auto testOperation = createIndexOperation();
690 mlirOperationDestroy(testOperation);
695 auto testOperation = createIndexOperation();
702 mlirOperationDestroy(testOperation);
707 auto testOperation = createIndexOperation();
710 bool newValue =
false;
715 mlirOperationDestroy(testOperation);
720 auto testOperation = createIndexOperation();
727 mlirOperationDestroy(testOperation);
732 auto testOperation = createIndexOperation();
735 bool newValue =
false;
740 mlirOperationDestroy(testOperation);
745 auto testOperation = createIndexOperation();
752 mlirOperationDestroy(testOperation);
757 auto testOperation = createIndexOperation();
764 mlirOperationDestroy(testOperation);
769 auto testOperation = createIndexOperation();
776 mlirOperationDestroy(testOperation);
781 auto testOperation = createIndexOperation();
788 mlirOperationDestroy(testOperation);
793 auto testOperation = createIndexOperation();
796 bool newValue =
false;
801 mlirOperationDestroy(testOperation);
806 auto testOperation = createIndexOperation();
813 mlirOperationDestroy(testOperation);
818 auto testOperation = createIndexOperation();
825 mlirOperationDestroy(testOperation);
830 auto testOperation = createIndexOperation();
838 mlirOperationDestroy(testOperation);
843 auto testOperation = createIndexOperation();
846 bool requireParent =
false;
851 mlirOperationDestroy(testOperation);
856 auto testOperation = createIndexOperation();
861 mlirOperationDestroy(testOperation);
867 auto testOp = createIndexOperation();
873 MlirLocation location = mlirLocationUnknownGet(context);
874 auto dummyValue = mlirOperationGetResult(testOp, 0);
875 MlirValue operandsValues[] = {dummyValue};
876 intptr_t operandsSize = 0;
882 mlirOperationDestroy(testOp);
890 static std::unique_ptr<ReturnOpBuildFuncHelper>
get();
901 auto testOp = createIndexOperation();
907 mlirOperationDestroy(testOp);
911 auto testOp = createIndexOperation();
917 mlirOperationDestroy(testOp);
921 auto testOp = createIndexOperation();
924 auto dummyValue = mlirOperationGetResult(testOp, 0);
925 MlirValue values[] = {dummyValue};
929 mlirOperationDestroy(testOp);
TEST_F(ArrayOperationLinkTests, IsA_Array_ArrayLengthOp)
This test ensures llzkOperationIsA_Array_ArrayLengthOp links properly.
MlirOpBuilder mlirOpBuilderCreate(MlirContext ctx)
Creates a new OpBuilder for the given MLIR context.
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.
static std::unique_ptr< FuncDefOpBuildFuncHelper > get()
This method must be implemented to return a subclass of FuncDefOpBuildFuncHelper that at least implem...
virtual bool callIsA(MlirOperation op) override
FuncDefOpBuildFuncHelper()=default
Representation of an mlir::ValueRange.
MlirValue const * values
Pointer to the first value in the range.
intptr_t size
Number of values in the range.
ReturnOpBuildFuncHelper()=default
static std::unique_ptr< ReturnOpBuildFuncHelper > get()
This method must be implemented to return a subclass of ReturnOpBuildFuncHelper that at least impleme...
virtual bool callIsA(MlirOperation op) override