194template <
typename RangeT>
196 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
207 template <
typename LateInst = CreateStructOp,
typename = std::enable_if_t<std::is_same_v<LateInst, CreateStructOp>>>
216 return {std::next(odsOperands.begin(), valueRange.first),
217 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
232 ::llvm::LogicalResult
verify(::mlir::Location loc);
234class CreateStructOp :
public ::mlir::Op<CreateStructOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::llzk::component::StructType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::llzk::function::WitnessGen, ::mlir::OpTrait::OpInvariants, ::mlir::OpAsmOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait> {
239 template <
typename RangeT>
243 using ::mlir::OpAsmOpInterface::Trait<CreateStructOp>::getAsmBlockArgumentNames;
244 using ::mlir::OpAsmOpInterface::Trait<CreateStructOp>::getAsmBlockNames;
245 using ::mlir::OpAsmOpInterface::Trait<CreateStructOp>::getDefaultDialect;
251 return ::llvm::StringLiteral(
"struct.new");
260 return {std::next(getOperation()->operand_begin(), valueRange.first),
261 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
270 return {std::next(getOperation()->result_begin(), valueRange.first),
271 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
274 ::mlir::TypedValue<::llzk::component::StructType>
getResult() {
275 return ::llvm::cast<::mlir::TypedValue<::llzk::component::StructType>>(*
getODSResults(0).begin());
278 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
281 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
284 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
285 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result);
286 static CreateStructOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result);
288 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
289 static CreateStructOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes);
290 static CreateStructOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes);
291 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
292 static CreateStructOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
293 static CreateStructOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
294 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
295 static CreateStructOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
296 static CreateStructOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
300 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
301 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
302 void print(::mlir::OpAsmPrinter &_odsPrinter);
325 auto &propStorage = this->column;
326 return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
329 this->column = propValue;
335 auto &propStorage = this->signal;
336 return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
339 this->signal = propValue;
345 auto &propStorage = this->sym_name;
346 return ::llvm::cast<::mlir::StringAttr>(propStorage);
349 this->sym_name = propValue;
355 auto &propStorage = this->type;
356 return ::llvm::cast<::mlir::TypeAttr>(propStorage);
358 void setType(const ::mlir::TypeAttr &propValue) {
359 this->type = propValue;
363 rhs.
column == this->column &&
364 rhs.
signal == this->signal &&
366 rhs.
type == this->type &&
370 return !(*
this == rhs);
398 auto attr = ::llvm::cast<::mlir::StringAttr>(
getProperties().sym_name);
404 auto attr = ::llvm::cast<::mlir::TypeAttr>(
getProperties().type);
416template <
typename RangeT>
418 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
429 template <
typename LateInst = MemberDefOp,
typename = std::enable_if_t<std::is_same_v<LateInst, MemberDefOp>>>
438 return {std::next(odsOperands.begin(), valueRange.first),
439 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
454 ::llvm::LogicalResult
verify(::mlir::Location loc);
456class MemberDefOp :
public ::mlir::Op<MemberDefOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::HasParent<::llzk::component::StructDefOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::mlir::SymbolOpInterface::Trait> {
461 template <
typename RangeT>
466 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"column"), ::llvm::StringRef(
"signal"), ::llvm::StringRef(
"sym_name"), ::llvm::StringRef(
"type")};
467 return ::llvm::ArrayRef(attrNames);
471 return getAttributeNameForIndex(0);
475 return getAttributeNameForIndex(name, 0);
479 return getAttributeNameForIndex(1);
483 return getAttributeNameForIndex(name, 1);
487 return getAttributeNameForIndex(2);
491 return getAttributeNameForIndex(name, 2);
495 return getAttributeNameForIndex(3);
499 return getAttributeNameForIndex(name, 3);
503 return ::llvm::StringLiteral(
"struct.member");
512 return {std::next(getOperation()->operand_begin(), valueRange.first),
513 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
522 return {std::next(getOperation()->result_begin(), valueRange.first),
523 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
526 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
529 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
532 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
533 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
536 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
541 return ::llvm::cast<::mlir::TypeAttr>(getProperties().type);
546 return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().column);
551 return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().signal);
556 getProperties().sym_name = attr;
561 getProperties().type = attr;
564 void setType(::mlir::Type attrValue);
566 getProperties().column = attr;
571 getProperties().signal = attr;
576 auto attr = getProperties().column;
577 getProperties().column = {};
582 auto attr = getProperties().signal;
583 getProperties().signal = {};
587 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::TypeAttr type,
bool isSignal =
false,
bool isColumn =
false);
588 static MemberDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name, ::mlir::TypeAttr type,
bool isSignal =
false,
bool isColumn =
false);
589 static MemberDefOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::StringAttr sym_name, ::mlir::TypeAttr type,
bool isSignal =
false,
bool isColumn =
false);
590 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::Type type,
bool isSignal =
false,
bool isColumn =
false);
591 static MemberDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llvm::StringRef sym_name, ::mlir::Type type,
bool isSignal =
false,
bool isColumn =
false);
592 static MemberDefOp create(::mlir::ImplicitLocOpBuilder &builder, ::llvm::StringRef sym_name, ::mlir::Type type,
bool isSignal =
false,
bool isColumn =
false);
593 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes,
bool isSignal =
false,
bool isColumn =
false);
594 static MemberDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes,
bool isSignal =
false,
bool isColumn =
false);
595 static MemberDefOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes,
bool isSignal =
false,
bool isColumn =
false);
596 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes,
bool isSignal =
false,
bool isColumn =
false);
597 static MemberDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes,
bool isSignal =
false,
bool isColumn =
false);
598 static MemberDefOp create(::mlir::ImplicitLocOpBuilder &builder, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes,
bool isSignal =
false,
bool isColumn =
false);
601 ::llvm::LogicalResult
verify();
602 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
603 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
604 void print(::mlir::OpAsmPrinter &_odsPrinter);
606 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
607 return getAttributeNameForIndex((*this)->getName(), index);
610 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
611 assert(index < 4 &&
"invalid attribute index");
612 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
613 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
614 "dependent dialect loading?");
615 return name.getAttributeNames()[index];
620 inline bool hasPublicAttr() {
return getOperation()->hasAttr(llzk::PublicAttr::name); }
646 auto &propStorage = this->mapOpGroupSizes;
647 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(propStorage);
650 this->mapOpGroupSizes = propValue;
656 auto &propStorage = this->member_name;
657 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(propStorage);
660 this->member_name = propValue;
666 auto &propStorage = this->numDimsPerMap;
667 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(propStorage);
670 this->numDimsPerMap = propValue;
676 auto &propStorage = this->tableOffset;
677 return ::llvm::dyn_cast_or_null<::mlir::Attribute>(propStorage);
680 this->tableOffset = propValue;
691 return !(*
this == rhs);
716 auto attr = ::llvm::cast<::mlir::FlatSymbolRefAttr>(
getProperties().member_name);
722 auto attr = ::llvm::dyn_cast_or_null<::mlir::Attribute>(
getProperties().tableOffset);
730 auto attr = ::llvm::cast<::mlir::DenseI32ArrayAttr>(
getProperties().mapOpGroupSizes);
738template <
typename RangeT>
740 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
742 static constexpr int odsIndex_component = 0;
743 static constexpr int odsIndex_mapOperands = 1;
753 template <
typename LateInst = MemberReadOp,
typename = std::enable_if_t<std::is_same_v<LateInst, MemberReadOp>>>
762 return {std::next(odsOperands.begin(), valueRange.first),
763 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
774 ::llvm::SmallVector<RangeT> tblgenTmpOperandGroups;
775 for (
int i = 0, e = sizes.size(); i < e; ++i) {
776 tblgenTmpOperandGroups.push_back(tblgenTmpOperands.take_front(sizes[i]));
777 tblgenTmpOperands = tblgenTmpOperands.drop_front(sizes[i]);
779 return tblgenTmpOperandGroups;
794 ::llvm::LogicalResult
verify(::mlir::Location loc);
796class MemberReadOp :
public ::mlir::Op<MemberReadOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::llzk::VerifySizesForMultiAffineOps<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait, ::llzk::component::MemberRefOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait> {
801 template <
typename RangeT>
808 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"mapOpGroupSizes"), ::llvm::StringRef(
"member_name"), ::llvm::StringRef(
"numDimsPerMap"), ::llvm::StringRef(
"tableOffset")};
809 return ::llvm::ArrayRef(attrNames);
813 return getAttributeNameForIndex(0);
817 return getAttributeNameForIndex(name, 0);
821 return getAttributeNameForIndex(1);
825 return getAttributeNameForIndex(name, 1);
829 return getAttributeNameForIndex(2);
833 return getAttributeNameForIndex(name, 2);
837 return getAttributeNameForIndex(3);
841 return getAttributeNameForIndex(name, 3);
845 return ::llvm::StringLiteral(
"struct.readm");
851 return {std::next(getOperation()->operand_begin(), valueRange.first),
852 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
856 return ::llvm::cast<::mlir::TypedValue<::llzk::component::StructType>>(*
getODSOperands(0).begin());
865 return getOperation()->getOpOperand(range.first);
875 return {std::next(getOperation()->result_begin(), valueRange.first),
876 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
879 ::mlir::TypedValue<::mlir::Type>
getVal() {
880 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*
getODSResults(0).begin());
883 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
886 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
889 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
890 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
893 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().member_name);
898 return ::llvm::dyn_cast_or_null<::mlir::Attribute>(getProperties().tableOffset);
903 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(getProperties().numDimsPerMap);
908 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
913 getProperties().member_name = attr;
918 getProperties().tableOffset = attr;
922 getProperties().numDimsPerMap = attr;
927 getProperties().mapOpGroupSizes = attr;
932 auto attr = getProperties().tableOffset;
933 getProperties().tableOffset = {};
937 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType, ::mlir::Value
component, ::mlir::StringAttr member);
938 static MemberReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type resultType, ::mlir::Value
component, ::mlir::StringAttr member);
939 static MemberReadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type resultType, ::mlir::Value
component, ::mlir::StringAttr member);
940 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType, ::mlir::Value
component, ::mlir::StringAttr member, ::mlir::Attribute dist, ::mlir::ValueRange mapOperands, std::optional<int32_t> numDims);
941 static MemberReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type resultType, ::mlir::Value
component, ::mlir::StringAttr member, ::mlir::Attribute dist, ::mlir::ValueRange mapOperands, std::optional<int32_t> numDims);
942 static MemberReadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type resultType, ::mlir::Value
component, ::mlir::StringAttr member, ::mlir::Attribute dist, ::mlir::ValueRange mapOperands, std::optional<int32_t> numDims);
943 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType, ::mlir::Value
component, ::mlir::StringAttr member, ::mlir::SymbolRefAttr dist);
944 static MemberReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type resultType, ::mlir::Value
component, ::mlir::StringAttr member, ::mlir::SymbolRefAttr dist);
945 static MemberReadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type resultType, ::mlir::Value
component, ::mlir::StringAttr member, ::mlir::SymbolRefAttr dist);
946 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType, ::mlir::Value
component, ::mlir::StringAttr member, ::mlir::IntegerAttr dist);
947 static MemberReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type resultType, ::mlir::Value
component, ::mlir::StringAttr member, ::mlir::IntegerAttr dist);
948 static MemberReadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type resultType, ::mlir::Value
component, ::mlir::StringAttr member, ::mlir::IntegerAttr dist);
949 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::mlir::ArrayRef<::mlir::NamedAttribute> attrs);
950 static MemberReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::mlir::ArrayRef<::mlir::NamedAttribute> attrs);
951 static MemberReadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::mlir::ArrayRef<::mlir::NamedAttribute> attrs);
955 ::llvm::LogicalResult
verify();
957 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
958 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
959 void print(::mlir::OpAsmPrinter &_odsPrinter);
960 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
962 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
963 return getAttributeNameForIndex((*this)->getName(), index);
966 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
967 assert(index < 4 &&
"invalid attribute index");
968 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
969 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
970 "dependent dialect loading?");
971 return name.getAttributeNames()[index];
976 inline ::mlir::FailureOr<SymbolLookupResult<MemberDefOp>>
getMemberDefOp(::mlir::SymbolTableCollection &tables) {
977 return ::llvm::cast<MemberRefOpInterface>(getOperation()).getMemberDefOp(tables);
1001 auto &propStorage = this->member_name;
1002 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(propStorage);
1005 this->member_name = propValue;
1013 return !(*
this == rhs);
1041 auto attr = ::llvm::cast<::mlir::FlatSymbolRefAttr>(
getProperties().member_name);
1049template <
typename RangeT>
1051 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1053 static constexpr int odsIndex_component = 0;
1054 static constexpr int odsIndex_val = 1;
1064 template <
typename LateInst = MemberWriteOp,
typename = std::enable_if_t<std::is_same_v<LateInst, MemberWriteOp>>>
1073 return {std::next(odsOperands.begin(), valueRange.first),
1074 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1097 ::llvm::LogicalResult
verify(::mlir::Location loc);
1099class MemberWriteOp :
public ::mlir::Op<MemberWriteOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::llzk::function::WitnessGen, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait, ::llzk::component::MemberRefOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait> {
1104 template <
typename RangeT>
1111 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"member_name")};
1112 return ::llvm::ArrayRef(attrNames);
1116 return getAttributeNameForIndex(0);
1120 return getAttributeNameForIndex(name, 0);
1124 return ::llvm::StringLiteral(
"struct.writem");
1133 return {std::next(getOperation()->operand_begin(), valueRange.first),
1134 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1138 return ::llvm::cast<::mlir::TypedValue<::llzk::component::StructType>>(*
getODSOperands(0).begin());
1142 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*
getODSOperands(1).begin());
1147 return getOperation()->getOpOperand(range.first);
1152 return getOperation()->getOpOperand(range.first);
1161 return {std::next(getOperation()->result_begin(), valueRange.first),
1162 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1165 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1168 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
1171 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1172 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
1175 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().member_name);
1180 getProperties().member_name = attr;
1184 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value
component, ::mlir::FlatSymbolRefAttr member_name, ::mlir::Value val);
1185 static MemberWriteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value
component, ::mlir::FlatSymbolRefAttr member_name, ::mlir::Value val);
1186 static MemberWriteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value
component, ::mlir::FlatSymbolRefAttr member_name, ::mlir::Value val);
1187 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value
component, ::mlir::FlatSymbolRefAttr member_name, ::mlir::Value val);
1188 static MemberWriteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value
component, ::mlir::FlatSymbolRefAttr member_name, ::mlir::Value val);
1189 static MemberWriteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value
component, ::mlir::FlatSymbolRefAttr member_name, ::mlir::Value val);
1190 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value
component, ::llvm::StringRef member_name, ::mlir::Value val);
1191 static MemberWriteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value
component, ::llvm::StringRef member_name, ::mlir::Value val);
1192 static MemberWriteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value
component, ::llvm::StringRef member_name, ::mlir::Value val);
1193 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value
component, ::llvm::StringRef member_name, ::mlir::Value val);
1194 static MemberWriteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value
component, ::llvm::StringRef member_name, ::mlir::Value val);
1195 static MemberWriteOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value
component, ::llvm::StringRef member_name, ::mlir::Value val);
1196 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1197 static MemberWriteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1198 static MemberWriteOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1199 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1200 static MemberWriteOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1201 static MemberWriteOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1205 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
1206 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1207 void print(::mlir::OpAsmPrinter &_odsPrinter);
1208 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1210 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
1211 return getAttributeNameForIndex((*this)->getName(), index);
1214 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
1215 assert(index < 1 &&
"invalid attribute index");
1216 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
1217 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
1218 "dependent dialect loading?");
1219 return name.getAttributeNames()[index];
1224 inline ::mlir::FailureOr<SymbolLookupResult<MemberDefOp>>
getMemberDefOp(::mlir::SymbolTableCollection &tables) {
1225 return ::llvm::cast<MemberRefOpInterface>(getOperation()).getMemberDefOp(tables);
1249 auto &propStorage = this->sym_name;
1250 return ::llvm::cast<::mlir::StringAttr>(propStorage);
1253 this->sym_name = propValue;
1261 return !(*
this == rhs);
1289 auto attr = ::llvm::cast<::mlir::StringAttr>(
getProperties().sym_name);
1305template <
typename RangeT>
1307 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1318 template <
typename LateInst = StructDefOp,
typename = std::enable_if_t<std::is_same_v<LateInst, StructDefOp>>>
1327 return {std::next(odsOperands.begin(), valueRange.first),
1328 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1343 ::llvm::LogicalResult
verify(::mlir::Location loc);
1345class StructDefOp :
public ::mlir::Op<StructDefOp, ::mlir::OpTrait::OneRegion, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::HasParent<::mlir::ModuleOp, ::llzk::polymorphic::TemplateOp>::Impl, ::llzk::component::SetFuncAllowAttrs, ::mlir::OpTrait::NoRegionArguments, ::mlir::OpTrait::NoTerminator, ::mlir::OpTrait::SingleBlock, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::SymbolOpInterface::Trait, ::llzk::LLZKSymbolTableImplTrait, ::mlir::OpTrait::SymbolTable, ::mlir::OpTrait::IsIsolatedFromAbove, ::llzk::verif::ContractTargetOpInterface::Trait, ::mlir::RegionKindInterface::Trait, ::mlir::OpTrait::HasOnlyGraphRegion> {
1350 template <
typename RangeT>
1355 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"sym_name")};
1356 return ::llvm::ArrayRef(attrNames);
1360 return getAttributeNameForIndex(0);
1364 return getAttributeNameForIndex(name, 0);
1368 return ::llvm::StringLiteral(
"struct.def");
1377 return {std::next(getOperation()->operand_begin(), valueRange.first),
1378 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1387 return {std::next(getOperation()->result_begin(), valueRange.first),
1388 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1392 return (*this)->getRegion(0);
1395 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1398 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
1401 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1402 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
1405 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
1410 getProperties().sym_name = attr;
1413 void setSymName(::llvm::StringRef attrValue);
1414 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name);
1415 static StructDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name);
1416 static StructDefOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::StringAttr sym_name);
1417 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name);
1418 static StructDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name);
1419 static StructDefOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name);
1420 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name);
1421 static StructDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llvm::StringRef sym_name);
1422 static StructDefOp create(::mlir::ImplicitLocOpBuilder &builder, ::llvm::StringRef sym_name);
1423 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name);
1424 static StructDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name);
1425 static StructDefOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name);
1426 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1427 static StructDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1428 static StructDefOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1429 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1430 static StructDefOp
create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1431 static StructDefOp
create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands,
const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1435 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1436 void print(::mlir::OpAsmPrinter &_odsPrinter);
1438 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
1439 return getAttributeNameForIndex((*this)->getName(), index);
1442 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
1443 assert(index < 1 &&
"invalid attribute index");
1444 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
1445 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
1446 "dependent dialect loading?");
1447 return name.getAttributeNames()[index];
::llvm::LogicalResult verify(::mlir::Location loc)
CreateStructOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
CreateStructOpAdaptor(CreateStructOp op)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
CreateStructOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
RangeT getODSOperands(unsigned index)
CreateStructOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
CreateStructOpGenericAdaptor(RangeT values, LateInst op)
CreateStructOpGenericAdaptor(RangeT values, const CreateStructOpGenericAdaptorBase &base)
CreateStructOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result)
::mlir::Operation::operand_range getODSOperands(unsigned index)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::llvm::LogicalResult verifyInvariants()
void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
FoldAdaptor::Properties Properties
CreateStructOpGenericAdaptor< RangeT > GenericAdaptor
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
static constexpr ::llvm::StringLiteral getOperationName()
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::TypedValue<::llzk::component::StructType > getResult()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static CreateStructOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result)
CreateStructOpAdaptor Adaptor
void print(::mlir::OpAsmPrinter &_odsPrinter)
static llvm::hash_code computePropertiesHash(const Properties &prop)
MemberDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
MemberDefOpAdaptor(MemberDefOp op)
MemberDefOpGenericAdaptor(RangeT values, const MemberDefOpGenericAdaptorBase &base)
MemberDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
MemberDefOpGenericAdaptor(RangeT values, LateInst op)
MemberDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
MemberDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
RangeT getODSOperands(unsigned index)
void setSymNameAttr(::mlir::StringAttr attr)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
bool hasPublicAttr()
Returns whether this member is a public output.
MemberDefOpAdaptor Adaptor
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::StringAttr getColumnAttrName(::mlir::OperationName name)
::llvm::StringRef getSymName()
void setSignal(bool attrValue)
::mlir::StringAttr getTypeAttrName()
::mlir::StringAttr getColumnAttrName()
::llvm::LogicalResult verifyInvariants()
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
MemberDefOpGenericAdaptor< RangeT > GenericAdaptor
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::Type type, bool isSignal=false, bool isColumn=false)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
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)
void setPublicAttr(bool newValue=true)
Adds or removes the unit llzk.pub attribute according to newValue.
::mlir::StringAttr getTypeAttrName(::mlir::OperationName name)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute > attributes, bool isSignal=false, bool isColumn=false)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInvariantsImpl()
void setColumnAttr(::mlir::UnitAttr attr)
::mlir::UnitAttr getSignalAttr()
void setTypeAttr(::mlir::TypeAttr attr)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static constexpr ::llvm::StringLiteral getOperationName()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::TypeAttr type, bool isSignal=false, bool isColumn=false)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
void setColumn(bool attrValue)
::mlir::Attribute removeSignalAttr()
::mlir::TypeAttr getTypeAttr()
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::Attribute removeColumnAttr()
::mlir::StringAttr getSignalAttrName()
::mlir::StringAttr getSignalAttrName(::mlir::OperationName name)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::StringAttr getSymNameAttr()
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
void setType(::mlir::Type attrValue)
static MemberDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name, ::mlir::TypeAttr type, bool isSignal=false, bool isColumn=false)
::llvm::LogicalResult verify()
FoldAdaptor::Properties Properties
void setSignalAttr(::mlir::UnitAttr attr)
void setSymName(::llvm::StringRef attrValue)
::mlir::Operation::result_range getODSResults(unsigned index)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::mlir::UnitAttr getColumnAttr()
::mlir::StringAttr getSymNameAttrName()
MemberReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
MemberReadOpAdaptor(MemberReadOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
MemberReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
MemberReadOpGenericAdaptor(RangeT values, LateInst op)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::llvm::SmallVector< RangeT > getMapOperands()
MemberReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
RangeT getODSOperands(unsigned index)
MemberReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
MemberReadOpGenericAdaptor(RangeT values, const MemberReadOpGenericAdaptorBase &base)
::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name)
::mlir::MutableOperandRangeRange getMapOperandsMutable()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::mlir::ArrayRef<::mlir::NamedAttribute > attrs)
::mlir::Attribute removeTableOffsetAttr()
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::TypedValue<::llzk::component::StructType > getComponent()
static llvm::hash_code computePropertiesHash(const Properties &prop)
MemberReadOpGenericAdaptor< RangeT > GenericAdaptor
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
::mlir::TypedValue<::mlir::Type > getVal()
static MemberReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type resultType, ::mlir::Value component, ::mlir::StringAttr member)
::std::optional<::mlir::Attribute > getTableOffset()
::mlir::OpOperand & getComponentMutable()
::mlir::OperandRangeRange getMapOperands()
bool isRead()
Return true if the op is a read, false if it's a write.
static constexpr int odsIndex_mapOperands
void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType, ::mlir::Value component, ::mlir::StringAttr member)
::llvm::LogicalResult verifyInvariantsImpl()
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
::mlir::FlatSymbolRefAttr getMemberNameAttr()
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
::mlir::StringAttr getMemberNameAttrName(::mlir::OperationName name)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::StringAttr getMapOpGroupSizesAttrName()
void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr)
inline ::mlir::FailureOr< SymbolLookupResult< MemberDefOp > > getMemberDefOp(::mlir::SymbolTableCollection &tables)
Gets the definition for the member referenced in this op.
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::mlir::Operation::result_range getODSResults(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType, ::mlir::Value component, ::mlir::StringAttr member, ::mlir::Attribute dist, ::mlir::ValueRange mapOperands, std::optional< int32_t > numDims)
::llvm::LogicalResult verifyInvariants()
void setTableOffsetAttr(::mlir::Attribute attr)
MemberReadOpAdaptor Adaptor
void setMemberNameAttr(::mlir::FlatSymbolRefAttr attr)
static constexpr int odsIndex_component
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::llvm::StringRef getMemberName()
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::StringAttr getTableOffsetAttrName()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::llvm::LogicalResult verify()
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::Attribute getTableOffsetAttr()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
void setMemberName(::llvm::StringRef attrValue)
::mlir::StringAttr getMemberNameAttrName()
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::StringAttr getTableOffsetAttrName(::mlir::OperationName name)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
FoldAdaptor::Properties Properties
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::mlir::StringAttr getNumDimsPerMapAttrName()
MemberWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
MemberWriteOpAdaptor(MemberWriteOp op)
RangeT getODSOperands(unsigned index)
MemberWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
MemberWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
MemberWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
MemberWriteOpGenericAdaptor(RangeT values, LateInst op)
MemberWriteOpGenericAdaptor(RangeT values, const MemberWriteOpGenericAdaptorBase &base)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
MemberWriteOpGenericAdaptor< RangeT > GenericAdaptor
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::mlir::OpOperand & getComponentMutable()
::mlir::TypedValue<::llzk::component::StructType > getComponent()
void setMemberName(::llvm::StringRef attrValue)
FoldAdaptor::Properties Properties
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
inline ::mlir::FailureOr< SymbolLookupResult< MemberDefOp > > getMemberDefOp(::mlir::SymbolTableCollection &tables)
Gets the definition for the member referenced in this op.
::mlir::FlatSymbolRefAttr getMemberNameAttr()
::mlir::StringAttr getMemberNameAttrName(::mlir::OperationName name)
bool isRead()
Return true if the op is a read, false if it's a write.
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
::llvm::LogicalResult verifyInvariants()
void print(::mlir::OpAsmPrinter &_odsPrinter)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value component, ::mlir::FlatSymbolRefAttr member_name, ::mlir::Value val)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
static constexpr int odsIndex_val
static constexpr ::llvm::StringLiteral getOperationName()
::llvm::StringRef getMemberName()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static constexpr int odsIndex_component
void setMemberNameAttr(::mlir::FlatSymbolRefAttr attr)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
static MemberWriteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value component, ::mlir::FlatSymbolRefAttr member_name, ::mlir::Value val)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
MemberWriteOpAdaptor Adaptor
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::TypedValue<::mlir::Type > getVal()
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::OpOperand & getValMutable()
static llvm::hash_code computePropertiesHash(const Properties &prop)
::mlir::StringAttr getMemberNameAttrName()
StructDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
StructDefOpAdaptor(StructDefOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
StructDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
RangeT getODSOperands(unsigned index)
StructDefOpGenericAdaptor(RangeT values, LateInst op)
StructDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
StructDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
StructDefOpGenericAdaptor(RangeT values, const StructDefOpGenericAdaptorBase &base)
::llvm::SmallVector<::mlir::Attribute > getTemplateParamOpNames()
If this struct.def is within a poly.template, return names of all poly.param within the poly....
static llvm::hash_code computePropertiesHash(const Properties &prop)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name)
::mlir::LogicalResult hasColumns()
Returns whether the struct defines members marked as columns.
StructType getType(::std::optional<::mlir::ArrayAttr > constParams={}) const
StructType getType(::std::optional<::mlir::ArrayAttr > constParams={})
Gets the StructType representing this struct.
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::Region & getBodyRegion()
static constexpr ::llvm::StringLiteral getOperationName()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult verifyInvariants()
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::llvm::SmallVector<::mlir::Attribute > getTemplateExprOpNames()
If this struct.def is within a poly.template, return names of all poly.expr within the poly....
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::llvm::StringRef getSymName()
void setSymNameAttr(::mlir::StringAttr attr)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::Operation::result_range getODSResults(unsigned index)
StructDefOpAdaptor Adaptor
::mlir::SymbolRefAttr getFullyQualifiedName()
Return the full name for this struct from the root module, including any surrounding module scopes.
::std::vector< MemberDefOp > getMemberDefs()
Get all MemberDefOp in this structure.
FoldAdaptor::Properties Properties
::mlir::Operation::operand_range getODSOperands(unsigned index)
::llzk::function::FuncDefOp getProductFuncOp()
Gets the FuncDefOp that defines the product function in this structure, if present,...
static StructDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
MemberDefOp getMemberDef(::mlir::StringAttr memberName)
Gets the MemberDefOp that defines the member in this structure with the given name,...
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::llzk::function::FuncDefOp getConstrainFuncOp()
Gets the FuncDefOp that defines the constrain function in this structure, if present,...
::mlir::StringAttr getSymNameAttr()
::mlir::LogicalResult hasSignals()
Returns whether the struct defines members marked as signals.
void setSymName(::llvm::StringRef attrValue)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
bool hasTemplateSymbolBindings()
Return true iff the struct.def appears within a poly.template that defines constant parameters and/or...
::llvm::LogicalResult verifyRegions()
::llvm::LogicalResult verifyInvariantsImpl()
::llzk::function::FuncDefOp getComputeFuncOp()
Gets the FuncDefOp that defines the compute function in this structure, if present,...
bool hasComputeConstrain()
Returns true iff this structure defines compute and constrain functions.
::mlir::StringAttr getSymNameAttrName()
bool isMainComponent()
Return true iff this struct.def is the main struct. See llzk::MAIN_ATTR_NAME.
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
StructDefOpGenericAdaptor< RangeT > GenericAdaptor
void print(::mlir::OpAsmPrinter &_odsPrinter)
::std::string getHeaderString()
Generate header string, in the same format as the assemblyFormat.
CreateStructOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::EmptyProperties Properties
const Properties & getProperties()
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr getAttributes()
::mlir::DictionaryAttr odsAttrs
::mlir::RegionRange odsRegions
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::StringAttr getSymNameAttr()
::llvm::StringRef getSymName()
const Properties & getProperties()
::mlir::DictionaryAttr getAttributes()
::mlir::UnitAttr getColumnAttr()
::mlir::DictionaryAttr odsAttrs
::mlir::UnitAttr getSignalAttr()
MemberDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::std::optional<::mlir::OperationName > odsOpName
::mlir::TypeAttr getTypeAttr()
::mlir::DictionaryAttr odsAttrs
const Properties & getProperties()
::mlir::RegionRange odsRegions
::std::optional<::mlir::Attribute > getTableOffset()
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::Attribute getTableOffsetAttr()
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
MemberReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::llvm::StringRef getMemberName()
::mlir::FlatSymbolRefAttr getMemberNameAttr()
::mlir::DictionaryAttr getAttributes()
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
MemberWriteOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::StringRef getMemberName()
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr odsAttrs
const Properties & getProperties()
::mlir::DictionaryAttr getAttributes()
::mlir::FlatSymbolRefAttr getMemberNameAttr()
::mlir::RegionRange odsRegions
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::RegionRange getRegions()
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr odsAttrs
StructDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::Region & getBodyRegion()
::mlir::StringAttr getSymNameAttr()
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::llvm::StringRef getSymName()
::mlir::DictionaryAttr getAttributes()
const Properties & getProperties()
Common interface for operations that read or write from a struct member.
constexpr char FUNC_NAME_COMPUTE[]
Symbol name for the witness generation (and resp.
constexpr char FUNC_NAME_CONSTRAIN[]
llvm::StringLiteral getOperationName()
Get the operation name, like "constrain.eq" for the given OpClass.
void setColumn(const ::mlir::UnitAttr &propValue)
void setSymName(const ::mlir::StringAttr &propValue)
void setType(const ::mlir::TypeAttr &propValue)
::mlir::UnitAttr columnTy
::mlir::UnitAttr signalTy
::mlir::StringAttr sym_nameTy
void setSignal(const ::mlir::UnitAttr &propValue)
bool operator!=(const Properties &rhs) const
bool operator==(const Properties &rhs) const
bool operator!=(const Properties &rhs) const
auto getMemberName() const
void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue)
::mlir::FlatSymbolRefAttr member_nameTy
auto getMapOpGroupSizes() const
void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue)
mapOpGroupSizesTy mapOpGroupSizes
auto getTableOffset() const
::mlir::DenseI32ArrayAttr mapOpGroupSizesTy
::mlir::DenseI32ArrayAttr numDimsPerMapTy
void setTableOffset(const ::mlir::Attribute &propValue)
::mlir::Attribute tableOffsetTy
bool operator==(const Properties &rhs) const
numDimsPerMapTy numDimsPerMap
tableOffsetTy tableOffset
member_nameTy member_name
auto getNumDimsPerMap() const
void setMemberName(const ::mlir::FlatSymbolRefAttr &propValue)
::mlir::FlatSymbolRefAttr member_nameTy
bool operator==(const Properties &rhs) const
auto getMemberName() const
member_nameTy member_name
void setMemberName(const ::mlir::FlatSymbolRefAttr &propValue)
bool operator!=(const Properties &rhs) const
bool operator!=(const Properties &rhs) const
bool operator==(const Properties &rhs) const
::mlir::StringAttr sym_nameTy
void setSymName(const ::mlir::StringAttr &propValue)