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);
79 MlirValue values[] = {dummyValue};
83 mlirOperationDestroy(testOp);
87 auto testOp = createIndexOperation();
93 mlirOperationDestroy(testOp);
97 auto testOp = createIndexOperation();
103 mlirOperationDestroy(testOp);
107 auto testOp = createIndexOperation();
113 mlirOperationDestroy(testOp);
117 auto testOp = createIndexOperation();
123 mlirOperationDestroy(testOp);
127 auto testOp = createIndexOperation();
133 mlirOperationDestroy(testOp);
137 auto testOp = createIndexOperation();
143 mlirOperationDestroy(testOp);
147 auto testOp = createIndexOperation();
153 mlirOperationDestroy(testOp);
157 auto testOp = createIndexOperation();
163 mlirOperationDestroy(testOp);
167 auto testOp = createIndexOperation();
173 mlirOperationDestroy(testOp);
177 auto testOp = createIndexOperation();
183 mlirOperationDestroy(testOp);
188 auto testOperation = createIndexOperation();
195 mlirOperationDestroy(testOperation);
200 auto testOperation = createIndexOperation();
207 mlirOperationDestroy(testOperation);
212 auto testOperation = createIndexOperation();
219 mlirOperationDestroy(testOperation);
224 auto testOperation = createIndexOperation();
231 mlirOperationDestroy(testOperation);
236 auto testOperation = createIndexOperation();
243 mlirOperationDestroy(testOperation);
248 auto testOperation = createIndexOperation();
255 mlirOperationDestroy(testOperation);
260 auto testOperation = createIndexOperation();
267 mlirOperationDestroy(testOperation);
272 auto testOperation = createIndexOperation();
279 mlirOperationDestroy(testOperation);
284 auto testOperation = createIndexOperation();
291 mlirOperationDestroy(testOperation);
296 auto testOperation = createIndexOperation();
303 mlirOperationDestroy(testOperation);
308 auto testOperation = createIndexOperation();
315 mlirOperationDestroy(testOperation);
320 auto testOperation = createIndexOperation();
325 mlirOperationDestroy(testOperation);
331 auto testOp = createIndexOperation();
337 MlirLocation location = mlirLocationUnknownGet(context);
338 auto dummyValue = mlirOperationGetResult(testOp, 0);
339 auto sym_nameAttr = mlirOperationGetName(testOp);
340 auto function_typeAttr = createIndexAttribute();
341 auto arg_attrsAttr = createIndexAttribute();
342 auto res_attrsAttr = createIndexAttribute();
348 mlirOperationDestroy(testOp);
356 static std::unique_ptr<FuncDefOpBuildFuncHelper>
get();
367 auto testOp = createIndexOperation();
373 mlirOperationDestroy(testOp);
377 auto testOp = createIndexOperation();
383 mlirOperationDestroy(testOp);
387 auto testOp = createIndexOperation();
393 mlirOperationDestroy(testOp);
397 auto testOp = createIndexOperation();
403 mlirOperationDestroy(testOp);
407 auto testOp = createIndexOperation();
413 mlirOperationDestroy(testOp);
417 auto testOp = createIndexOperation();
423 mlirOperationDestroy(testOp);
427 auto testOp = createIndexOperation();
433 mlirOperationDestroy(testOp);
437 auto testOp = createIndexOperation();
443 mlirOperationDestroy(testOp);
447 auto testOp = createIndexOperation();
453 mlirOperationDestroy(testOp);
458 auto testOperation = createIndexOperation();
461 bool requireParent =
false;
466 mlirOperationDestroy(testOperation);
471 auto testOperation = createIndexOperation();
474 bool newValue =
false;
479 mlirOperationDestroy(testOperation);
484 auto testOperation = createIndexOperation();
491 mlirOperationDestroy(testOperation);
496 auto testOperation = createIndexOperation();
503 mlirOperationDestroy(testOperation);
508 auto testOperation = createIndexOperation();
515 mlirOperationDestroy(testOperation);
520 auto testOperation = createIndexOperation();
528 mlirOperationDestroy(testOperation);
533 auto testOperation = createIndexOperation();
540 mlirOperationDestroy(testOperation);
545 auto testOperation = createIndexOperation();
552 mlirOperationDestroy(testOperation);
557 auto testOperation = createIndexOperation();
564 mlirOperationDestroy(testOperation);
569 auto testOperation = createIndexOperation();
576 mlirOperationDestroy(testOperation);
581 auto testOperation = createIndexOperation();
588 mlirOperationDestroy(testOperation);
593 auto testOperation = createIndexOperation();
600 mlirOperationDestroy(testOperation);
605 auto testOperation = createIndexOperation();
608 bool newValue =
false;
613 mlirOperationDestroy(testOperation);
618 auto testOperation = createIndexOperation();
625 mlirOperationDestroy(testOperation);
630 auto testOperation = createIndexOperation();
637 mlirOperationDestroy(testOperation);
642 auto testOperation = createIndexOperation();
649 mlirOperationDestroy(testOperation);
654 auto testOperation = createIndexOperation();
657 bool newValue =
false;
662 mlirOperationDestroy(testOperation);
667 auto testOperation = createIndexOperation();
674 mlirOperationDestroy(testOperation);
679 auto testOperation = createIndexOperation();
686 mlirOperationDestroy(testOperation);
691 auto testOperation = createIndexOperation();
698 mlirOperationDestroy(testOperation);
703 auto testOperation = createIndexOperation();
708 mlirOperationDestroy(testOperation);
714 auto testOp = createIndexOperation();
720 MlirLocation location = mlirLocationUnknownGet(context);
721 auto dummyValue = mlirOperationGetResult(testOp, 0);
722 MlirValue operandsValues[] = {dummyValue};
723 intptr_t operandsSize = 0;
729 mlirOperationDestroy(testOp);
737 static std::unique_ptr<ReturnOpBuildFuncHelper>
get();
748 auto testOp = createIndexOperation();
754 mlirOperationDestroy(testOp);
758 auto testOp = createIndexOperation();
764 mlirOperationDestroy(testOp);
768 auto testOp = createIndexOperation();
771 auto dummyValue = mlirOperationGetResult(testOp, 0);
772 MlirValue values[] = {dummyValue};
776 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.
void llzkFunction_CallOpSetMapOperands(MlirOperation op, intptr_t count, MlirValue const *values)
Set MapOperands operands of llzk::function::CallOp 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_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.
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...
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
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