18#ifndef LLZK_C_DIALECT_FUNCTION_H
19#define LLZK_C_DIALECT_FUNCTION_H
24#include <mlir-c/Support.h>
41 MlirLocation loc, MlirStringRef
name, MlirType type, intptr_t nAttrs,
42 MlirNamedAttribute
const *attrs, intptr_t nArgAttrs, MlirAttribute
const *argAttrs
46static inline MlirOperation llzkFuncDefOpCreateWithAttrs(
47 MlirLocation loc, MlirStringRef
name, MlirType type, intptr_t nAttrs,
48 MlirNamedAttribute
const *attrs
51 loc,
name, type, nAttrs, attrs, 0, NULL
56static inline MlirOperation
57llzkFuncDefOpCreate(MlirLocation loc, MlirStringRef
name, MlirType type) {
58 return llzkFuncDefOpCreateWithAttrs(loc,
name, type, 0, NULL);
63static inline MlirOperation llzkFuncDefOpCreateWithArgAttrs(
64 MlirLocation loc, MlirStringRef
name, MlirType type, intptr_t nArgAttrs,
65 MlirAttribute
const *argAttrs
68 loc,
name, type, 0, NULL, nArgAttrs, argAttrs
117 CallOp, intptr_t numResults, MlirType
const *results, MlirAttribute
name, intptr_t numOperands,
118 MlirValue
const *operands
123 CallOp, ToCallee, MlirOperation callee, intptr_t numOperands, MlirValue
const *operands
128 CallOp, WithMapOperands, intptr_t numResults, MlirType
const *results, MlirAttribute
name,
129 intptr_t numMapOperands,
MlirValueRange const *mapOperands, MlirAttribute numDimsPerMap,
130 intptr_t numArgOperands, MlirValue
const *argOperands
135 CallOp, WithMapOperandsAndDims, intptr_t numResults, MlirType
const *results,
137 intptr_t numDimsPermMapLength, int32_t
const *numDimsPerMap, intptr_t numArgOperands,
138 MlirValue
const *argOperands
143 CallOp, ToCalleeWithMapOperands, MlirOperation callee, intptr_t numMapOperands,
144 MlirValueRange const *mapOperands, MlirAttribute numDimsPerMap, intptr_t numArgOperands,
145 MlirValue
const *argOperands
150 CallOp, ToCalleeWithMapOperandsAndDims, MlirOperation callee, intptr_t numMapOperands,
151 MlirValueRange const *mapOperands, intptr_t numDimsPermMapLength, int32_t
const *numDimsPerMap,
152 intptr_t numArgOperands, MlirValue
const *argOperands
MLIR_CAPI_EXPORTED void llzkFuncDefOpSetAllowConstraintAttr(MlirOperation op, bool value)
Sets the allow_constraint attribute in the FuncDefOp operation.
MLIR_CAPI_EXPORTED MlirAttribute llzkFuncDefOpGetFullyQualifiedName(MlirOperation op)
Returns the fully qualified name of the function.
MLIR_CAPI_EXPORTED MlirType llzkCallOpGetSingleResultTypeOfCompute(MlirOperation op)
Assuming the callee is the compute function, returns its StructType result.
MLIR_CAPI_EXPORTED MlirType llzkFuncDefOpGetSingleResultTypeOfCompute(MlirOperation op)
Assuming the function is the compute function, returns its StructType result.
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Function, llzk__function)
MLIR_CAPI_EXPORTED MlirType llzkCallOpGetCalleeType(MlirOperation op)
Returns the FunctionType of the callee.
MLIR_CAPI_EXPORTED MlirOperation llzkFuncDefOpCreateWithAttrsAndArgAttrs(MlirLocation loc, MlirStringRef name, MlirType type, intptr_t nAttrs, MlirNamedAttribute const *attrs, intptr_t nArgAttrs, MlirAttribute const *argAttrs)
Creates a FuncDefOp with the given attributes and argument attributes.
MLIR_CAPI_EXPORTED void llzkFuncDefOpSetAllowWitnessAttr(MlirOperation op, bool value)
Sets the allow_witness attribute in the FuncDefOp operation.
#define LLZK_DECLARE_OP_ISA(what)
#define LLZK_DECLARE_OP_PREDICATE(op, name)
#define LLZK_DECLARE_OP_BUILD_METHOD(op,...)
#define LLZK_DECLARE_NARY_OP_PREDICATE(op, name,...)
#define LLZK_DECLARE_SUFFIX_OP_BUILD_METHOD(op, suffix,...)