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();
327 mlirOperationDestroy(testOperation);
333 auto testOp = createIndexOperation();
339 MlirLocation location = mlirLocationUnknownGet(context);
340 auto dummyValue = mlirOperationGetResult(testOp, 0);
341 auto sym_nameAttr = mlirOperationGetName(testOp);
342 auto function_typeAttr = createIndexAttribute();
343 auto arg_attrsAttr = createIndexAttribute();
344 auto res_attrsAttr = createIndexAttribute();
350 mlirOperationDestroy(testOp);
358 static std::unique_ptr<FuncDefOpBuildFuncHelper>
get();
369 auto testOp = createIndexOperation();
375 mlirOperationDestroy(testOp);
379 auto testOp = createIndexOperation();
385 mlirOperationDestroy(testOp);
389 auto testOp = createIndexOperation();
395 mlirOperationDestroy(testOp);
399 auto testOp = createIndexOperation();
405 mlirOperationDestroy(testOp);
409 auto testOp = createIndexOperation();
415 mlirOperationDestroy(testOp);
419 auto testOp = createIndexOperation();
425 mlirOperationDestroy(testOp);
429 auto testOp = createIndexOperation();
435 mlirOperationDestroy(testOp);
439 auto testOp = createIndexOperation();
445 mlirOperationDestroy(testOp);
449 auto testOp = createIndexOperation();
455 mlirOperationDestroy(testOp);
460 auto testOperation = createIndexOperation();
467 mlirOperationDestroy(testOperation);
472 auto testOperation = createIndexOperation();
475 bool newValue =
false;
480 mlirOperationDestroy(testOperation);
485 auto testOperation = createIndexOperation();
492 mlirOperationDestroy(testOperation);
497 auto testOperation = createIndexOperation();
504 mlirOperationDestroy(testOperation);
509 auto testOperation = createIndexOperation();
517 mlirOperationDestroy(testOperation);
522 auto testOperation = createIndexOperation();
529 mlirOperationDestroy(testOperation);
534 auto testOperation = createIndexOperation();
541 mlirOperationDestroy(testOperation);
546 auto testOperation = createIndexOperation();
553 mlirOperationDestroy(testOperation);
558 auto testOperation = createIndexOperation();
565 mlirOperationDestroy(testOperation);
570 auto testOperation = createIndexOperation();
577 mlirOperationDestroy(testOperation);
582 auto testOperation = createIndexOperation();
589 mlirOperationDestroy(testOperation);
594 auto testOperation = createIndexOperation();
601 mlirOperationDestroy(testOperation);
606 auto testOperation = createIndexOperation();
613 mlirOperationDestroy(testOperation);
618 auto testOperation = createIndexOperation();
625 mlirOperationDestroy(testOperation);
630 auto testOperation = createIndexOperation();
633 bool newValue =
false;
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();
700 mlirOperationDestroy(testOperation);
705 auto testOperation = createIndexOperation();
708 bool requireParent =
false;
713 mlirOperationDestroy(testOperation);
718 auto testOperation = createIndexOperation();
723 mlirOperationDestroy(testOperation);
729 auto testOp = createIndexOperation();
735 MlirLocation location = mlirLocationUnknownGet(context);
736 auto dummyValue = mlirOperationGetResult(testOp, 0);
737 MlirValue operandsValues[] = {dummyValue};
738 intptr_t operandsSize = 0;
744 mlirOperationDestroy(testOp);
752 static std::unique_ptr<ReturnOpBuildFuncHelper>
get();
763 auto testOp = createIndexOperation();
769 mlirOperationDestroy(testOp);
773 auto testOp = createIndexOperation();
779 mlirOperationDestroy(testOp);
783 auto testOp = createIndexOperation();
786 auto dummyValue = mlirOperationGetResult(testOp, 0);
787 MlirValue values[] = {dummyValue};
791 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_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
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