10#if defined(GET_OP_CLASSES) || defined(GET_OP_FWD_DEFINES)
11#undef GET_OP_FWD_DEFINES
52 auto &propStorage = this->callee;
53 return ::llvm::cast<::mlir::SymbolRefAttr>(propStorage);
55 void setCallee(const ::mlir::SymbolRefAttr &propValue) {
56 this->callee = propValue;
62 auto &propStorage = this->mapOpGroupSizes;
63 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(propStorage);
66 this->mapOpGroupSizes = propValue;
72 auto &propStorage = this->numDimsPerMap;
73 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(propStorage);
76 this->numDimsPerMap = propValue;
81 auto &propStorage = this->operandSegmentSizes;
85 auto &propStorage = this->operandSegmentSizes;
86 ::llvm::copy(propValue, propStorage.begin());
90 rhs.
callee == this->callee &&
97 return !(*
this == rhs);
124template <
typename RangeT>
126 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
133 template <
typename LateInst = CallOp,
typename = std::enable_if_t<std::is_same_v<LateInst, CallOp>>>
142 return {std::next(odsOperands.begin(), valueRange.first),
143 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
154 ::llvm::SmallVector<RangeT> tblgenTmpOperandGroups;
155 for (
int i = 0, e = sizes.size(); i < e; ++i) {
156 tblgenTmpOperandGroups.push_back(tblgenTmpOperands.take_front(sizes[i]));
157 tblgenTmpOperands = tblgenTmpOperands.drop_front(sizes[i]);
159 return tblgenTmpOperandGroups;
174 ::mlir::LogicalResult
verify(::mlir::Location loc);
176class CallOp :
public ::mlir::Op<CallOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::VariadicResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::AttrSizedOperandSegments, ::llzk::VerifySizesForMultiAffineOps<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::OpTrait::MemRefsNormalizable, ::mlir::CallOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait> {
181 template <
typename RangeT>
186 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"callee"), ::llvm::StringRef(
"mapOpGroupSizes"), ::llvm::StringRef(
"numDimsPerMap"), ::llvm::StringRef(
"operandSegmentSizes")};
187 return ::llvm::ArrayRef(attrNames);
191 return getAttributeNameForIndex(0);
195 return getAttributeNameForIndex(name, 0);
199 return getAttributeNameForIndex(1);
203 return getAttributeNameForIndex(name, 1);
207 return getAttributeNameForIndex(2);
211 return getAttributeNameForIndex(name, 2);
215 return (*this)->getName().getAttributeNames().back();
219 return name.getAttributeNames().back();
223 return ::llvm::StringLiteral(
"function.call");
233 ::mlir::Operation::result_range
getODSResults(
unsigned index);
234 static ::mlir::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
237 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
240 static ::mlir::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
241 static ::mlir::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
254 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands = {});
255 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState,
::llzk::function::FuncDefOp callee, ::mlir::ValueRange argOperands = {});
256 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands = {});
257 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands = {});
258 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState,
::llzk::function::FuncDefOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands = {});
259 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState,
::llzk::function::FuncDefOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::mlir::ValueRange argOperands = {});
265 ::mlir::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
266 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
267 void print(::mlir::OpAsmPrinter &_odsPrinter);
269 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
270 return getAttributeNameForIndex((*this)->getName(), index);
273 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
274 assert(index < 3 &&
"invalid attribute index");
275 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
276 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
277 "dependent dialect loading?");
278 return name.getAttributeNames()[index];
320 auto &propStorage = this->arg_attrs;
321 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
324 this->arg_attrs = propValue;
330 auto &propStorage = this->function_type;
331 return ::llvm::cast<::mlir::TypeAttr>(propStorage);
334 this->function_type = propValue;
340 auto &propStorage = this->res_attrs;
341 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
344 this->res_attrs = propValue;
350 auto &propStorage = this->sym_name;
351 return ::llvm::cast<::mlir::StringAttr>(propStorage);
354 this->sym_name = propValue;
365 return !(*
this == rhs);
389 ::std::optional< ::mlir::ArrayAttr >
getArgAttrs();
391 ::std::optional< ::mlir::ArrayAttr >
getResAttrs();
396template <
typename RangeT>
398 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
405 template <
typename LateInst = FuncDefOp,
typename = std::enable_if_t<std::is_same_v<LateInst, FuncDefOp>>>
414 return {std::next(odsOperands.begin(), valueRange.first),
415 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
430 ::mlir::LogicalResult
verify(::mlir::Location loc);
432class FuncDefOp :
public ::mlir::Op<FuncDefOp, ::mlir::OpTrait::OneRegion, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::HasParent<::mlir::ModuleOp, ::llzk::component::StructDefOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::mlir::OpTrait::AffineScope, ::mlir::OpTrait::AutomaticAllocationScope, ::mlir::SymbolOpInterface::Trait, ::mlir::CallableOpInterface::Trait, ::mlir::FunctionOpInterface::Trait, ::mlir::OpTrait::IsIsolatedFromAbove> {
437 template <
typename RangeT>
442 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"arg_attrs"), ::llvm::StringRef(
"function_type"), ::llvm::StringRef(
"res_attrs"), ::llvm::StringRef(
"sym_name")};
443 return ::llvm::ArrayRef(attrNames);
447 return getAttributeNameForIndex(0);
451 return getAttributeNameForIndex(name, 0);
455 return getAttributeNameForIndex(1);
459 return getAttributeNameForIndex(name, 1);
463 return getAttributeNameForIndex(2);
467 return getAttributeNameForIndex(name, 2);
471 return getAttributeNameForIndex(3);
475 return getAttributeNameForIndex(name, 3);
479 return ::llvm::StringLiteral(
"function.def");
485 ::mlir::Operation::result_range
getODSResults(
unsigned index);
487 static ::mlir::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
490 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
493 static ::mlir::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
494 static ::mlir::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
501 ::std::optional< ::mlir::ArrayAttr >
getArgAttrs();
503 ::std::optional< ::mlir::ArrayAttr >
getResAttrs();
512 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef name, ::mlir::FunctionType type, ::llvm::ArrayRef<::mlir::NamedAttribute> attrs = {}, ::llvm::ArrayRef<::mlir::DictionaryAttr> argAttrs = {});
513 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs);
514 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, ::mlir::TypeAttr function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs);
515 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs);
516 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, ::mlir::FunctionType function_type, ::mlir::ArrayAttr arg_attrs, ::mlir::ArrayAttr res_attrs);
517 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
518 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
519 void print(::mlir::OpAsmPrinter &p);
522 ::mlir::LogicalResult
verify();
523 ::mlir::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
525 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
526 return getAttributeNameForIndex((*this)->getName(), index);
529 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
530 assert(index < 4 &&
"invalid attribute index");
531 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
532 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
533 "dependent dialect loading?");
534 return name.getAttributeNames()[index];
538 static FuncDefOp create(::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type,
539 ::llvm::ArrayRef<::mlir::NamedAttribute> attrs = {});
540 static FuncDefOp create(::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type,
541 ::mlir::Operation::dialect_attr_range attrs);
542 static FuncDefOp create(::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type,
543 ::llvm::ArrayRef<::mlir::NamedAttribute> attrs,
544 ::llvm::ArrayRef<::mlir::DictionaryAttr> argAttrs);
564 return getOperation()->hasAttr(llzk::function::AllowConstraintAttr::name);
572 return getOperation()->hasAttr(llzk::function::AllowWitnessAttr::name);
619 bool isInStruct() { return ::llzk::component::isInStruct(*
this); }
649 ReturnOpGenericAdaptorBase(::mlir::DictionaryAttr attrs =
nullptr, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {});
657template <
typename RangeT>
659 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
662 ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs =
nullptr, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
664 ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) :
ReturnOpGenericAdaptor(values, attrs, (properties ? *properties.as<::
mlir::EmptyProperties *>() : ::
mlir::EmptyProperties{}), regions) {}
666 template <
typename LateInst = ReturnOp,
typename = std::enable_if_t<std::is_same_v<LateInst, ReturnOp>>>
675 return {std::next(odsOperands.begin(), valueRange.first),
676 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
691 ::mlir::LogicalResult
verify(::mlir::Location loc);
693class ReturnOp :
public ::mlir::Op<ReturnOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::HasParent<::llzk::function::FuncDefOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::MemRefsNormalizable, ::mlir::RegionBranchTerminatorOpInterface::Trait, ::mlir::OpTrait::ReturnLike, ::mlir::OpTrait::IsTerminator> {
698 template <
typename RangeT>
706 return ::llvm::StringLiteral(
"function.return");
714 ::mlir::Operation::result_range
getODSResults(
unsigned index);
715 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
716 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands);
717 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
720 ::mlir::LogicalResult
verify();
722 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
723 void print(::mlir::OpAsmPrinter &_odsPrinter);
724 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
::mlir::LogicalResult verify(::mlir::Location loc)
CallOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties={}, ::mlir::RegionRange regions={})
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
CallOpGenericAdaptor(RangeT values, LateInst op)
::llvm::SmallVector< RangeT > getMapOperands()
RangeT getODSOperands(unsigned index)
CallOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties={}, ::mlir::RegionRange regions={})
CallOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
::mlir::OperandRangeRange getMapOperands()
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
bool calleeIsStructConstrain()
Return true iff the callee function name is FUNC_NAME_CONSTRAIN within a StructDefOp.
::mlir::StringAttr getOperandSegmentSizesAttrName()
::mlir::CallInterfaceCallable getCallableForCallee()
Return the callee of this operation.
::mlir::FunctionType getCalleeType()
::llzk::component::StructType getSingleResultTypeOfCompute()
Assuming the callee is FUNC_NAME_COMPUTE, return the single StructType result.
::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::LogicalResult verifyInvariants()
bool calleeIsStructCompute()
Return true iff the callee function name is FUNC_NAME_COMPUTE within a StructDefOp.
::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name)
bool calleeIsConstrain()
Return true iff the callee function name is FUNC_NAME_CONSTRAIN (this does not check if the callee fu...
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
::mlir::SymbolRefAttr getCallee()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr)
::mlir::LogicalResult verifyInvariantsImpl()
::mlir::Operation::result_range getODSResults(unsigned index)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::llvm::ArrayRef<::mlir::ValueRange > mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands={})
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
bool calleeIsCompute()
Return true iff the callee function name is FUNC_NAME_COMPUTE (this does not check if the callee func...
::mlir::StringAttr getCalleeAttrName(::mlir::OperationName name)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands={})
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::MutableOperandRange getArgOperandsMutable()
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::StringAttr getMapOpGroupSizesAttrName()
::mlir::SymbolRefAttr getCalleeAttr()
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void print(::mlir::OpAsmPrinter &_odsPrinter)
static constexpr ::llvm::StringLiteral getOperationName()
FoldAdaptor::Properties Properties
void setCalleeAttr(::mlir::SymbolRefAttr attr)
::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name)
CallOpGenericAdaptor< RangeT > GenericAdaptor
void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr)
::mlir::StringAttr getNumDimsPerMapAttrName()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::MutableOperandRangeRange getMapOperandsMutable()
::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name)
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::StringAttr getCalleeAttrName()
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::mlir::Operation::operand_range getArgOperands()
void setCalleeFromCallable(::mlir::CallInterfaceCallable callee)
Set the callee for this operation.
::mlir::Operation::operand_range getODSOperands(unsigned index)
FuncDefOpAdaptor(FuncDefOp op)
::mlir::LogicalResult verify(::mlir::Location loc)
FuncDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
RangeT getODSOperands(unsigned index)
FuncDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
FuncDefOpGenericAdaptor(RangeT values, LateInst op)
FuncDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
::mlir::ArrayAttr getArgAttrsAttr()
::mlir::StringAttr getFunctionTypeAttrName(::mlir::OperationName name)
FuncDefOp clone(::mlir::IRMapping &mapper)
Create a deep copy of this function and all of its blocks, remapping any operands that use values out...
::mlir::StringAttr getResAttrsAttrName(::mlir::OperationName name)
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
void setAllowWitnessAttr(bool newValue=true)
Add (resp. remove) the allow_witness attribute to (resp. from) the function def.
static llvm::hash_code computePropertiesHash(const Properties &prop)
FoldAdaptor::Properties Properties
::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
::mlir::FunctionType getFunctionType()
void setArgAttrsAttr(::mlir::ArrayAttr attr)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef name, ::mlir::FunctionType type, ::llvm::ArrayRef<::mlir::NamedAttribute > attrs={}, ::llvm::ArrayRef<::mlir::DictionaryAttr > argAttrs={})
::mlir::StringAttr getSymNameAttrName()
::llvm::ArrayRef<::mlir::Type > getArgumentTypes()
Returns the argument types of this function.
::mlir::Attribute removeArgAttrsAttr()
::mlir::StringAttr getSymNameAttr()
void setSymNameAttr(::mlir::StringAttr attr)
::mlir::StringAttr getFunctionTypeAttrName()
FuncDefOpGenericAdaptor< RangeT > GenericAdaptor
::mlir::TypeAttr getFunctionTypeAttr()
static FuncDefOp create(::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type, ::llvm::ArrayRef<::mlir::NamedAttribute > attrs, ::llvm::ArrayRef<::mlir::DictionaryAttr > argAttrs)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
void print(::mlir::OpAsmPrinter &p)
::mlir::LogicalResult verifyInvariants()
bool nameIsCompute()
Return true iff the function name is FUNC_NAME_COMPUTE (if needed, a check that this FuncDefOp is loc...
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
bool hasAllowWitnessAttr()
Return true iff the function def has the allow_witness attribute.
::mlir::Operation::result_range getODSResults(unsigned index)
void setResAttrsAttr(::mlir::ArrayAttr attr)
::llzk::component::StructType getSingleResultTypeOfCompute()
Assuming the name is FUNC_NAME_COMPUTE, return the single StructType result.
::mlir::StringAttr getResAttrsAttrName()
::std::optional< ::mlir::ArrayAttr > getResAttrs()
::mlir::StringAttr getArgAttrsAttrName(::mlir::OperationName name)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void cloneInto(FuncDefOp dest, ::mlir::IRMapping &mapper)
Clone the internal blocks and attributes from this function into dest.
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::llvm::StringRef getSymName()
bool nameIsConstrain()
Return true iff the function name is FUNC_NAME_CONSTRAIN (if needed, a check that this FuncDefOp is l...
static FuncDefOp create(::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type, ::mlir::Operation::dialect_attr_range attrs)
bool isStructCompute()
Return true iff the function is within a StructDefOp and named FUNC_NAME_COMPUTE.
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::LogicalResult verifyInvariantsImpl()
bool isInStruct()
Return true iff the function is within a StructDefOp.
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Attribute removeResAttrsAttr()
void setFunctionType(::mlir::FunctionType attrValue)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::llvm::ArrayRef<::mlir::Type > getResultTypes()
Returns the result types of this function.
static constexpr ::llvm::StringLiteral getOperationName()
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
bool isStructConstrain()
Return true iff the function is within a StructDefOp and named FUNC_NAME_CONSTRAIN.
void setAllowConstraintAttr(bool newValue=true)
Add (resp. remove) the allow_constraint attribute to (resp. from) the function def.
void setSymName(::llvm::StringRef attrValue)
::mlir::Region & getBody()
static FuncDefOp create(::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type, ::llvm::ArrayRef<::mlir::NamedAttribute > attrs={})
bool hasArgPublicAttr(unsigned index)
Return true iff the argument at the given index has pub attribute.
::mlir::Region * getCallableRegion()
Returns the region on the current operation that is callable.
::mlir::ArrayAttr getResAttrsAttr()
::mlir::LogicalResult verify()
::mlir::SymbolRefAttr getFullyQualifiedName()
Return the full name for this function from the root module, including all surrounding symbol table n...
bool hasAllowConstraintAttr()
Return true iff the function def has the allow_constraint attribute.
void setFunctionTypeAttr(::mlir::TypeAttr attr)
::mlir::StringAttr getArgAttrsAttrName()
::mlir::LogicalResult verify(::mlir::Location loc)
ReturnOpAdaptor(ReturnOp op)
ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
RangeT getODSOperands(unsigned index)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
ReturnOpGenericAdaptor(RangeT values, LateInst op)
void print(::mlir::OpAsmPrinter &_odsPrinter)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::LogicalResult verifyInvariants()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::mlir::MutableOperandRange getMutableSuccessorOperands(::mlir::RegionBranchPoint point)
::mlir::Operation::operand_range getODSOperands(unsigned index)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::LogicalResult verify()
::mlir::LogicalResult verifyInvariantsImpl()
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::Operation::operand_range getOperands()
::mlir::MutableOperandRange getOperandsMutable()
ReturnOpGenericAdaptor< RangeT > GenericAdaptor
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::SymbolRefAttr getCallee()
::mlir::DictionaryAttr odsAttrs
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::SymbolRefAttr getCalleeAttr()
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::RegionRange odsRegions
const Properties & getProperties()
CallOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties={}, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr getAttributes()
::std::optional< ::mlir::ArrayAttr > getResAttrs()
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
::mlir::TypeAttr getFunctionTypeAttr()
FuncDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::DictionaryAttr odsAttrs
::mlir::ArrayAttr getResAttrsAttr()
const Properties & getProperties()
::mlir::StringAttr getSymNameAttr()
::mlir::FunctionType getFunctionType()
::std::optional<::mlir::OperationName > odsOpName
::mlir::Region & getBody()
::mlir::RegionRange getRegions()
::mlir::DictionaryAttr getAttributes()
::llvm::StringRef getSymName()
::mlir::RegionRange odsRegions
::mlir::ArrayAttr getArgAttrsAttr()
::mlir::DictionaryAttr odsAttrs
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::RegionRange odsRegions
ReturnOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr getAttributes()
constexpr char FUNC_NAME_COMPUTE[]
Symbol name for the witness generation (and resp.
constexpr char FUNC_NAME_CONSTRAIN[]
::mlir::DenseI32ArrayAttr numDimsPerMapTy
auto getMapOpGroupSizes()
void setOperandSegmentSizes(const ::llvm::ArrayRef< int32_t > &propValue)
bool operator==(const Properties &rhs) const
operandSegmentSizesTy operandSegmentSizes
bool operator!=(const Properties &rhs) const
numDimsPerMapTy numDimsPerMap
mapOpGroupSizesTy mapOpGroupSizes
::llvm::ArrayRef< int32_t > getOperandSegmentSizes()
void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue)
void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue)
std::array< int32_t, 2 > operandSegmentSizesTy
::mlir::DenseI32ArrayAttr mapOpGroupSizesTy
::mlir::SymbolRefAttr calleeTy
void setCallee(const ::mlir::SymbolRefAttr &propValue)
bool operator==(const Properties &rhs) const
void setResAttrs(const ::mlir::ArrayAttr &propValue)
bool operator!=(const Properties &rhs) const
void setSymName(const ::mlir::StringAttr &propValue)
::mlir::ArrayAttr res_attrsTy
void setArgAttrs(const ::mlir::ArrayAttr &propValue)
void setFunctionType(const ::mlir::TypeAttr &propValue)
::mlir::ArrayAttr arg_attrsTy
::mlir::StringAttr sym_nameTy
::mlir::TypeAttr function_typeTy
function_typeTy function_type