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);
190 auto testOperation = createIndexOperation();
197 mlirOperationDestroy(testOperation);
202 auto testOperation = createIndexOperation();
209 mlirOperationDestroy(testOperation);
214 auto testOperation = createIndexOperation();
221 mlirOperationDestroy(testOperation);
226 auto testOperation = createIndexOperation();
233 mlirOperationDestroy(testOperation);
238 auto testOperation = createIndexOperation();
245 mlirOperationDestroy(testOperation);
250 auto testOperation = createIndexOperation();
257 mlirOperationDestroy(testOperation);
262 auto testOperation = createIndexOperation();
269 mlirOperationDestroy(testOperation);
274 auto testOperation = createIndexOperation();
281 mlirOperationDestroy(testOperation);
286 auto testOperation = createIndexOperation();
293 mlirOperationDestroy(testOperation);
298 auto testOperation = createIndexOperation();
305 mlirOperationDestroy(testOperation);
310 auto testOperation = createIndexOperation();
317 mlirOperationDestroy(testOperation);
322 auto testOperation = createIndexOperation();
329 mlirOperationDestroy(testOperation);
334 auto testOperation = createIndexOperation();
341 mlirOperationDestroy(testOperation);
346 auto testOperation = createIndexOperation();
351 mlirOperationDestroy(testOperation);
357 auto testOp = createIndexOperation();
363 MlirLocation location = mlirLocationUnknownGet(context);
364 auto dummyValue = mlirOperationGetResult(testOp, 0);
365 auto sym_nameAttr = mlirOperationGetName(testOp);
366 auto function_typeAttr = createIndexAttribute();
367 auto arg_attrsAttr = createIndexAttribute();
368 auto res_attrsAttr = createIndexAttribute();
374 mlirOperationDestroy(testOp);
382 static std::unique_ptr<FuncDefOpBuildFuncHelper>
get();
393 auto testOp = createIndexOperation();
399 mlirOperationDestroy(testOp);
403 auto testOp = createIndexOperation();
409 mlirOperationDestroy(testOp);
413 auto testOp = createIndexOperation();
419 mlirOperationDestroy(testOp);
423 auto testOp = createIndexOperation();
429 mlirOperationDestroy(testOp);
433 auto testOp = createIndexOperation();
439 mlirOperationDestroy(testOp);
443 auto testOp = createIndexOperation();
449 mlirOperationDestroy(testOp);
453 auto testOp = createIndexOperation();
459 mlirOperationDestroy(testOp);
463 auto testOp = createIndexOperation();
469 mlirOperationDestroy(testOp);
473 auto testOp = createIndexOperation();
479 mlirOperationDestroy(testOp);
484 auto testOperation = createIndexOperation();
487 bool newValue =
false;
492 mlirOperationDestroy(testOperation);
497 auto testOperation = createIndexOperation();
504 mlirOperationDestroy(testOperation);
509 auto testOperation = createIndexOperation();
516 mlirOperationDestroy(testOperation);
521 auto testOperation = createIndexOperation();
528 mlirOperationDestroy(testOperation);
533 auto testOperation = createIndexOperation();
541 mlirOperationDestroy(testOperation);
546 auto testOperation = createIndexOperation();
553 mlirOperationDestroy(testOperation);
558 auto testOperation = createIndexOperation();
565 mlirOperationDestroy(testOperation);
570 auto testOperation = createIndexOperation();
578 mlirOperationDestroy(testOperation);
583 auto testOperation = createIndexOperation();
590 mlirOperationDestroy(testOperation);
595 auto testOperation = createIndexOperation();
602 mlirOperationDestroy(testOperation);
607 auto testOperation = createIndexOperation();
614 mlirOperationDestroy(testOperation);
619 auto testOperation = createIndexOperation();
626 mlirOperationDestroy(testOperation);
631 auto testOperation = createIndexOperation();
638 mlirOperationDestroy(testOperation);
643 auto testOperation = createIndexOperation();
650 mlirOperationDestroy(testOperation);
655 auto testOperation = createIndexOperation();
662 mlirOperationDestroy(testOperation);
667 auto testOperation = createIndexOperation();
670 bool newValue =
false;
675 mlirOperationDestroy(testOperation);
680 auto testOperation = createIndexOperation();
687 mlirOperationDestroy(testOperation);
692 auto testOperation = createIndexOperation();
699 mlirOperationDestroy(testOperation);
704 auto testOperation = createIndexOperation();
707 bool newValue =
false;
712 mlirOperationDestroy(testOperation);
717 auto testOperation = createIndexOperation();
724 mlirOperationDestroy(testOperation);
729 auto testOperation = createIndexOperation();
737 mlirOperationDestroy(testOperation);
742 auto testOperation = createIndexOperation();
745 bool requireParent =
false;
750 mlirOperationDestroy(testOperation);
755 auto testOperation = createIndexOperation();
760 mlirOperationDestroy(testOperation);
766 auto testOp = createIndexOperation();
772 MlirLocation location = mlirLocationUnknownGet(context);
773 auto dummyValue = mlirOperationGetResult(testOp, 0);
774 MlirValue operandsValues[] = {dummyValue};
775 intptr_t operandsSize = 0;
781 mlirOperationDestroy(testOp);
789 static std::unique_ptr<ReturnOpBuildFuncHelper>
get();
800 auto testOp = createIndexOperation();
806 mlirOperationDestroy(testOp);
810 auto testOp = createIndexOperation();
816 mlirOperationDestroy(testOp);
820 auto testOp = createIndexOperation();
823 auto dummyValue = mlirOperationGetResult(testOp, 0);
824 MlirValue values[] = {dummyValue};
828 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_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...
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