LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Ops.h.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op Declarations *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: Ops.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10namespace llzk::component {
11
20class CreateStructOp;
21
22} // namespace llzk::component
23namespace llzk::component {
24
52class MemberDefOp;
53
54} // namespace llzk::component
55namespace llzk::component {
56
72class MemberReadOp;
73
74} // namespace llzk::component
75namespace llzk::component {
76
85class MemberWriteOp;
86
87} // namespace llzk::component
88namespace llzk::component {
89
149class StructDefOp;
150
151} // namespace llzk::component
152#ifdef GET_OP_CLASSES
153#undef GET_OP_CLASSES
154
155namespace llzk::component {
156
157
158//===----------------------------------------------------------------------===//
159// ::llzk::component::CreateStructOp declarations
160//===----------------------------------------------------------------------===//
161
162namespace detail {
163
165public:
166 using Properties = ::mlir::EmptyProperties;
167protected:
168 ::mlir::DictionaryAttr odsAttrs;
169 ::std::optional<::mlir::OperationName> odsOpName;
171 ::mlir::RegionRange odsRegions;
172public:
173 CreateStructOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
174 odsOpName.emplace("struct.new", odsAttrs.getContext());
175 }
176
178
179 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
180 return {index, 1};
181 }
182
184 return properties;
185 }
186
187 ::mlir::DictionaryAttr getAttributes() {
188 return odsAttrs;
189 }
190
191};
192
193} // namespace detail
194template <typename RangeT>
196 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
198public:
199 CreateStructOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
200
201 CreateStructOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CreateStructOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
202
203 CreateStructOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CreateStructOpGenericAdaptor(values, attrs, Properties{}, {}) {}
204
205 CreateStructOpGenericAdaptor(RangeT values, const CreateStructOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
206
207 template <typename LateInst = CreateStructOp, typename = std::enable_if_t<std::is_same_v<LateInst, CreateStructOp>>>
208 CreateStructOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
209
210 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
211 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
212 }
213
214 RangeT getODSOperands(unsigned index) {
215 auto valueRange = getODSOperandIndexAndLength(index);
216 return {std::next(odsOperands.begin(), valueRange.first),
217 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
218 }
219
220 RangeT getOperands() {
221 return odsOperands;
222 }
223
224private:
225 RangeT odsOperands;
226};
227class CreateStructOpAdaptor : public CreateStructOpGenericAdaptor<::mlir::ValueRange> {
228public:
231
232 ::llvm::LogicalResult verify(::mlir::Location loc);
233};
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> {
235public:
236 using Op::Op;
237 using Op::print;
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;
246 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
247 return {};
248 }
249
250 static constexpr ::llvm::StringLiteral getOperationName() {
251 return ::llvm::StringLiteral("struct.new");
252 }
253
254 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
255 return {index, 1};
256 }
257
258 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
259 auto valueRange = getODSOperandIndexAndLength(index);
260 return {std::next(getOperation()->operand_begin(), valueRange.first),
261 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
262 }
263
264 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
265 return {index, 1};
266 }
267
268 ::mlir::Operation::result_range getODSResults(unsigned index) {
269 auto valueRange = getODSResultIndexAndLength(index);
270 return {std::next(getOperation()->result_begin(), valueRange.first),
271 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
272 }
273
274 ::mlir::TypedValue<::llzk::component::StructType> getResult() {
275 return ::llvm::cast<::mlir::TypedValue<::llzk::component::StructType>>(*getODSResults(0).begin());
276 }
277
278 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
279 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
280 static llvm::hash_code computePropertiesHash(const Properties &prop);
281 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
282 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
283 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
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);
287 static CreateStructOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 = {});
297 ::llvm::LogicalResult verifyInvariantsImpl();
298 ::llvm::LogicalResult verifyInvariants();
299 void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn);
300 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
301 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
302 void print(::mlir::OpAsmPrinter &_odsPrinter);
303public:
304};
305
306} // namespace llzk::component
307MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::component::CreateStructOp)
308
309namespace llzk::component {
310
311
312//===----------------------------------------------------------------------===//
313// ::llzk::component::MemberDefOp declarations
314//===----------------------------------------------------------------------===//
315
316namespace detail {
317
319public:
320 struct Properties {
321 using columnTy = ::mlir::UnitAttr;
323
324 auto getColumn() const {
325 auto &propStorage = this->column;
326 return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
327 }
328 void setColumn(const ::mlir::UnitAttr &propValue) {
329 this->column = propValue;
330 }
331 using signalTy = ::mlir::UnitAttr;
333
334 auto getSignal() const {
335 auto &propStorage = this->signal;
336 return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
337 }
338 void setSignal(const ::mlir::UnitAttr &propValue) {
339 this->signal = propValue;
340 }
341 using sym_nameTy = ::mlir::StringAttr;
343
344 auto getSymName() const {
345 auto &propStorage = this->sym_name;
346 return ::llvm::cast<::mlir::StringAttr>(propStorage);
347 }
348 void setSymName(const ::mlir::StringAttr &propValue) {
349 this->sym_name = propValue;
350 }
351 using typeTy = ::mlir::TypeAttr;
353
354 auto getType() const {
355 auto &propStorage = this->type;
356 return ::llvm::cast<::mlir::TypeAttr>(propStorage);
357 }
358 void setType(const ::mlir::TypeAttr &propValue) {
359 this->type = propValue;
360 }
361 bool operator==(const Properties &rhs) const {
362 return
363 rhs.column == this->column &&
364 rhs.signal == this->signal &&
365 rhs.sym_name == this->sym_name &&
366 rhs.type == this->type &&
367 true;
368 }
369 bool operator!=(const Properties &rhs) const {
370 return !(*this == rhs);
371 }
372 };
373protected:
374 ::mlir::DictionaryAttr odsAttrs;
375 ::std::optional<::mlir::OperationName> odsOpName;
377 ::mlir::RegionRange odsRegions;
378public:
379 MemberDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
380 odsOpName.emplace("struct.member", odsAttrs.getContext());
381 }
382
384
385 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
386 return {index, 1};
387 }
388
390 return properties;
391 }
392
393 ::mlir::DictionaryAttr getAttributes() {
394 return odsAttrs;
395 }
396
397 ::mlir::StringAttr getSymNameAttr() {
398 auto attr = ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
399 return attr;
400 }
401
402 ::llvm::StringRef getSymName();
403 ::mlir::TypeAttr getTypeAttr() {
404 auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().type);
405 return attr;
406 }
407
408 ::mlir::Type getType();
409 ::mlir::UnitAttr getColumnAttr();
410 bool getColumn();
411 ::mlir::UnitAttr getSignalAttr();
412 bool getSignal();
413};
414
415} // namespace detail
416template <typename RangeT>
418 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
420public:
421 MemberDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
422
423 MemberDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MemberDefOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
424
425 MemberDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MemberDefOpGenericAdaptor(values, attrs, Properties{}, {}) {}
426
427 MemberDefOpGenericAdaptor(RangeT values, const MemberDefOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
428
429 template <typename LateInst = MemberDefOp, typename = std::enable_if_t<std::is_same_v<LateInst, MemberDefOp>>>
430 MemberDefOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
431
432 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
433 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
434 }
435
436 RangeT getODSOperands(unsigned index) {
437 auto valueRange = getODSOperandIndexAndLength(index);
438 return {std::next(odsOperands.begin(), valueRange.first),
439 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
440 }
441
442 RangeT getOperands() {
443 return odsOperands;
444 }
445
446private:
447 RangeT odsOperands;
448};
449class MemberDefOpAdaptor : public MemberDefOpGenericAdaptor<::mlir::ValueRange> {
450public:
453
454 ::llvm::LogicalResult verify(::mlir::Location loc);
455};
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> {
457public:
458 using Op::Op;
459 using Op::print;
461 template <typename RangeT>
465 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
466 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("column"), ::llvm::StringRef("signal"), ::llvm::StringRef("sym_name"), ::llvm::StringRef("type")};
467 return ::llvm::ArrayRef(attrNames);
468 }
469
470 ::mlir::StringAttr getColumnAttrName() {
471 return getAttributeNameForIndex(0);
472 }
473
474 static ::mlir::StringAttr getColumnAttrName(::mlir::OperationName name) {
475 return getAttributeNameForIndex(name, 0);
476 }
477
478 ::mlir::StringAttr getSignalAttrName() {
479 return getAttributeNameForIndex(1);
480 }
481
482 static ::mlir::StringAttr getSignalAttrName(::mlir::OperationName name) {
483 return getAttributeNameForIndex(name, 1);
484 }
485
486 ::mlir::StringAttr getSymNameAttrName() {
487 return getAttributeNameForIndex(2);
488 }
489
490 static ::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name) {
491 return getAttributeNameForIndex(name, 2);
492 }
493
494 ::mlir::StringAttr getTypeAttrName() {
495 return getAttributeNameForIndex(3);
496 }
497
498 static ::mlir::StringAttr getTypeAttrName(::mlir::OperationName name) {
499 return getAttributeNameForIndex(name, 3);
500 }
501
502 static constexpr ::llvm::StringLiteral getOperationName() {
503 return ::llvm::StringLiteral("struct.member");
504 }
505
506 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
507 return {index, 1};
508 }
509
510 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
511 auto valueRange = getODSOperandIndexAndLength(index);
512 return {std::next(getOperation()->operand_begin(), valueRange.first),
513 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
514 }
515
516 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
517 return {index, 1};
518 }
519
520 ::mlir::Operation::result_range getODSResults(unsigned index) {
521 auto valueRange = getODSResultIndexAndLength(index);
522 return {std::next(getOperation()->result_begin(), valueRange.first),
523 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
524 }
525
526 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
527 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
528 static llvm::hash_code computePropertiesHash(const Properties &prop);
529 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
530 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
531 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
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);
534 void writeProperties(::mlir::DialectBytecodeWriter &writer);
535 ::mlir::StringAttr getSymNameAttr() {
536 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
537 }
538
539 ::llvm::StringRef getSymName();
540 ::mlir::TypeAttr getTypeAttr() {
541 return ::llvm::cast<::mlir::TypeAttr>(getProperties().type);
542 }
543
544 ::mlir::Type getType();
545 ::mlir::UnitAttr getColumnAttr() {
546 return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().column);
547 }
548
549 bool getColumn();
550 ::mlir::UnitAttr getSignalAttr() {
551 return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().signal);
552 }
553
554 bool getSignal();
555 void setSymNameAttr(::mlir::StringAttr attr) {
556 getProperties().sym_name = attr;
557 }
558
559 void setSymName(::llvm::StringRef attrValue);
560 void setTypeAttr(::mlir::TypeAttr attr) {
561 getProperties().type = attr;
562 }
563
564 void setType(::mlir::Type attrValue);
565 void setColumnAttr(::mlir::UnitAttr attr) {
566 getProperties().column = attr;
567 }
568
569 void setColumn(bool attrValue);
570 void setSignalAttr(::mlir::UnitAttr attr) {
571 getProperties().signal = attr;
572 }
573
574 void setSignal(bool attrValue);
575 ::mlir::Attribute removeColumnAttr() {
576 auto attr = getProperties().column;
577 getProperties().column = {};
578 return attr;
579 }
580
581 ::mlir::Attribute removeSignalAttr() {
582 auto attr = getProperties().signal;
583 getProperties().signal = {};
584 return attr;
585 }
586
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);
599 ::llvm::LogicalResult verifyInvariantsImpl();
600 ::llvm::LogicalResult verifyInvariants();
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);
605private:
606 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
607 return getAttributeNameForIndex((*this)->getName(), index);
608 }
609
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];
616 }
617
618public:
620 inline bool hasPublicAttr() { return getOperation()->hasAttr(llzk::PublicAttr::name); }
621
623 void setPublicAttr(bool newValue = true);
624};
625
626} // namespace llzk::component
627MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::component::MemberDefOp)
629
630namespace llzk::component {
631
632
633//===----------------------------------------------------------------------===//
634// ::llzk::component::MemberReadOp declarations
635//===----------------------------------------------------------------------===//
636
637namespace detail {
638
640public:
641 struct Properties {
642 using mapOpGroupSizesTy = ::mlir::DenseI32ArrayAttr;
644
645 auto getMapOpGroupSizes() const {
646 auto &propStorage = this->mapOpGroupSizes;
647 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(propStorage);
648 }
649 void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue) {
650 this->mapOpGroupSizes = propValue;
651 }
652 using member_nameTy = ::mlir::FlatSymbolRefAttr;
654
655 auto getMemberName() const {
656 auto &propStorage = this->member_name;
657 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(propStorage);
658 }
659 void setMemberName(const ::mlir::FlatSymbolRefAttr &propValue) {
660 this->member_name = propValue;
661 }
662 using numDimsPerMapTy = ::mlir::DenseI32ArrayAttr;
664
665 auto getNumDimsPerMap() const {
666 auto &propStorage = this->numDimsPerMap;
667 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(propStorage);
668 }
669 void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue) {
670 this->numDimsPerMap = propValue;
671 }
672 using tableOffsetTy = ::mlir::Attribute;
674
675 auto getTableOffset() const {
676 auto &propStorage = this->tableOffset;
677 return ::llvm::dyn_cast_or_null<::mlir::Attribute>(propStorage);
678 }
679 void setTableOffset(const ::mlir::Attribute &propValue) {
680 this->tableOffset = propValue;
681 }
682 bool operator==(const Properties &rhs) const {
683 return
684 rhs.mapOpGroupSizes == this->mapOpGroupSizes &&
685 rhs.member_name == this->member_name &&
686 rhs.numDimsPerMap == this->numDimsPerMap &&
687 rhs.tableOffset == this->tableOffset &&
688 true;
689 }
690 bool operator!=(const Properties &rhs) const {
691 return !(*this == rhs);
692 }
693 };
694protected:
695 ::mlir::DictionaryAttr odsAttrs;
696 ::std::optional<::mlir::OperationName> odsOpName;
698 ::mlir::RegionRange odsRegions;
699public:
700 MemberReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
701 odsOpName.emplace("struct.readm", odsAttrs.getContext());
702 }
703
705
706 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
708 return properties;
709 }
710
711 ::mlir::DictionaryAttr getAttributes() {
712 return odsAttrs;
713 }
714
715 ::mlir::FlatSymbolRefAttr getMemberNameAttr() {
716 auto attr = ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().member_name);
717 return attr;
718 }
719
720 ::llvm::StringRef getMemberName();
721 ::mlir::Attribute getTableOffsetAttr() {
722 auto attr = ::llvm::dyn_cast_or_null<::mlir::Attribute>(getProperties().tableOffset);
723 return attr;
724 }
725
726 ::std::optional<::mlir::Attribute> getTableOffset();
727 ::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr();
728 ::llvm::ArrayRef<int32_t> getNumDimsPerMap();
729 ::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr() {
730 auto attr = ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
731 return attr;
732 }
733
734 ::llvm::ArrayRef<int32_t> getMapOpGroupSizes();
735};
736
737} // namespace detail
738template <typename RangeT>
740 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
742 static constexpr int odsIndex_component = 0;
743 static constexpr int odsIndex_mapOperands = 1;
744public:
745 MemberReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
746
747 MemberReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MemberReadOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
748
749 MemberReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MemberReadOpGenericAdaptor(values, attrs, Properties{}, {}) {}
750
751 MemberReadOpGenericAdaptor(RangeT values, const MemberReadOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
752
753 template <typename LateInst = MemberReadOp, typename = std::enable_if_t<std::is_same_v<LateInst, MemberReadOp>>>
754 MemberReadOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
755
756 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
757 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
758 }
759
760 RangeT getODSOperands(unsigned index) {
761 auto valueRange = getODSOperandIndexAndLength(index);
762 return {std::next(odsOperands.begin(), valueRange.first),
763 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
764 }
765
766 ValueT getComponent() {
767 return (*getODSOperands(0).begin());
768 }
769
770 ::llvm::SmallVector<RangeT> getMapOperands() {
771 auto tblgenTmpOperands = getODSOperands(1);
772 auto sizes = getMapOpGroupSizes();
773
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]);
778 }
779 return tblgenTmpOperandGroups;
780 }
781
782 RangeT getOperands() {
783 return odsOperands;
784 }
785
786private:
787 RangeT odsOperands;
788};
789class MemberReadOpAdaptor : public MemberReadOpGenericAdaptor<::mlir::ValueRange> {
790public:
793
794 ::llvm::LogicalResult verify(::mlir::Location loc);
795};
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> {
797public:
798 using Op::Op;
799 using Op::print;
801 template <typename RangeT>
804 static constexpr int odsIndex_component = 0;
805 static constexpr int odsIndex_mapOperands = 1;
807 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
808 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("mapOpGroupSizes"), ::llvm::StringRef("member_name"), ::llvm::StringRef("numDimsPerMap"), ::llvm::StringRef("tableOffset")};
809 return ::llvm::ArrayRef(attrNames);
810 }
811
812 ::mlir::StringAttr getMapOpGroupSizesAttrName() {
813 return getAttributeNameForIndex(0);
814 }
815
816 static ::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name) {
817 return getAttributeNameForIndex(name, 0);
818 }
819
820 ::mlir::StringAttr getMemberNameAttrName() {
821 return getAttributeNameForIndex(1);
822 }
823
824 static ::mlir::StringAttr getMemberNameAttrName(::mlir::OperationName name) {
825 return getAttributeNameForIndex(name, 1);
826 }
827
828 ::mlir::StringAttr getNumDimsPerMapAttrName() {
829 return getAttributeNameForIndex(2);
830 }
831
832 static ::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name) {
833 return getAttributeNameForIndex(name, 2);
834 }
835
836 ::mlir::StringAttr getTableOffsetAttrName() {
837 return getAttributeNameForIndex(3);
838 }
839
840 static ::mlir::StringAttr getTableOffsetAttrName(::mlir::OperationName name) {
841 return getAttributeNameForIndex(name, 3);
842 }
843
844 static constexpr ::llvm::StringLiteral getOperationName() {
845 return ::llvm::StringLiteral("struct.readm");
846 }
847
848 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
849 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
850 auto valueRange = getODSOperandIndexAndLength(index);
851 return {std::next(getOperation()->operand_begin(), valueRange.first),
852 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
853 }
854
855 ::mlir::TypedValue<::llzk::component::StructType> getComponent() {
856 return ::llvm::cast<::mlir::TypedValue<::llzk::component::StructType>>(*getODSOperands(0).begin());
857 }
858
859 ::mlir::OperandRangeRange getMapOperands() {
860 return getODSOperands(1).split(getMapOpGroupSizesAttr());
861 }
862
863 ::mlir::OpOperand &getComponentMutable() {
864 auto range = getODSOperandIndexAndLength(0);
865 return getOperation()->getOpOperand(range.first);
866 }
867
868 ::mlir::MutableOperandRangeRange getMapOperandsMutable();
869 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
870 return {index, 1};
871 }
872
873 ::mlir::Operation::result_range getODSResults(unsigned index) {
874 auto valueRange = getODSResultIndexAndLength(index);
875 return {std::next(getOperation()->result_begin(), valueRange.first),
876 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
877 }
878
879 ::mlir::TypedValue<::mlir::Type> getVal() {
880 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
881 }
882
883 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
884 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
885 static llvm::hash_code computePropertiesHash(const Properties &prop);
886 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
887 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
888 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
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);
891 void writeProperties(::mlir::DialectBytecodeWriter &writer);
892 ::mlir::FlatSymbolRefAttr getMemberNameAttr() {
893 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().member_name);
894 }
895
896 ::llvm::StringRef getMemberName();
897 ::mlir::Attribute getTableOffsetAttr() {
898 return ::llvm::dyn_cast_or_null<::mlir::Attribute>(getProperties().tableOffset);
899 }
900
901 ::std::optional<::mlir::Attribute> getTableOffset();
902 ::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr() {
903 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(getProperties().numDimsPerMap);
904 }
905
906 ::llvm::ArrayRef<int32_t> getNumDimsPerMap();
907 ::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr() {
908 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
909 }
910
911 ::llvm::ArrayRef<int32_t> getMapOpGroupSizes();
912 void setMemberNameAttr(::mlir::FlatSymbolRefAttr attr) {
913 getProperties().member_name = attr;
914 }
915
916 void setMemberName(::llvm::StringRef attrValue);
917 void setTableOffsetAttr(::mlir::Attribute attr) {
918 getProperties().tableOffset = attr;
919 }
920
921 void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr) {
922 getProperties().numDimsPerMap = attr;
923 }
924
925 void setNumDimsPerMap(::llvm::ArrayRef<int32_t> attrValue);
926 void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr) {
927 getProperties().mapOpGroupSizes = attr;
928 }
929
930 void setMapOpGroupSizes(::llvm::ArrayRef<int32_t> attrValue);
931 ::mlir::Attribute removeTableOffsetAttr() {
932 auto attr = getProperties().tableOffset;
933 getProperties().tableOffset = {};
934 return attr;
935 }
936
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);
952 static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
953 ::llvm::LogicalResult verifyInvariantsImpl();
954 ::llvm::LogicalResult verifyInvariants();
955 ::llvm::LogicalResult verify();
956 bool isRead();
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);
961private:
962 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
963 return getAttributeNameForIndex((*this)->getName(), index);
964 }
965
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];
972 }
973
974public:
976 inline ::mlir::FailureOr<SymbolLookupResult<MemberDefOp>> getMemberDefOp(::mlir::SymbolTableCollection &tables) {
977 return ::llvm::cast<MemberRefOpInterface>(getOperation()).getMemberDefOp(tables);
978 }
979};
980
981} // namespace llzk::component
982MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::component::MemberReadOp)
984
985namespace llzk::component {
986
987
988//===----------------------------------------------------------------------===//
989// ::llzk::component::MemberWriteOp declarations
990//===----------------------------------------------------------------------===//
991
992namespace detail {
993
995public:
996 struct Properties {
997 using member_nameTy = ::mlir::FlatSymbolRefAttr;
999
1000 auto getMemberName() const {
1001 auto &propStorage = this->member_name;
1002 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(propStorage);
1003 }
1004 void setMemberName(const ::mlir::FlatSymbolRefAttr &propValue) {
1005 this->member_name = propValue;
1006 }
1007 bool operator==(const Properties &rhs) const {
1008 return
1009 rhs.member_name == this->member_name &&
1010 true;
1011 }
1012 bool operator!=(const Properties &rhs) const {
1013 return !(*this == rhs);
1014 }
1015 };
1016protected:
1017 ::mlir::DictionaryAttr odsAttrs;
1018 ::std::optional<::mlir::OperationName> odsOpName;
1020 ::mlir::RegionRange odsRegions;
1021public:
1022 MemberWriteOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1023 odsOpName.emplace("struct.writem", odsAttrs.getContext());
1024 }
1025
1027
1028 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1029 return {index, 1};
1030 }
1031
1033 return properties;
1034 }
1035
1036 ::mlir::DictionaryAttr getAttributes() {
1037 return odsAttrs;
1038 }
1039
1040 ::mlir::FlatSymbolRefAttr getMemberNameAttr() {
1041 auto attr = ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().member_name);
1042 return attr;
1043 }
1044
1045 ::llvm::StringRef getMemberName();
1046};
1047
1048} // namespace detail
1049template <typename RangeT>
1051 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1053 static constexpr int odsIndex_component = 0;
1054 static constexpr int odsIndex_val = 1;
1055public:
1056 MemberWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1057
1058 MemberWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MemberWriteOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
1059
1060 MemberWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MemberWriteOpGenericAdaptor(values, attrs, Properties{}, {}) {}
1061
1062 MemberWriteOpGenericAdaptor(RangeT values, const MemberWriteOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1063
1064 template <typename LateInst = MemberWriteOp, typename = std::enable_if_t<std::is_same_v<LateInst, MemberWriteOp>>>
1065 MemberWriteOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1066
1067 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1068 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1069 }
1070
1071 RangeT getODSOperands(unsigned index) {
1072 auto valueRange = getODSOperandIndexAndLength(index);
1073 return {std::next(odsOperands.begin(), valueRange.first),
1074 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1075 }
1076
1077 ValueT getComponent() {
1078 return (*getODSOperands(0).begin());
1079 }
1080
1081 ValueT getVal() {
1082 return (*getODSOperands(1).begin());
1083 }
1084
1085 RangeT getOperands() {
1086 return odsOperands;
1087 }
1088
1089private:
1090 RangeT odsOperands;
1091};
1092class MemberWriteOpAdaptor : public MemberWriteOpGenericAdaptor<::mlir::ValueRange> {
1093public:
1096
1097 ::llvm::LogicalResult verify(::mlir::Location loc);
1098};
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> {
1100public:
1101 using Op::Op;
1102 using Op::print;
1104 template <typename RangeT>
1107 static constexpr int odsIndex_component = 0;
1108 static constexpr int odsIndex_val = 1;
1110 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1111 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("member_name")};
1112 return ::llvm::ArrayRef(attrNames);
1113 }
1114
1115 ::mlir::StringAttr getMemberNameAttrName() {
1116 return getAttributeNameForIndex(0);
1117 }
1118
1119 static ::mlir::StringAttr getMemberNameAttrName(::mlir::OperationName name) {
1120 return getAttributeNameForIndex(name, 0);
1121 }
1122
1123 static constexpr ::llvm::StringLiteral getOperationName() {
1124 return ::llvm::StringLiteral("struct.writem");
1125 }
1126
1127 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1128 return {index, 1};
1129 }
1130
1131 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1132 auto valueRange = getODSOperandIndexAndLength(index);
1133 return {std::next(getOperation()->operand_begin(), valueRange.first),
1134 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1135 }
1136
1137 ::mlir::TypedValue<::llzk::component::StructType> getComponent() {
1138 return ::llvm::cast<::mlir::TypedValue<::llzk::component::StructType>>(*getODSOperands(0).begin());
1139 }
1140
1141 ::mlir::TypedValue<::mlir::Type> getVal() {
1142 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
1143 }
1144
1145 ::mlir::OpOperand &getComponentMutable() {
1146 auto range = getODSOperandIndexAndLength(0);
1147 return getOperation()->getOpOperand(range.first);
1148 }
1149
1150 ::mlir::OpOperand &getValMutable() {
1151 auto range = getODSOperandIndexAndLength(1);
1152 return getOperation()->getOpOperand(range.first);
1153 }
1154
1155 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1156 return {index, 1};
1157 }
1158
1159 ::mlir::Operation::result_range getODSResults(unsigned index) {
1160 auto valueRange = getODSResultIndexAndLength(index);
1161 return {std::next(getOperation()->result_begin(), valueRange.first),
1162 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1163 }
1164
1165 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1166 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1167 static llvm::hash_code computePropertiesHash(const Properties &prop);
1168 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1169 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1170 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
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);
1173 void writeProperties(::mlir::DialectBytecodeWriter &writer);
1174 ::mlir::FlatSymbolRefAttr getMemberNameAttr() {
1175 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().member_name);
1176 }
1177
1178 ::llvm::StringRef getMemberName();
1179 void setMemberNameAttr(::mlir::FlatSymbolRefAttr attr) {
1180 getProperties().member_name = attr;
1181 }
1182
1183 void setMemberName(::llvm::StringRef attrValue);
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 = {});
1202 ::llvm::LogicalResult verifyInvariantsImpl();
1203 ::llvm::LogicalResult verifyInvariants();
1204 bool isRead();
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);
1209private:
1210 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
1211 return getAttributeNameForIndex((*this)->getName(), index);
1212 }
1213
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];
1220 }
1221
1222public:
1224 inline ::mlir::FailureOr<SymbolLookupResult<MemberDefOp>> getMemberDefOp(::mlir::SymbolTableCollection &tables) {
1225 return ::llvm::cast<MemberRefOpInterface>(getOperation()).getMemberDefOp(tables);
1226 }
1227};
1228
1229} // namespace llzk::component
1230MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::component::MemberWriteOp)
1232
1233namespace llzk::component {
1234
1235
1236//===----------------------------------------------------------------------===//
1237// ::llzk::component::StructDefOp declarations
1238//===----------------------------------------------------------------------===//
1239
1240namespace detail {
1241
1243public:
1244 struct Properties {
1245 using sym_nameTy = ::mlir::StringAttr;
1247
1248 auto getSymName() const {
1249 auto &propStorage = this->sym_name;
1250 return ::llvm::cast<::mlir::StringAttr>(propStorage);
1251 }
1252 void setSymName(const ::mlir::StringAttr &propValue) {
1253 this->sym_name = propValue;
1254 }
1255 bool operator==(const Properties &rhs) const {
1256 return
1257 rhs.sym_name == this->sym_name &&
1258 true;
1259 }
1260 bool operator!=(const Properties &rhs) const {
1261 return !(*this == rhs);
1262 }
1263 };
1264protected:
1265 ::mlir::DictionaryAttr odsAttrs;
1266 ::std::optional<::mlir::OperationName> odsOpName;
1268 ::mlir::RegionRange odsRegions;
1269public:
1270 StructDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1271 odsOpName.emplace("struct.def", odsAttrs.getContext());
1272 }
1273
1275
1276 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1277 return {index, 1};
1278 }
1279
1281 return properties;
1282 }
1283
1284 ::mlir::DictionaryAttr getAttributes() {
1285 return odsAttrs;
1286 }
1287
1288 ::mlir::StringAttr getSymNameAttr() {
1289 auto attr = ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
1290 return attr;
1291 }
1292
1293 ::llvm::StringRef getSymName();
1294 ::mlir::Region &getBodyRegion() {
1295 return *odsRegions[0];
1296 }
1297
1298 ::mlir::RegionRange getRegions() {
1299 return odsRegions;
1300 }
1301
1302};
1303
1304} // namespace detail
1305template <typename RangeT>
1307 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1309public:
1310 StructDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1311
1312 StructDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : StructDefOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
1313
1314 StructDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : StructDefOpGenericAdaptor(values, attrs, Properties{}, {}) {}
1315
1316 StructDefOpGenericAdaptor(RangeT values, const StructDefOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1317
1318 template <typename LateInst = StructDefOp, typename = std::enable_if_t<std::is_same_v<LateInst, StructDefOp>>>
1319 StructDefOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1320
1321 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1322 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1323 }
1324
1325 RangeT getODSOperands(unsigned index) {
1326 auto valueRange = getODSOperandIndexAndLength(index);
1327 return {std::next(odsOperands.begin(), valueRange.first),
1328 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1329 }
1330
1331 RangeT getOperands() {
1332 return odsOperands;
1333 }
1334
1335private:
1336 RangeT odsOperands;
1337};
1338class StructDefOpAdaptor : public StructDefOpGenericAdaptor<::mlir::ValueRange> {
1339public:
1342
1343 ::llvm::LogicalResult verify(::mlir::Location loc);
1344};
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> {
1346public:
1347 using Op::Op;
1348 using Op::print;
1350 template <typename RangeT>
1354 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1355 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("sym_name")};
1356 return ::llvm::ArrayRef(attrNames);
1357 }
1358
1359 ::mlir::StringAttr getSymNameAttrName() {
1360 return getAttributeNameForIndex(0);
1361 }
1362
1363 static ::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name) {
1364 return getAttributeNameForIndex(name, 0);
1365 }
1366
1367 static constexpr ::llvm::StringLiteral getOperationName() {
1368 return ::llvm::StringLiteral("struct.def");
1369 }
1370
1371 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1372 return {index, 1};
1373 }
1374
1375 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1376 auto valueRange = getODSOperandIndexAndLength(index);
1377 return {std::next(getOperation()->operand_begin(), valueRange.first),
1378 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1379 }
1380
1381 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1382 return {index, 1};
1383 }
1384
1385 ::mlir::Operation::result_range getODSResults(unsigned index) {
1386 auto valueRange = getODSResultIndexAndLength(index);
1387 return {std::next(getOperation()->result_begin(), valueRange.first),
1388 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1389 }
1390
1391 ::mlir::Region &getBodyRegion() {
1392 return (*this)->getRegion(0);
1393 }
1394
1395 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1396 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1397 static llvm::hash_code computePropertiesHash(const Properties &prop);
1398 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1399 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1400 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
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);
1403 void writeProperties(::mlir::DialectBytecodeWriter &writer);
1404 ::mlir::StringAttr getSymNameAttr() {
1405 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
1406 }
1407
1408 ::llvm::StringRef getSymName();
1409 void setSymNameAttr(::mlir::StringAttr attr) {
1410 getProperties().sym_name = attr;
1411 }
1412
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 = {});
1432 ::llvm::LogicalResult verifyInvariantsImpl();
1433 ::llvm::LogicalResult verifyInvariants();
1434 ::llvm::LogicalResult verifyRegions();
1435 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1436 void print(::mlir::OpAsmPrinter &_odsPrinter);
1437private:
1438 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
1439 return getAttributeNameForIndex((*this)->getName(), index);
1440 }
1441
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];
1448 }
1449
1450public:
1453 StructType getType(::std::optional<::mlir::ArrayAttr> constParams = {});
1454 inline StructType getType(::std::optional<::mlir::ArrayAttr> constParams = {}) const {
1455 return const_cast<StructDefOp*>(this)->getType(constParams);
1456 }
1457
1460 MemberDefOp getMemberDef(::mlir::StringAttr memberName);
1461
1463 ::std::vector<MemberDefOp> getMemberDefs();
1464
1466 ::mlir::LogicalResult hasColumns() {
1467 return ::mlir::success(::llvm::any_of(getMemberDefs(), [](MemberDefOp memberOp) {
1468 return memberOp.getColumn();
1469 }));
1470 }
1471
1473 ::mlir::LogicalResult hasSignals() {
1474 return ::mlir::success(::llvm::any_of(getMemberDefs(), [](MemberDefOp memberOp) {
1475 return memberOp.getSignal();
1476 }));
1477 }
1478
1481
1484
1487
1489 bool hasComputeConstrain() { return lookupSymbol(FUNC_NAME_COMPUTE) != nullptr && lookupSymbol(FUNC_NAME_CONSTRAIN) != nullptr; }
1490
1492 ::std::string getHeaderString();
1493
1497
1502 ::llvm::SmallVector<::mlir::Attribute> getTemplateParamOpNames();
1503
1508 ::llvm::SmallVector<::mlir::Attribute> getTemplateExprOpNames();
1509
1512 ::mlir::SymbolRefAttr getFullyQualifiedName();
1513
1515 bool isMainComponent();
1516};
1517
1518} // namespace llzk::component
1519MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::component::StructDefOp)
1521
1522
1523#endif // GET_OP_CLASSES
1524
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:168
CreateStructOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:199
CreateStructOpAdaptor(CreateStructOp op)
Definition Ops.cpp.inc:166
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:210
CreateStructOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:201
CreateStructOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:203
CreateStructOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:208
CreateStructOpGenericAdaptor(RangeT values, const CreateStructOpGenericAdaptorBase &base)
Definition Ops.h.inc:205
CreateStructOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:199
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:264
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result)
Definition Ops.cpp.inc:209
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:258
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:254
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:172
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:268
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:283
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:814
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:195
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:296
void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn)
Definition Ops.cpp:810
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:199
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:205
FoldAdaptor::Properties Properties
Definition Ops.h.inc:242
CreateStructOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:240
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:202
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:250
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:241
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:181
::mlir::TypedValue<::llzk::component::StructType > getResult()
Definition Ops.h.inc:274
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:246
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:300
static CreateStructOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result)
Definition Ops.cpp.inc:213
CreateStructOpAdaptor Adaptor
Definition Ops.h.inc:238
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:325
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:190
MemberDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:421
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:396
MemberDefOpGenericAdaptor(RangeT values, const MemberDefOpGenericAdaptorBase &base)
Definition Ops.h.inc:427
MemberDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:421
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:432
MemberDefOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:430
MemberDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:423
MemberDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:425
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:436
void setSymNameAttr(::mlir::StringAttr attr)
Definition Ops.h.inc:555
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:463
bool hasPublicAttr()
Returns whether this member is a public output.
Definition Ops.h.inc:620
MemberDefOpAdaptor Adaptor
Definition Ops.h.inc:460
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:490
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:510
::mlir::StringAttr getColumnAttrName(::mlir::OperationName name)
Definition Ops.h.inc:474
::llvm::StringRef getSymName()
Definition Ops.cpp.inc:629
void setSignal(bool attrValue)
Definition Ops.cpp.inc:669
::mlir::StringAttr getTypeAttrName()
Definition Ops.h.inc:494
::mlir::StringAttr getColumnAttrName()
Definition Ops.h.inc:470
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:751
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:529
MemberDefOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:462
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)
Definition Ops.h.inc:516
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:418
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:566
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:576
void setPublicAttr(bool newValue=true)
Adds or removes the unit llzk.pub attribute according to newValue.
Definition Ops.cpp:566
::mlir::StringAttr getTypeAttrName(::mlir::OperationName name)
Definition Ops.h.inc:498
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)
Definition Ops.cpp.inc:757
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:729
void setColumnAttr(::mlir::UnitAttr attr)
Definition Ops.h.inc:565
::mlir::UnitAttr getSignalAttr()
Definition Ops.h.inc:550
void setTypeAttr(::mlir::TypeAttr attr)
Definition Ops.h.inc:560
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:783
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:483
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:502
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)
Definition Ops.cpp.inc:603
void setColumn(bool attrValue)
Definition Ops.cpp.inc:661
::mlir::Attribute removeSignalAttr()
Definition Ops.h.inc:581
::mlir::TypeAttr getTypeAttr()
Definition Ops.h.inc:540
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:544
::mlir::Attribute removeColumnAttr()
Definition Ops.h.inc:575
::mlir::StringAttr getSignalAttrName()
Definition Ops.h.inc:478
::mlir::StringAttr getSignalAttrName(::mlir::OperationName name)
Definition Ops.h.inc:482
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:506
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:520
::mlir::StringAttr getSymNameAttr()
Definition Ops.h.inc:535
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:597
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:619
void setType(::mlir::Type attrValue)
Definition Ops.cpp.inc:657
static MemberDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name, ::mlir::TypeAttr type, bool isSignal=false, bool isColumn=false)
Definition Ops.cpp.inc:677
::llvm::LogicalResult verify()
Definition Ops.cpp:615
FoldAdaptor::Properties Properties
Definition Ops.h.inc:464
void setSignalAttr(::mlir::UnitAttr attr)
Definition Ops.h.inc:570
void setSymName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:653
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:520
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:465
::mlir::UnitAttr getColumnAttr()
Definition Ops.h.inc:545
::mlir::StringAttr getSymNameAttrName()
Definition Ops.h.inc:486
MemberReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:745
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:870
MemberReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:747
MemberReadOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:754
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:756
::llvm::SmallVector< RangeT > getMapOperands()
Definition Ops.h.inc:770
MemberReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:745
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:760
MemberReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:749
MemberReadOpGenericAdaptor(RangeT values, const MemberReadOpGenericAdaptorBase &base)
Definition Ops.h.inc:751
::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name)
Definition Ops.h.inc:832
::mlir::MutableOperandRangeRange getMapOperandsMutable()
Definition Ops.cpp.inc:910
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::mlir::ArrayRef<::mlir::NamedAttribute > attrs)
::mlir::Attribute removeTableOffsetAttr()
Definition Ops.h.inc:931
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1027
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1064
::mlir::TypedValue<::llzk::component::StructType > getComponent()
Definition Ops.h.inc:855
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1018
MemberReadOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:802
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1042
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:1155
::mlir::TypedValue<::mlir::Type > getVal()
Definition Ops.h.inc:879
static MemberReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type resultType, ::mlir::Value component, ::mlir::StringAttr member)
Definition Ops.cpp.inc:1159
::std::optional<::mlir::Attribute > getTableOffset()
Definition Ops.cpp.inc:1132
::mlir::OpOperand & getComponentMutable()
Definition Ops.h.inc:863
::mlir::OperandRangeRange getMapOperands()
Definition Ops.h.inc:859
bool isRead()
Return true if the op is a read, false if it's a write.
Definition Ops.cpp.inc:1416
static constexpr int odsIndex_mapOperands
Definition Ops.h.inc:805
void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr)
Definition Ops.h.inc:921
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:981
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType, ::mlir::Value component, ::mlir::StringAttr member)
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1235
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
Definition Ops.cpp.inc:1229
::mlir::FlatSymbolRefAttr getMemberNameAttr()
Definition Ops.h.inc:892
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
Definition Ops.cpp.inc:1142
::mlir::StringAttr getMemberNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:824
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:869
::mlir::StringAttr getMapOpGroupSizesAttrName()
Definition Ops.h.inc:812
void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr)
Definition Ops.h.inc:926
inline ::mlir::FailureOr< SymbolLookupResult< MemberDefOp > > getMemberDefOp(::mlir::SymbolTableCollection &tables)
Gets the definition for the member referenced in this op.
Definition Ops.h.inc:976
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:1151
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1074
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:892
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:803
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:873
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()
Definition Ops.cpp.inc:1283
void setTableOffsetAttr(::mlir::Attribute attr)
Definition Ops.h.inc:917
MemberReadOpAdaptor Adaptor
Definition Ops.h.inc:800
void setMemberNameAttr(::mlir::FlatSymbolRefAttr attr)
Definition Ops.h.inc:912
static constexpr int odsIndex_component
Definition Ops.h.inc:804
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:693
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
Definition Ops.cpp.inc:1137
::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name)
Definition Ops.h.inc:816
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1411
::llvm::StringRef getMemberName()
Definition Ops.cpp.inc:1127
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:844
::mlir::StringAttr getTableOffsetAttrName()
Definition Ops.h.inc:836
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1289
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:1117
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:1101
::llvm::LogicalResult verify()
Definition Ops.cpp:795
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:849
::mlir::Attribute getTableOffsetAttr()
Definition Ops.h.inc:897
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:807
void setMemberName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:1147
::mlir::StringAttr getMemberNameAttrName()
Definition Ops.h.inc:820
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
Definition Ops.h.inc:907
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1369
::mlir::StringAttr getTableOffsetAttrName(::mlir::OperationName name)
Definition Ops.h.inc:840
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:916
FoldAdaptor::Properties Properties
Definition Ops.h.inc:806
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
Definition Ops.h.inc:902
::mlir::StringAttr getNumDimsPerMapAttrName()
Definition Ops.h.inc:828
MemberWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1056
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1444
MemberWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1056
MemberWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1058
MemberWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:1060
MemberWriteOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1065
MemberWriteOpGenericAdaptor(RangeT values, const MemberWriteOpGenericAdaptorBase &base)
Definition Ops.h.inc:1062
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1067
MemberWriteOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1105
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1797
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1106
::mlir::OpOperand & getComponentMutable()
Definition Ops.h.inc:1145
::mlir::TypedValue<::llzk::component::StructType > getComponent()
Definition Ops.h.inc:1137
void setMemberName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:1541
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1109
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1511
inline ::mlir::FailureOr< SymbolLookupResult< MemberDefOp > > getMemberDefOp(::mlir::SymbolTableCollection &tables)
Gets the definition for the member referenced in this op.
Definition Ops.h.inc:1224
::mlir::FlatSymbolRefAttr getMemberNameAttr()
Definition Ops.h.inc:1174
::mlir::StringAttr getMemberNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:1119
bool isRead()
Return true if the op is a read, false if it's a write.
Definition Ops.cpp.inc:1802
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:739
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1696
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1765
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1504
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1110
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:1524
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value component, ::mlir::FlatSymbolRefAttr member_name, ::mlir::Value val)
Definition Ops.cpp.inc:1545
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:1531
static constexpr int odsIndex_val
Definition Ops.h.inc:1108
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1123
::llvm::StringRef getMemberName()
Definition Ops.cpp.inc:1536
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1476
static constexpr int odsIndex_component
Definition Ops.h.inc:1107
void setMemberNameAttr(::mlir::FlatSymbolRefAttr attr)
Definition Ops.h.inc:1179
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1131
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1672
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1498
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1127
static MemberWriteOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value component, ::mlir::FlatSymbolRefAttr member_name, ::mlir::Value val)
Definition Ops.cpp.inc:1551
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1453
MemberWriteOpAdaptor Adaptor
Definition Ops.h.inc:1103
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1155
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1159
::mlir::TypedValue<::mlir::Type > getVal()
Definition Ops.h.inc:1141
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1515
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1700
::mlir::OpOperand & getValMutable()
Definition Ops.h.inc:1150
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1492
::mlir::StringAttr getMemberNameAttrName()
Definition Ops.h.inc:1115
StructDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1310
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1830
StructDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:1314
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1321
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:1325
StructDefOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1319
StructDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1312
StructDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1310
StructDefOpGenericAdaptor(RangeT values, const StructDefOpGenericAdaptorBase &base)
Definition Ops.h.inc:1316
::llvm::SmallVector<::mlir::Attribute > getTemplateParamOpNames()
If this struct.def is within a poly.template, return names of all poly.param within the poly....
Definition Ops.cpp:202
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1878
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1884
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name)
Definition Ops.cpp.inc:1919
::mlir::LogicalResult hasColumns()
Returns whether the struct defines members marked as columns.
Definition Ops.h.inc:1466
StructType getType(::std::optional<::mlir::ArrayAttr > constParams={}) const
Definition Ops.h.inc:1454
StructType getType(::std::optional<::mlir::ArrayAttr > constParams={})
Gets the StructType representing this struct.
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:1363
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1890
::mlir::Region & getBodyRegion()
Definition Ops.h.inc:1391
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1367
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1897
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2062
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp:490
::llvm::SmallVector<::mlir::Attribute > getTemplateExprOpNames()
If this struct.def is within a poly.template, return names of all poly.expr within the poly....
Definition Ops.cpp:210
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1862
::llvm::StringRef getSymName()
Definition Ops.cpp.inc:1910
void setSymNameAttr(::mlir::StringAttr attr)
Definition Ops.h.inc:1409
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1371
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1385
StructDefOpAdaptor Adaptor
Definition Ops.h.inc:1349
::mlir::SymbolRefAttr getFullyQualifiedName()
Return the full name for this struct from the root module, including any surrounding module scopes.
Definition Ops.cpp:218
::std::vector< MemberDefOp > getMemberDefs()
Get all MemberDefOp in this structure.
Definition Ops.cpp:456
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1353
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1375
::llzk::function::FuncDefOp getProductFuncOp()
Gets the FuncDefOp that defines the product function in this structure, if present,...
Definition Ops.cpp:474
static StructDefOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name)
Definition Ops.cpp.inc:1924
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1901
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2066
MemberDefOp getMemberDef(::mlir::StringAttr memberName)
Gets the MemberDefOp that defines the member in this structure with the given name,...
Definition Ops.cpp:445
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp:515
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1839
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1381
::llzk::function::FuncDefOp getConstrainFuncOp()
Gets the FuncDefOp that defines the constrain function in this structure, if present,...
Definition Ops.cpp:470
::mlir::StringAttr getSymNameAttr()
Definition Ops.h.inc:1404
::mlir::LogicalResult hasSignals()
Returns whether the struct defines members marked as signals.
Definition Ops.h.inc:1473
void setSymName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:1915
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1352
bool hasTemplateSymbolBindings()
Return true iff the struct.def appears within a poly.template that defines constant parameters and/or...
Definition Ops.cpp:195
::llvm::LogicalResult verifyRegions()
Definition Ops.cpp:320
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2046
::llzk::function::FuncDefOp getComputeFuncOp()
Gets the FuncDefOp that defines the compute function in this structure, if present,...
Definition Ops.cpp:466
bool hasComputeConstrain()
Returns true iff this structure defines compute and constrain functions.
Definition Ops.h.inc:1489
::mlir::StringAttr getSymNameAttrName()
Definition Ops.h.inc:1359
bool isMainComponent()
Return true iff this struct.def is the main struct. See llzk::MAIN_ATTR_NAME.
Definition Ops.cpp:478
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1354
StructDefOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1351
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2091
::std::string getHeaderString()
Generate header string, in the same format as the assemblyFormat.
Definition Ops.cpp:181
CreateStructOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:173
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:169
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:179
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:385
MemberDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:379
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:375
::std::optional<::mlir::Attribute > getTableOffset()
Definition Ops.cpp.inc:846
MemberReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:700
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:696
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:823
MemberWriteOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1022
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1018
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:1028
StructDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1270
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1266
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:1276
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.
Definition Constants.h:16
constexpr char FUNC_NAME_CONSTRAIN[]
Definition Constants.h:17
llvm::StringLiteral getOperationName()
Get the operation name, like "constrain.eq" for the given OpClass.
Definition OpHelpers.h:34
void setColumn(const ::mlir::UnitAttr &propValue)
Definition Ops.h.inc:328
void setSymName(const ::mlir::StringAttr &propValue)
Definition Ops.h.inc:348
void setSignal(const ::mlir::UnitAttr &propValue)
Definition Ops.h.inc:338
void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue)
Definition Ops.h.inc:669
void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue)
Definition Ops.h.inc:649
void setTableOffset(const ::mlir::Attribute &propValue)
Definition Ops.h.inc:679
void setMemberName(const ::mlir::FlatSymbolRefAttr &propValue)
Definition Ops.h.inc:659
void setMemberName(const ::mlir::FlatSymbolRefAttr &propValue)
Definition Ops.h.inc:1004
void setSymName(const ::mlir::StringAttr &propValue)
Definition Ops.h.inc:1252