43 auto &propStorage = this->callee;
44 return ::llvm::cast<::mlir::SymbolRefAttr>(propStorage);
46 void setCallee(const ::mlir::SymbolRefAttr &propValue) {
47 this->callee = propValue;
53 auto &propStorage = this->mapOpGroupSizes;
54 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(propStorage);
57 this->mapOpGroupSizes = propValue;
63 auto &propStorage = this->numDimsPerMap;
64 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(propStorage);
67 this->numDimsPerMap = propValue;
72 auto &propStorage = this->operandSegmentSizes;
76 auto &propStorage = this->operandSegmentSizes;
77 ::llvm::copy(propValue, propStorage.begin());
81 rhs.
callee == this->callee &&
88 return !(*
this == rhs);
113 auto attr = ::llvm::cast<::mlir::SymbolRefAttr>(
getProperties().callee);
121 auto attr = ::llvm::cast<::mlir::DenseI32ArrayAttr>(
getProperties().mapOpGroupSizes);
128template <
typename RangeT>
130 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
141 template <
typename LateInst = CallOp,
typename = std::enable_if_t<std::is_same_v<LateInst, CallOp>>>
150 return {std::next(odsOperands.begin(), valueRange.first),
151 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
162 ::llvm::SmallVector<RangeT> tblgenTmpOperandGroups;
163 for (
int i = 0, e = sizes.size(); i < e; ++i) {
164 tblgenTmpOperandGroups.push_back(tblgenTmpOperands.take_front(sizes[i]));
165 tblgenTmpOperands = tblgenTmpOperands.drop_front(sizes[i]);
167 return tblgenTmpOperandGroups;
182 ::llvm::LogicalResult
verify(::mlir::Location loc);
184class 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> {
189 template <
typename RangeT>
194 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"callee"), ::llvm::StringRef(
"mapOpGroupSizes"), ::llvm::StringRef(
"numDimsPerMap"), ::llvm::StringRef(
"operandSegmentSizes")};
195 return ::llvm::ArrayRef(attrNames);
199 return getAttributeNameForIndex(0);
203 return getAttributeNameForIndex(
name, 0);
207 return getAttributeNameForIndex(1);
211 return getAttributeNameForIndex(
name, 1);
215 return getAttributeNameForIndex(2);
219 return getAttributeNameForIndex(
name, 2);
223 return (*this)->getName().getAttributeNames().back();
227 return name.getAttributeNames().back();
231 return ::llvm::StringLiteral(
"function.call");
237 return {std::next(getOperation()->operand_begin(), valueRange.first),
238 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
254 return {std::next(getOperation()->result_begin(), valueRange.first),
255 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
258 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
264 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
265 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
268 return ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().callee);
273 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(getProperties().numDimsPerMap);
278 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
283 getProperties().callee = attr;
287 getProperties().numDimsPerMap = attr;
292 getProperties().mapOpGroupSizes = attr;
296 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr callee, ::mlir::ValueRange argOperands = {});
297 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 = {});
298 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 = {});
299 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState,
::llzk::function::FuncDefOp callee, ::mlir::ValueRange argOperands = {});
300 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState,
::llzk::function::FuncDefOp callee, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::mlir::ValueRange argOperands = {});
301 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 = {});
307 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
308 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
310 void print(::mlir::OpAsmPrinter &_odsPrinter);
312 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
313 return getAttributeNameForIndex((*this)->getName(), index);
316 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName
name,
unsigned index) {
317 assert(index < 3 &&
"invalid attribute index");
319 assert(
name.isRegistered() &&
"Operation isn't registered, missing a "
320 "dependent dialect loading?");
321 return name.getAttributeNames()[index];
350 ::mlir::FailureOr<::llzk::SymbolLookupResult<::llzk::function::FuncDefOp>>
379 auto &propStorage = this->arg_attrs;
380 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
383 this->arg_attrs = propValue;
389 auto &propStorage = this->function_type;
390 return ::llvm::cast<::mlir::TypeAttr>(propStorage);
393 this->function_type = propValue;
399 auto &propStorage = this->res_attrs;
400 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
403 this->res_attrs = propValue;
409 auto &propStorage = this->sym_name;
410 return ::llvm::cast<::mlir::StringAttr>(propStorage);
413 this->sym_name = propValue;
424 return !(*
this == rhs);
452 auto attr = ::llvm::cast<::mlir::StringAttr>(
getProperties().sym_name);
458 auto attr = ::llvm::cast<::mlir::TypeAttr>(
getProperties().function_type);
464 auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(
getProperties().arg_attrs);
468 ::std::optional< ::mlir::ArrayAttr >
getArgAttrs();
470 auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(
getProperties().res_attrs);
474 ::std::optional< ::mlir::ArrayAttr >
getResAttrs();
485template <
typename RangeT>
487 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
498 template <
typename LateInst = FuncDefOp,
typename = std::enable_if_t<std::is_same_v<LateInst, FuncDefOp>>>
507 return {std::next(odsOperands.begin(), valueRange.first),
508 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
523 ::llvm::LogicalResult
verify(::mlir::Location loc);
525class 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> {
530 template <
typename RangeT>
535 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"arg_attrs"), ::llvm::StringRef(
"function_type"), ::llvm::StringRef(
"res_attrs"), ::llvm::StringRef(
"sym_name")};
536 return ::llvm::ArrayRef(attrNames);
540 return getAttributeNameForIndex(0);
544 return getAttributeNameForIndex(
name, 0);
548 return getAttributeNameForIndex(1);
552 return getAttributeNameForIndex(
name, 1);
556 return getAttributeNameForIndex(2);
560 return getAttributeNameForIndex(
name, 2);
564 return getAttributeNameForIndex(3);
568 return getAttributeNameForIndex(
name, 3);
572 return ::llvm::StringLiteral(
"function.def");
581 return {std::next(getOperation()->operand_begin(), valueRange.first),
582 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
591 return {std::next(getOperation()->result_begin(), valueRange.first),
592 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
596 return (*this)->getRegion(0);
599 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
605 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
606 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
609 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
614 return ::llvm::cast<::mlir::TypeAttr>(getProperties().function_type);
619 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs);
622 ::std::optional< ::mlir::ArrayAttr >
getArgAttrs();
624 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs);
627 ::std::optional< ::mlir::ArrayAttr >
getResAttrs();
629 getProperties().sym_name = attr;
634 getProperties().function_type = attr;
639 getProperties().arg_attrs = attr;
643 getProperties().res_attrs = attr;
647 auto &attr = getProperties().arg_attrs;
653 auto &attr = getProperties().res_attrs;
658 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 = {});
659 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);
660 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);
661 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);
662 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);
663 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
664 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
665 void print(::mlir::OpAsmPrinter &p);
668 ::llvm::LogicalResult
verify();
669 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
671 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
672 return getAttributeNameForIndex((*this)->getName(), index);
675 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName
name,
unsigned index) {
676 assert(index < 4 &&
"invalid attribute index");
678 assert(
name.isRegistered() &&
"Operation isn't registered, missing a "
679 "dependent dialect loading?");
680 return name.getAttributeNames()[index];
685 ::llvm::ArrayRef<::mlir::NamedAttribute> attrs = {});
687 ::mlir::Operation::dialect_attr_range attrs);
689 ::llvm::ArrayRef<::mlir::NamedAttribute> attrs,
690 ::llvm::ArrayRef<::mlir::DictionaryAttr> argAttrs);
710 return getOperation()->hasAttr(llzk::function::AllowConstraintAttr::name);
718 return getOperation()->hasAttr(llzk::function::AllowWitnessAttr::name);
769 inline bool isInStruct() { return ::llzk::component::isInStruct(*
this); }
823template <
typename RangeT>
825 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
828 ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
830 ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) :
ReturnOpGenericAdaptor(values, attrs, (properties ? *properties.as<::
mlir::EmptyProperties *>() : ::
mlir::EmptyProperties{}), regions) {}
834 template <
typename LateInst = ReturnOp,
typename = std::enable_if_t<std::is_same_v<LateInst, ReturnOp>>>
843 return {std::next(odsOperands.begin(), valueRange.first),
844 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
859 ::llvm::LogicalResult
verify(::mlir::Location loc);
861class 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> {
866 template <
typename RangeT>
874 return ::llvm::StringLiteral(
"function.return");
880 return {std::next(getOperation()->operand_begin(), valueRange.first),
881 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
895 return {std::next(getOperation()->result_begin(), valueRange.first),
896 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
899 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState);
900 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands);
901 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
904 ::llvm::LogicalResult
verify();
906 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
907 void print(::mlir::OpAsmPrinter &_odsPrinter);
908 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
::llvm::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()
CallOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs)
CallOpGenericAdaptor(RangeT values, const CallOpGenericAdaptorBase &base)
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={})
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::SymbolRefAttr getCalleeAttr()
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static llvm::hash_code computePropertiesHash(const Properties &prop)
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)
::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
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={})
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
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()
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::Operation::operand_range getArgOperands()
::mlir::Value getSelfValueFromConstrain()
Return the "self" value (i.e.
::llvm::LogicalResult verifyInvariants()
::mlir::StringAttr getMapOpGroupSizesAttrName()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void print(::mlir::OpAsmPrinter &_odsPrinter)
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::OperandRangeRange getMapOperands()
static ::llvm::SmallVector<::mlir::ValueRange > toVectorOfValueRange(::mlir::OperandRangeRange)
Allocate consecutive storage of the ValueRange instances in the parameter so it can be passed to the ...
FoldAdaptor::Properties Properties
void setCalleeAttr(::mlir::SymbolRefAttr attr)
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::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)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::StringAttr getCalleeAttrName()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::mlir::Value getSelfValueFromCompute()
Return the "self" value (i.e.
void setCalleeFromCallable(::mlir::CallInterfaceCallable callee)
Set the callee for this operation.
::mlir::FailureOr<::llzk::SymbolLookupResult<::llzk::function::FuncDefOp > > getCalleeTarget(::mlir::SymbolTableCollection &tables)
Resolve and return the target FuncDefOp for this CallOp.
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::mlir::Operation::operand_range getODSOperands(unsigned index)
FuncDefOpAdaptor(FuncDefOp op)
FuncDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
FuncDefOpGenericAdaptor(RangeT values, const FuncDefOpGenericAdaptorBase &base)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
FuncDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
RangeT getODSOperands(unsigned index)
FuncDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
FuncDefOpGenericAdaptor(RangeT values, LateInst op)
FuncDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
::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)
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
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
::mlir::Value getSelfValueFromCompute()
Return the "self" value (i.e.
::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()
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::ArrayRef<::mlir::Type > getArgumentTypes()
Returns the argument types of this function.
void setSymNameAttr(::mlir::StringAttr attr)
::mlir::StringAttr getFunctionTypeAttrName()
::llvm::LogicalResult verifyInvariants()
::mlir::Value getSelfValueFromConstrain()
Return the "self" value (i.e.
FuncDefOpGenericAdaptor< RangeT > GenericAdaptor
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)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
bool nameIsCompute()
Return true iff the function name is FUNC_NAME_COMPUTE (if needed, a check that this FuncDefOp is loc...
bool hasAllowWitnessAttr()
Return true iff the function def has the allow_witness attribute.
void setResAttrsAttr(::mlir::ArrayAttr attr)
::llzk::component::StructType getSingleResultTypeOfCompute()
Assuming the name is FUNC_NAME_COMPUTE, return the single StructType result.
::mlir::Attribute removeResAttrsAttr()
::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()
bool nameIsProduct()
Return true iff the function name is FUNC_NAME_PRODUCT (if needed, a check that this FuncDefOp is loc...
::mlir::ArrayAttr getArgAttrsAttr()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::Operation::operand_range getODSOperands(unsigned index)
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)
bool isInStruct()
Return true iff the function is within a StructDefOp.
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
void setFunctionType(::mlir::FunctionType attrValue)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
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)
static FuncDefOp create(::mlir::Location location, ::llvm::StringRef name, ::mlir::FunctionType type, ::llvm::ArrayRef<::mlir::NamedAttribute > attrs={})
::mlir::SymbolRefAttr getFullyQualifiedName(bool requireParent=true)
Return the full name for this function from the root module, including all surrounding symbol table n...
::mlir::TypeAttr getFunctionTypeAttr()
bool hasArgPublicAttr(unsigned index)
Return true iff the argument at the given index has pub attribute.
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Region * getCallableRegion()
Returns the region on the current operation that is callable.
::llvm::LogicalResult verify()
::mlir::Region & getBody()
::mlir::StringAttr getSymNameAttr()
::mlir::ArrayAttr getResAttrsAttr()
::llvm::LogicalResult verifyInvariantsImpl()
bool isStructProduct()
Return true iff the function is within a StructDefOp and named FUNC_NAME_PRODUCT.
bool hasAllowConstraintAttr()
Return true iff the function def has the allow_constraint attribute.
void setFunctionTypeAttr(::mlir::TypeAttr attr)
::mlir::StringAttr getArgAttrsAttrName()
::mlir::Attribute removeArgAttrsAttr()
ReturnOpAdaptor(ReturnOp op)
ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
ReturnOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
RangeT getODSOperands(unsigned index)
ReturnOpGenericAdaptor(RangeT values, const ReturnOpGenericAdaptorBase &base)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
ReturnOpGenericAdaptor(RangeT values, LateInst op)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Operation::result_range getODSResults(unsigned index)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::MutableOperandRange getMutableSuccessorOperands(::mlir::RegionBranchPoint point)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::LogicalResult verify()
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::MutableOperandRange getOperandsMutable()
ReturnOpGenericAdaptor< RangeT > GenericAdaptor
::mlir::Operation::operand_range getOperands()
::llvm::LogicalResult verifyInvariants()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
CallOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::SymbolRefAttr getCallee()
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::DictionaryAttr odsAttrs
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
::mlir::DictionaryAttr getAttributes()
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::mlir::SymbolRefAttr getCalleeAttr()
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::RegionRange odsRegions
const Properties & getProperties()
::std::optional< ::mlir::ArrayAttr > getResAttrs()
::std::optional< ::mlir::ArrayAttr > getArgAttrs()
::mlir::ArrayAttr getArgAttrsAttr()
::mlir::StringAttr getSymNameAttr()
::mlir::RegionRange getRegions()
::mlir::TypeAttr getFunctionTypeAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::DictionaryAttr odsAttrs
const Properties & getProperties()
FuncDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::FunctionType getFunctionType()
::std::optional<::mlir::OperationName > odsOpName
::mlir::Region & getBody()
::llvm::StringRef getSymName()
::mlir::DictionaryAttr getAttributes()
::mlir::RegionRange odsRegions
::mlir::ArrayAttr getResAttrsAttr()
::mlir::DictionaryAttr odsAttrs
ReturnOpGenericAdaptorBase(::mlir::Operation *op)
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr getAttributes()
ReturnOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
constexpr char FUNC_NAME_COMPUTE[]
Symbol name for the witness generation (and resp.
constexpr char FUNC_NAME_CONSTRAIN[]
constexpr char FUNC_NAME_PRODUCT[]
::mlir::DenseI32ArrayAttr numDimsPerMapTy
auto getMapOpGroupSizes()
bool operator==(const Properties &rhs) const
operandSegmentSizesTy operandSegmentSizes
bool operator!=(const Properties &rhs) const
numDimsPerMapTy numDimsPerMap
mapOpGroupSizesTy mapOpGroupSizes
void setOperandSegmentSizes(::llvm::ArrayRef< int32_t > propValue)
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)
::llvm::ArrayRef< int32_t > getOperandSegmentSizes() const
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