18#ifndef LLZK_C_DIALECT_FUNCTION_H
19#define LLZK_C_DIALECT_FUNCTION_H
24#include <mlir-c/Support.h>
46 MlirLocation loc, MlirStringRef name, MlirType type, intptr_t nAttrs,
47 MlirNamedAttribute
const *attrs, intptr_t nArgAttrs, MlirAttribute
const *argAttrs
51static inline MlirOperation llzkFunction_FuncDefOpCreateWithAttrs(
52 MlirLocation loc, MlirStringRef name, MlirType type, intptr_t nAttrs,
53 MlirNamedAttribute
const *attrs
56 loc, name, type, nAttrs, attrs, 0, NULL
62static inline MlirOperation llzkFunction_FuncDefOpCreateWithArgAttrs(
63 MlirLocation loc, MlirStringRef name, MlirType type, intptr_t nArgAttrs,
64 MlirAttribute
const *argAttrs
67 loc, name, type, 0, NULL, nArgAttrs, argAttrs
72static inline MlirOperation
73llzkFunction_FuncDefOpCreateWithoutAttrs(MlirLocation loc, MlirStringRef name, MlirType type) {
74 return llzkFunction_FuncDefOpCreateWithAttrs(loc, name, type, 0, NULL);
82MLIR_CAPI_EXPORTED MlirAttribute
89MLIR_CAPI_EXPORTED
void
95MLIR_CAPI_EXPORTED
void
104 Function, CallOp, intptr_t numResults, MlirType
const *results, MlirAttribute name,
105 intptr_t numOperands, MlirValue
const *operands
110 Function, CallOp, ToCallee, MlirOperation callee, intptr_t numOperands,
111 MlirValue
const *operands
116 Function, CallOp, WithMapOperands, intptr_t numResults, MlirType
const *results,
118 MlirValue
const *argOperands
123 Function, CallOp, ToCalleeWithMapOperands, MlirOperation callee,
129 Function, CallOp, WithTemplateParams, intptr_t numResults, MlirType
const *results,
130 MlirAttribute name, intptr_t numTemplateParams, MlirAttribute
const *templateParams,
131 intptr_t numArgOperands, MlirValue
const *argOperands
136 Function, CallOp, ToCalleeWithTemplateParams, MlirOperation callee, intptr_t numTemplateParams,
137 MlirAttribute
const *templateParams, intptr_t numArgOperands, MlirValue
const *argOperands
MLIR_CAPI_EXPORTED MlirOperation llzkFunction_FuncDefOpCreateWithAttrsAndArgAttrs(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 bool llzkFunction_FuncDefOpHasArgNameAttr(MlirOperation op, unsigned index)
Returns true iff the argument at the given index has a function.arg_name attribute.
MLIR_CAPI_EXPORTED void llzkFunction_FuncDefOpSetArgName(MlirOperation op, unsigned index, MlirStringRef name)
Sets the function.arg_name attribute for the argument at the given index from a string value.
MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(Function, llzk__function)
Get reference to the LLZK function dialect.
MLIR_CAPI_EXPORTED MlirAttribute llzkFunction_FuncDefOpGetArgNameAttr(MlirOperation op, unsigned index)
Returns the function.arg_name StringAttr for the argument at the given index, or null if the argument...
MLIR_CAPI_EXPORTED void llzkFunction_FuncDefOpSetArgNameAttr(MlirOperation op, unsigned index, MlirAttribute attr)
Sets the function.arg_name attribute for the argument at the given index.
#define LLZK_DECLARE_SUFFIX_OP_BUILD_METHOD(dialect, op, suffix,...)
#define LLZK_DECLARE_OP_BUILD_METHOD(dialect, op,...)
Encapsulates the arguments related to affine maps that are common in operation constructors that supp...