LLZK 0.1.0
Veridise's ZK Language IR
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
10#if defined(GET_OP_CLASSES) || defined(GET_OP_FWD_DEFINES)
11#undef GET_OP_FWD_DEFINES
12namespace llzk {
13namespace component {
14class CreateStructOp;
15} // namespace component
16} // namespace llzk
17namespace llzk {
18namespace component {
19class FieldDefOp;
20} // namespace component
21} // namespace llzk
22namespace llzk {
23namespace component {
24class FieldReadOp;
25} // namespace component
26} // namespace llzk
27namespace llzk {
28namespace component {
29class FieldWriteOp;
30} // namespace component
31} // namespace llzk
32namespace llzk {
33namespace component {
34class StructDefOp;
35} // namespace component
36} // namespace llzk
37#endif
38
39#ifdef GET_OP_CLASSES
40#undef GET_OP_CLASSES
41
42
43//===----------------------------------------------------------------------===//
44// Local Utility Method Definitions
45//===----------------------------------------------------------------------===//
46
47namespace llzk {
48namespace component {
49
50//===----------------------------------------------------------------------===//
51// ::llzk::component::CreateStructOp declarations
52//===----------------------------------------------------------------------===//
53
54namespace detail {
56public:
57protected:
58 ::mlir::DictionaryAttr odsAttrs;
59 ::std::optional<::mlir::OperationName> odsOpName;
60 ::mlir::RegionRange odsRegions;
61public:
62 CreateStructOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = nullptr, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {});
63
65
66 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
67 ::mlir::DictionaryAttr getAttributes();
68};
69} // namespace detail
70template <typename RangeT>
72 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
74public:
75 CreateStructOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
76
77 CreateStructOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : CreateStructOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
78
79 template <typename LateInst = CreateStructOp, typename = std::enable_if_t<std::is_same_v<LateInst, CreateStructOp>>>
80 CreateStructOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
81
82 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
83 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
84 }
85
86 RangeT getODSOperands(unsigned index) {
87 auto valueRange = getODSOperandIndexAndLength(index);
88 return {std::next(odsOperands.begin(), valueRange.first),
89 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
90 }
91
92 RangeT getOperands() {
93 return odsOperands;
94 }
95
96private:
97 RangeT odsOperands;
98};
99class CreateStructOpAdaptor : public CreateStructOpGenericAdaptor<::mlir::ValueRange> {
100public:
103
104 ::mlir::LogicalResult verify(::mlir::Location loc);
105};
106class 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> {
107public:
108 using Op::Op;
109 using Op::print;
111 template <typename RangeT>
114 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
115 return {};
116 }
117
118 static constexpr ::llvm::StringLiteral getOperationName() {
119 return ::llvm::StringLiteral("struct.new");
120 }
121
122 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
123 ::mlir::Operation::operand_range getODSOperands(unsigned index);
124 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index);
125 ::mlir::Operation::result_range getODSResults(unsigned index);
126 ::mlir::TypedValue<::llzk::component::StructType> getResult();
127 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result);
128 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes);
129 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
130 ::mlir::LogicalResult verifyInvariantsImpl();
131 ::mlir::LogicalResult verifyInvariants();
132 void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn);
133 ::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
134 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
135 void print(::mlir::OpAsmPrinter &_odsPrinter);
136public:
137};
138} // namespace component
139} // namespace llzk
140MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::component::CreateStructOp)
141
142namespace llzk {
143namespace component {
144
145//===----------------------------------------------------------------------===//
146// ::llzk::component::FieldDefOp declarations
147//===----------------------------------------------------------------------===//
148
149namespace detail {
151public:
152 struct Properties {
153 using columnTy = ::mlir::UnitAttr;
155
156 auto getColumn() {
157 auto &propStorage = this->column;
158 return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
159 }
160 void setColumn(const ::mlir::UnitAttr &propValue) {
161 this->column = propValue;
162 }
163 using sym_nameTy = ::mlir::StringAttr;
165
166 auto getSymName() {
167 auto &propStorage = this->sym_name;
168 return ::llvm::cast<::mlir::StringAttr>(propStorage);
169 }
170 void setSymName(const ::mlir::StringAttr &propValue) {
171 this->sym_name = propValue;
172 }
173 using typeTy = ::mlir::TypeAttr;
175
176 auto getType() {
177 auto &propStorage = this->type;
178 return ::llvm::cast<::mlir::TypeAttr>(propStorage);
179 }
180 void setType(const ::mlir::TypeAttr &propValue) {
181 this->type = propValue;
182 }
183 bool operator==(const Properties &rhs) const {
184 return
185 rhs.column == this->column &&
186 rhs.sym_name == this->sym_name &&
187 rhs.type == this->type &&
188 true;
189 }
190 bool operator!=(const Properties &rhs) const {
191 return !(*this == rhs);
192 }
193 };
194protected:
195 ::mlir::DictionaryAttr odsAttrs;
196 ::std::optional<::mlir::OperationName> odsOpName;
198 ::mlir::RegionRange odsRegions;
199public:
200 FieldDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = nullptr, const Properties &properties = {}, ::mlir::RegionRange regions = {});
201
203
204 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
206 return properties;
207 }
208
209 ::mlir::DictionaryAttr getAttributes();
210 ::mlir::StringAttr getSymNameAttr();
211 ::llvm::StringRef getSymName();
212 ::mlir::TypeAttr getTypeAttr();
213 ::mlir::Type getType();
214 ::mlir::UnitAttr getColumnAttr();
215 bool getColumn();
216};
217} // namespace detail
218template <typename RangeT>
220 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
222public:
223 FieldDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr, const Properties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
224
225 FieldDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : FieldDefOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
226
227 template <typename LateInst = FieldDefOp, typename = std::enable_if_t<std::is_same_v<LateInst, FieldDefOp>>>
228 FieldDefOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
229
230 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
231 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
232 }
233
234 RangeT getODSOperands(unsigned index) {
235 auto valueRange = getODSOperandIndexAndLength(index);
236 return {std::next(odsOperands.begin(), valueRange.first),
237 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
238 }
239
240 RangeT getOperands() {
241 return odsOperands;
242 }
243
244private:
245 RangeT odsOperands;
246};
247class FieldDefOpAdaptor : public FieldDefOpGenericAdaptor<::mlir::ValueRange> {
248public:
251
252 ::mlir::LogicalResult verify(::mlir::Location loc);
253};
254class FieldDefOp : public ::mlir::Op<FieldDefOp, ::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> {
255public:
256 using Op::Op;
257 using Op::print;
259 template <typename RangeT>
263 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
264 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("column"), ::llvm::StringRef("sym_name"), ::llvm::StringRef("type")};
265 return ::llvm::ArrayRef(attrNames);
266 }
267
268 ::mlir::StringAttr getColumnAttrName() {
269 return getAttributeNameForIndex(0);
270 }
271
272 static ::mlir::StringAttr getColumnAttrName(::mlir::OperationName name) {
273 return getAttributeNameForIndex(name, 0);
274 }
275
276 ::mlir::StringAttr getSymNameAttrName() {
277 return getAttributeNameForIndex(1);
278 }
279
280 static ::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name) {
281 return getAttributeNameForIndex(name, 1);
282 }
283
284 ::mlir::StringAttr getTypeAttrName() {
285 return getAttributeNameForIndex(2);
286 }
287
288 static ::mlir::StringAttr getTypeAttrName(::mlir::OperationName name) {
289 return getAttributeNameForIndex(name, 2);
290 }
291
292 static constexpr ::llvm::StringLiteral getOperationName() {
293 return ::llvm::StringLiteral("struct.field");
294 }
295
296 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
297 ::mlir::Operation::operand_range getODSOperands(unsigned index);
298 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index);
299 ::mlir::Operation::result_range getODSResults(unsigned index);
300 static ::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
301 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
302 static llvm::hash_code computePropertiesHash(const Properties &prop);
303 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
304 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
305 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
306 static ::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
307 static ::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
308 void writeProperties(::mlir::DialectBytecodeWriter &writer);
309 ::mlir::StringAttr getSymNameAttr();
310 ::llvm::StringRef getSymName();
311 ::mlir::TypeAttr getTypeAttr();
312 ::mlir::Type getType();
313 ::mlir::UnitAttr getColumnAttr();
314 bool getColumn();
315 void setSymNameAttr(::mlir::StringAttr attr);
316 void setSymName(::llvm::StringRef attrValue);
317 void setTypeAttr(::mlir::TypeAttr attr);
318 void setType(::mlir::Type attrValue);
319 void setColumnAttr(::mlir::UnitAttr attr);
320 void setColumn(bool attrValue);
321 ::mlir::Attribute removeColumnAttr();
322 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::TypeAttr type, bool isColumn = false);
323 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::Type type, bool isColumn = false);
324 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes, bool isColumn = false);
325 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes, bool isColumn = false);
326 ::mlir::LogicalResult verifyInvariantsImpl();
327 ::mlir::LogicalResult verifyInvariants();
328 ::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
329 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
330 void print(::mlir::OpAsmPrinter &_odsPrinter);
331private:
332 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
333 return getAttributeNameForIndex((*this)->getName(), index);
334 }
335
336 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
337 assert(index < 3 && "invalid attribute index");
338 assert(name.getStringRef() == getOperationName() && "invalid operation name");
339 assert(name.isRegistered() && "Operation isn't registered, missing a "
340 "dependent dialect loading?");
341 return name.getAttributeNames()[index];
342 }
343
344public:
345 inline bool hasPublicAttr() { return getOperation()->hasAttr(llzk::PublicAttr::name); }
346 void setPublicAttr(bool newValue = true);
347};
348} // namespace component
349} // namespace llzk
350MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::component::FieldDefOp)
351
352namespace llzk {
353namespace component {
354
355//===----------------------------------------------------------------------===//
356// ::llzk::component::FieldReadOp declarations
357//===----------------------------------------------------------------------===//
358
359namespace detail {
361public:
362 struct Properties {
363 using field_nameTy = ::mlir::FlatSymbolRefAttr;
365
367 auto &propStorage = this->field_name;
368 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(propStorage);
369 }
370 void setFieldName(const ::mlir::FlatSymbolRefAttr &propValue) {
371 this->field_name = propValue;
372 }
373 using mapOpGroupSizesTy = ::mlir::DenseI32ArrayAttr;
375
377 auto &propStorage = this->mapOpGroupSizes;
378 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(propStorage);
379 }
380 void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue) {
381 this->mapOpGroupSizes = propValue;
382 }
383 using numDimsPerMapTy = ::mlir::DenseI32ArrayAttr;
385
387 auto &propStorage = this->numDimsPerMap;
388 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(propStorage);
389 }
390 void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue) {
391 this->numDimsPerMap = propValue;
392 }
393 using tableOffsetTy = ::mlir::Attribute;
395
397 auto &propStorage = this->tableOffset;
398 return ::llvm::dyn_cast_or_null<::mlir::Attribute>(propStorage);
399 }
400 void setTableOffset(const ::mlir::Attribute &propValue) {
401 this->tableOffset = propValue;
402 }
403 bool operator==(const Properties &rhs) const {
404 return
405 rhs.field_name == this->field_name &&
406 rhs.mapOpGroupSizes == this->mapOpGroupSizes &&
407 rhs.numDimsPerMap == this->numDimsPerMap &&
408 rhs.tableOffset == this->tableOffset &&
409 true;
410 }
411 bool operator!=(const Properties &rhs) const {
412 return !(*this == rhs);
413 }
414 };
415protected:
416 ::mlir::DictionaryAttr odsAttrs;
417 ::std::optional<::mlir::OperationName> odsOpName;
419 ::mlir::RegionRange odsRegions;
420public:
421 FieldReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = nullptr, const Properties &properties = {}, ::mlir::RegionRange regions = {});
422
424
425 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
427 return properties;
428 }
429
430 ::mlir::DictionaryAttr getAttributes();
431 ::mlir::FlatSymbolRefAttr getFieldNameAttr();
432 ::llvm::StringRef getFieldName();
433 ::mlir::Attribute getTableOffsetAttr();
434 ::std::optional<::mlir::Attribute> getTableOffset();
435 ::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr();
436 ::llvm::ArrayRef<int32_t> getNumDimsPerMap();
437 ::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr();
438 ::llvm::ArrayRef<int32_t> getMapOpGroupSizes();
439};
440} // namespace detail
441template <typename RangeT>
443 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
445public:
446 FieldReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr, const Properties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
447
448 FieldReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : FieldReadOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
449
450 template <typename LateInst = FieldReadOp, typename = std::enable_if_t<std::is_same_v<LateInst, FieldReadOp>>>
451 FieldReadOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
452
453 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
454 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
455 }
456
457 RangeT getODSOperands(unsigned index) {
458 auto valueRange = getODSOperandIndexAndLength(index);
459 return {std::next(odsOperands.begin(), valueRange.first),
460 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
461 }
462
463 ValueT getComponent() {
464 return (*getODSOperands(0).begin());
465 }
466
467 ::llvm::SmallVector<RangeT> getMapOperands() {
468 auto tblgenTmpOperands = getODSOperands(1);
469 auto sizes = getMapOpGroupSizes();
470
471 ::llvm::SmallVector<RangeT> tblgenTmpOperandGroups;
472 for (int i = 0, e = sizes.size(); i < e; ++i) {
473 tblgenTmpOperandGroups.push_back(tblgenTmpOperands.take_front(sizes[i]));
474 tblgenTmpOperands = tblgenTmpOperands.drop_front(sizes[i]);
475 }
476 return tblgenTmpOperandGroups;
477 }
478
479 RangeT getOperands() {
480 return odsOperands;
481 }
482
483private:
484 RangeT odsOperands;
485};
486class FieldReadOpAdaptor : public FieldReadOpGenericAdaptor<::mlir::ValueRange> {
487public:
490
491 ::mlir::LogicalResult verify(::mlir::Location loc);
492};
493class FieldReadOp : public ::mlir::Op<FieldReadOp, ::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, ::llzk::component::FieldRefOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait> {
494public:
495 using Op::Op;
496 using Op::print;
498 template <typename RangeT>
502 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
503 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("field_name"), ::llvm::StringRef("mapOpGroupSizes"), ::llvm::StringRef("numDimsPerMap"), ::llvm::StringRef("tableOffset")};
504 return ::llvm::ArrayRef(attrNames);
505 }
506
507 ::mlir::StringAttr getFieldNameAttrName() {
508 return getAttributeNameForIndex(0);
509 }
510
511 static ::mlir::StringAttr getFieldNameAttrName(::mlir::OperationName name) {
512 return getAttributeNameForIndex(name, 0);
513 }
514
515 ::mlir::StringAttr getMapOpGroupSizesAttrName() {
516 return getAttributeNameForIndex(1);
517 }
518
519 static ::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name) {
520 return getAttributeNameForIndex(name, 1);
521 }
522
523 ::mlir::StringAttr getNumDimsPerMapAttrName() {
524 return getAttributeNameForIndex(2);
525 }
526
527 static ::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name) {
528 return getAttributeNameForIndex(name, 2);
529 }
530
531 ::mlir::StringAttr getTableOffsetAttrName() {
532 return getAttributeNameForIndex(3);
533 }
534
535 static ::mlir::StringAttr getTableOffsetAttrName(::mlir::OperationName name) {
536 return getAttributeNameForIndex(name, 3);
537 }
538
539 static constexpr ::llvm::StringLiteral getOperationName() {
540 return ::llvm::StringLiteral("struct.readf");
541 }
542
543 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
544 ::mlir::Operation::operand_range getODSOperands(unsigned index);
545 ::mlir::TypedValue<::llzk::component::StructType> getComponent();
546 ::mlir::OperandRangeRange getMapOperands();
547 ::mlir::OpOperand &getComponentMutable();
548 ::mlir::MutableOperandRangeRange getMapOperandsMutable();
549 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index);
550 ::mlir::Operation::result_range getODSResults(unsigned index);
551 ::mlir::Value getVal();
552 static ::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
553 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
554 static llvm::hash_code computePropertiesHash(const Properties &prop);
555 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
556 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
557 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
558 static ::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
559 static ::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
560 void writeProperties(::mlir::DialectBytecodeWriter &writer);
561 ::mlir::FlatSymbolRefAttr getFieldNameAttr();
562 ::llvm::StringRef getFieldName();
563 ::mlir::Attribute getTableOffsetAttr();
564 ::std::optional<::mlir::Attribute> getTableOffset();
565 ::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr();
566 ::llvm::ArrayRef<int32_t> getNumDimsPerMap();
567 ::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr();
568 ::llvm::ArrayRef<int32_t> getMapOpGroupSizes();
569 void setFieldNameAttr(::mlir::FlatSymbolRefAttr attr);
570 void setFieldName(::llvm::StringRef attrValue);
571 void setTableOffsetAttr(::mlir::Attribute attr);
572 void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr);
573 void setNumDimsPerMap(::llvm::ArrayRef<int32_t> attrValue);
574 void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr);
575 void setMapOpGroupSizes(::llvm::ArrayRef<int32_t> attrValue);
576 ::mlir::Attribute removeTableOffsetAttr();
577 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType, ::mlir::Value component, ::mlir::StringAttr field);
578 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType, ::mlir::Value component, ::mlir::StringAttr field, ::mlir::Attribute dist, ::mlir::ValueRange mapOperands, std::optional<int32_t> numDims);
579 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType, ::mlir::Value component, ::mlir::StringAttr field, ::mlir::SymbolRefAttr dist);
580 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType, ::mlir::Value component, ::mlir::StringAttr field, ::mlir::IntegerAttr dist);
581 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::mlir::ArrayRef<::mlir::NamedAttribute> attrs);
582 static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
583 ::mlir::LogicalResult verifyInvariantsImpl();
584 ::mlir::LogicalResult verifyInvariants();
585 ::mlir::LogicalResult verify();
586 bool isRead();
587 ::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
588 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
589 void print(::mlir::OpAsmPrinter &_odsPrinter);
590private:
591 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
592 return getAttributeNameForIndex((*this)->getName(), index);
593 }
594
595 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
596 assert(index < 4 && "invalid attribute index");
597 assert(name.getStringRef() == getOperationName() && "invalid operation name");
598 assert(name.isRegistered() && "Operation isn't registered, missing a "
599 "dependent dialect loading?");
600 return name.getAttributeNames()[index];
601 }
602
603public:
605 inline ::mlir::FailureOr<SymbolLookupResult<FieldDefOp>> getFieldDefOp(::mlir::SymbolTableCollection &tables) {
606 return ::llvm::cast<FieldRefOpInterface>(getOperation()).getFieldDefOp(tables);
607 }
608};
609} // namespace component
610} // namespace llzk
611MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::component::FieldReadOp)
612
613namespace llzk {
614namespace component {
615
616//===----------------------------------------------------------------------===//
617// ::llzk::component::FieldWriteOp declarations
618//===----------------------------------------------------------------------===//
619
620namespace detail {
622public:
623 struct Properties {
624 using field_nameTy = ::mlir::FlatSymbolRefAttr;
626
628 auto &propStorage = this->field_name;
629 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(propStorage);
630 }
631 void setFieldName(const ::mlir::FlatSymbolRefAttr &propValue) {
632 this->field_name = propValue;
633 }
634 bool operator==(const Properties &rhs) const {
635 return
636 rhs.field_name == this->field_name &&
637 true;
638 }
639 bool operator!=(const Properties &rhs) const {
640 return !(*this == rhs);
641 }
642 };
643protected:
644 ::mlir::DictionaryAttr odsAttrs;
645 ::std::optional<::mlir::OperationName> odsOpName;
647 ::mlir::RegionRange odsRegions;
648public:
649 FieldWriteOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = nullptr, const Properties &properties = {}, ::mlir::RegionRange regions = {});
650
652
653 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
655 return properties;
656 }
657
658 ::mlir::DictionaryAttr getAttributes();
659 ::mlir::FlatSymbolRefAttr getFieldNameAttr();
660 ::llvm::StringRef getFieldName();
661};
662} // namespace detail
663template <typename RangeT>
665 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
667public:
668 FieldWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr, const Properties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
669
670 FieldWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : FieldWriteOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
671
672 template <typename LateInst = FieldWriteOp, typename = std::enable_if_t<std::is_same_v<LateInst, FieldWriteOp>>>
673 FieldWriteOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
674
675 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
676 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
677 }
678
679 RangeT getODSOperands(unsigned index) {
680 auto valueRange = getODSOperandIndexAndLength(index);
681 return {std::next(odsOperands.begin(), valueRange.first),
682 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
683 }
684
685 ValueT getComponent() {
686 return (*getODSOperands(0).begin());
687 }
688
689 ValueT getVal() {
690 return (*getODSOperands(1).begin());
691 }
692
693 RangeT getOperands() {
694 return odsOperands;
695 }
696
697private:
698 RangeT odsOperands;
699};
700class FieldWriteOpAdaptor : public FieldWriteOpGenericAdaptor<::mlir::ValueRange> {
701public:
704
705 ::mlir::LogicalResult verify(::mlir::Location loc);
706};
707class FieldWriteOp : public ::mlir::Op<FieldWriteOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::llzk::function::WitnessGen, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::llzk::component::FieldRefOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait> {
708public:
709 using Op::Op;
710 using Op::print;
712 template <typename RangeT>
716 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
717 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("field_name")};
718 return ::llvm::ArrayRef(attrNames);
719 }
720
721 ::mlir::StringAttr getFieldNameAttrName() {
722 return getAttributeNameForIndex(0);
723 }
724
725 static ::mlir::StringAttr getFieldNameAttrName(::mlir::OperationName name) {
726 return getAttributeNameForIndex(name, 0);
727 }
728
729 static constexpr ::llvm::StringLiteral getOperationName() {
730 return ::llvm::StringLiteral("struct.writef");
731 }
732
733 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
734 ::mlir::Operation::operand_range getODSOperands(unsigned index);
735 ::mlir::TypedValue<::llzk::component::StructType> getComponent();
736 ::mlir::Value getVal();
737 ::mlir::OpOperand &getComponentMutable();
738 ::mlir::OpOperand &getValMutable();
739 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index);
740 ::mlir::Operation::result_range getODSResults(unsigned index);
741 static ::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
742 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
743 static llvm::hash_code computePropertiesHash(const Properties &prop);
744 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
745 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
746 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
747 static ::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
748 static ::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
749 void writeProperties(::mlir::DialectBytecodeWriter &writer);
750 ::mlir::FlatSymbolRefAttr getFieldNameAttr();
751 ::llvm::StringRef getFieldName();
752 void setFieldNameAttr(::mlir::FlatSymbolRefAttr attr);
753 void setFieldName(::llvm::StringRef attrValue);
754 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value component, ::mlir::FlatSymbolRefAttr field_name, ::mlir::Value val);
755 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value component, ::mlir::FlatSymbolRefAttr field_name, ::mlir::Value val);
756 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value component, ::llvm::StringRef field_name, ::mlir::Value val);
757 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value component, ::llvm::StringRef field_name, ::mlir::Value val);
758 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
759 ::mlir::LogicalResult verifyInvariantsImpl();
760 ::mlir::LogicalResult verifyInvariants();
761 bool isRead();
762 ::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
763 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
764 void print(::mlir::OpAsmPrinter &_odsPrinter);
765private:
766 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
767 return getAttributeNameForIndex((*this)->getName(), index);
768 }
769
770 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
771 assert(index < 1 && "invalid attribute index");
772 assert(name.getStringRef() == getOperationName() && "invalid operation name");
773 assert(name.isRegistered() && "Operation isn't registered, missing a "
774 "dependent dialect loading?");
775 return name.getAttributeNames()[index];
776 }
777
778public:
780 inline ::mlir::FailureOr<SymbolLookupResult<FieldDefOp>> getFieldDefOp(::mlir::SymbolTableCollection &tables) {
781 return ::llvm::cast<FieldRefOpInterface>(getOperation()).getFieldDefOp(tables);
782 }
783};
784} // namespace component
785} // namespace llzk
786MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::component::FieldWriteOp)
787
788namespace llzk {
789namespace component {
790
791//===----------------------------------------------------------------------===//
792// ::llzk::component::StructDefOp declarations
793//===----------------------------------------------------------------------===//
794
795namespace detail {
797public:
798 struct Properties {
799 using const_paramsTy = ::mlir::ArrayAttr;
801
803 auto &propStorage = this->const_params;
804 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
805 }
806 void setConstParams(const ::mlir::ArrayAttr &propValue) {
807 this->const_params = propValue;
808 }
809 using sym_nameTy = ::mlir::StringAttr;
811
812 auto getSymName() {
813 auto &propStorage = this->sym_name;
814 return ::llvm::cast<::mlir::StringAttr>(propStorage);
815 }
816 void setSymName(const ::mlir::StringAttr &propValue) {
817 this->sym_name = propValue;
818 }
819 bool operator==(const Properties &rhs) const {
820 return
821 rhs.const_params == this->const_params &&
822 rhs.sym_name == this->sym_name &&
823 true;
824 }
825 bool operator!=(const Properties &rhs) const {
826 return !(*this == rhs);
827 }
828 };
829protected:
830 ::mlir::DictionaryAttr odsAttrs;
831 ::std::optional<::mlir::OperationName> odsOpName;
833 ::mlir::RegionRange odsRegions;
834public:
835 StructDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = nullptr, const Properties &properties = {}, ::mlir::RegionRange regions = {});
836
838
839 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
841 return properties;
842 }
843
844 ::mlir::DictionaryAttr getAttributes();
845 ::mlir::StringAttr getSymNameAttr();
846 ::llvm::StringRef getSymName();
847 ::mlir::ArrayAttr getConstParamsAttr();
848 ::std::optional< ::mlir::ArrayAttr > getConstParams();
849 ::mlir::Region &getBody();
850 ::mlir::RegionRange getRegions();
851};
852} // namespace detail
853template <typename RangeT>
855 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
857public:
858 StructDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr, const Properties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
859
860 StructDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : StructDefOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
861
862 template <typename LateInst = StructDefOp, typename = std::enable_if_t<std::is_same_v<LateInst, StructDefOp>>>
863 StructDefOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
864
865 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
866 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
867 }
868
869 RangeT getODSOperands(unsigned index) {
870 auto valueRange = getODSOperandIndexAndLength(index);
871 return {std::next(odsOperands.begin(), valueRange.first),
872 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
873 }
874
875 RangeT getOperands() {
876 return odsOperands;
877 }
878
879private:
880 RangeT odsOperands;
881};
882class StructDefOpAdaptor : public StructDefOpGenericAdaptor<::mlir::ValueRange> {
883public:
886
887 ::mlir::LogicalResult verify(::mlir::Location loc);
888};
889class StructDefOp : public ::mlir::Op<StructDefOp, ::mlir::OpTrait::OneRegion, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::HasParent<::mlir::ModuleOp>::Impl, ::mlir::OpTrait::NoTerminator, ::mlir::OpTrait::SingleBlock, ::llzk::component::SetFuncAllowAttrs, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::SymbolOpInterface::Trait, ::mlir::OpTrait::SymbolTable, ::mlir::OpTrait::IsIsolatedFromAbove, ::mlir::RegionKindInterface::Trait, ::mlir::OpTrait::HasOnlyGraphRegion, ::mlir::SymbolUserOpInterface::Trait> {
890public:
891 using Op::Op;
892 using Op::print;
894 template <typename RangeT>
898 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
899 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("const_params"), ::llvm::StringRef("sym_name")};
900 return ::llvm::ArrayRef(attrNames);
901 }
902
903 ::mlir::StringAttr getConstParamsAttrName() {
904 return getAttributeNameForIndex(0);
905 }
906
907 static ::mlir::StringAttr getConstParamsAttrName(::mlir::OperationName name) {
908 return getAttributeNameForIndex(name, 0);
909 }
910
911 ::mlir::StringAttr getSymNameAttrName() {
912 return getAttributeNameForIndex(1);
913 }
914
915 static ::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name) {
916 return getAttributeNameForIndex(name, 1);
917 }
918
919 static constexpr ::llvm::StringLiteral getOperationName() {
920 return ::llvm::StringLiteral("struct.def");
921 }
922
923 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
924 ::mlir::Operation::operand_range getODSOperands(unsigned index);
925 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index);
926 ::mlir::Operation::result_range getODSResults(unsigned index);
927 ::mlir::Region &getBody();
928 static ::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
929 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
930 static llvm::hash_code computePropertiesHash(const Properties &prop);
931 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
932 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
933 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
934 static ::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
935 static ::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
936 void writeProperties(::mlir::DialectBytecodeWriter &writer);
937 ::mlir::StringAttr getSymNameAttr();
938 ::llvm::StringRef getSymName();
939 ::mlir::ArrayAttr getConstParamsAttr();
940 ::std::optional< ::mlir::ArrayAttr > getConstParams();
941 void setSymNameAttr(::mlir::StringAttr attr);
942 void setSymName(::llvm::StringRef attrValue);
943 void setConstParamsAttr(::mlir::ArrayAttr attr);
944 ::mlir::Attribute removeConstParamsAttr();
945 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, /*optional*/::mlir::ArrayAttr const_params);
946 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, /*optional*/::mlir::ArrayAttr const_params);
947 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, /*optional*/::mlir::ArrayAttr const_params);
948 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, /*optional*/::mlir::ArrayAttr const_params);
949 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
950 ::mlir::LogicalResult verifyInvariantsImpl();
951 ::mlir::LogicalResult verifyInvariants();
952 ::mlir::LogicalResult verifyRegions();
953 ::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
954 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
955 void print(::mlir::OpAsmPrinter &_odsPrinter);
956private:
957 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
958 return getAttributeNameForIndex((*this)->getName(), index);
959 }
960
961 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
962 assert(index < 2 && "invalid attribute index");
963 assert(name.getStringRef() == getOperationName() && "invalid operation name");
964 assert(name.isRegistered() && "Operation isn't registered, missing a "
965 "dependent dialect loading?");
966 return name.getAttributeNames()[index];
967 }
968
969public:
972 StructType getType(::std::optional<::mlir::ArrayAttr> constParams = {});
973
976 FieldDefOp getFieldDef(::mlir::StringAttr fieldName);
977
979 ::std::vector<FieldDefOp> getFieldDefs();
980
982 ::mlir::LogicalResult hasColumns() {
983 return ::mlir::success(::llvm::any_of(getFieldDefs(), [](FieldDefOp fdOp) {
984 return fdOp.getColumn();
985 }));
986 }
987
990
993
995 ::std::string getHeaderString();
996
998 bool hasParamNamed(::mlir::StringAttr find);
999 inline bool hasParamNamed(::mlir::FlatSymbolRefAttr find) {
1000 return hasParamNamed(find.getRootReference());
1001 }
1002
1003 //===------------------------------------------------------------------===//
1004 // Utility Methods
1005 //===------------------------------------------------------------------===//
1006
1009 ::mlir::SymbolRefAttr getFullyQualifiedName();
1010
1012 bool isMainComponent();
1013};
1014} // namespace component
1015} // namespace llzk
1016MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::component::StructDefOp)
1017
1018
1019#endif // GET_OP_CLASSES
1020
CreateStructOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:75
CreateStructOpAdaptor(CreateStructOp op)
Definition Ops.cpp.inc:194
::mlir::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:196
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:82
CreateStructOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:77
CreateStructOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:80
CreateStructOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:75
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.cpp.inc:210
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result)
Definition Ops.cpp.inc:224
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:200
::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:605
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.cpp.inc:214
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.cpp.inc:204
void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn)
Definition Ops.cpp:601
::mlir::TypedValue<::llzk::component::StructType > getResult()
Definition Ops.cpp.inc:220
::mlir::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:241
CreateStructOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:112
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:118
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:113
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:114
::mlir::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:254
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:258
CreateStructOpAdaptor Adaptor
Definition Ops.h.inc:110
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:279
::mlir::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:356
FieldDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:223
FieldDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:225
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:234
FieldDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:223
FieldDefOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:228
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:230
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:526
void setColumnAttr(::mlir::UnitAttr attr)
Definition Ops.cpp.inc:621
FoldAdaptor::Properties Properties
Definition Ops.h.inc:262
::mlir::StringAttr getColumnAttrName()
Definition Ops.h.inc:268
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::mlir::Type type, bool isColumn=false)
void setPublicAttr(bool newValue=true)
Definition Ops.cpp:399
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.cpp.inc:388
::mlir::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:641
void setColumn(bool attrValue)
Definition Ops.cpp.inc:625
::mlir::StringAttr getSymNameAttrName()
Definition Ops.h.inc:276
void setSymNameAttr(::mlir::StringAttr attr)
Definition Ops.cpp.inc:605
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute > attributes, bool isColumn=false)
::mlir::Attribute removeColumnAttr()
Definition Ops.cpp.inc:631
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:490
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::TypeAttr type, bool isColumn=false)
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:689
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.cpp.inc:378
::mlir::StringAttr getTypeAttrName()
Definition Ops.h.inc:284
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:555
::mlir::UnitAttr getColumnAttr()
Definition Ops.cpp.inc:594
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:509
::mlir::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:659
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:261
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:280
FieldDefOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:260
::mlir::StringAttr getColumnAttrName(::mlir::OperationName name)
Definition Ops.h.inc:272
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:497
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.cpp.inc:384
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:568
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:534
::mlir::StringAttr getTypeAttrName(::mlir::OperationName name)
Definition Ops.h.inc:288
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:263
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:394
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:374
void setSymName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:609
FieldDefOpAdaptor Adaptor
Definition Ops.h.inc:258
void setType(::mlir::Type attrValue)
Definition Ops.cpp.inc:617
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:292
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:460
::llvm::StringRef getSymName()
Definition Ops.cpp.inc:580
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:663
::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:430
::mlir::StringAttr getSymNameAttr()
Definition Ops.cpp.inc:576
::mlir::TypeAttr getTypeAttr()
Definition Ops.cpp.inc:585
void setTypeAttr(::mlir::TypeAttr attr)
Definition Ops.cpp.inc:613
FieldReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:446
::mlir::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:790
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:453
FieldReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:446
FieldReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:448
::llvm::SmallVector< RangeT > getMapOperands()
Definition Ops.h.inc:467
FieldReadOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:451
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:457
FoldAdaptor::Properties Properties
Definition Ops.h.inc:501
::mlir::StringAttr getNumDimsPerMapAttrName()
Definition Ops.h.inc:523
::mlir::OpOperand & getComponentMutable()
Definition Ops.cpp.inc:844
::mlir::MutableOperandRangeRange getMapOperandsMutable()
Definition Ops.cpp.inc:849
::mlir::StringAttr getFieldNameAttrName()
Definition Ops.h.inc:507
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:1151
::mlir::StringAttr getTableOffsetAttrName()
Definition Ops.h.inc:531
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
Definition Ops.cpp.inc:1117
::llvm::StringRef getFieldName()
Definition Ops.cpp.inc:1103
::mlir::StringAttr getFieldNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:511
::mlir::Attribute getTableOffsetAttr()
Definition Ops.cpp.inc:1108
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.cpp.inc:859
::mlir::LogicalResult verify()
Definition Ops.cpp:586
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType, ::mlir::Value component, ::mlir::StringAttr field)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:500
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
Definition Ops.cpp.inc:1179
bool isRead()
Return true if the op is a read, false if it's a write.
Definition Ops.cpp.inc:1362
::mlir::OperandRangeRange getMapOperands()
Definition Ops.cpp.inc:840
::mlir::TypedValue<::llzk::component::StructType > getComponent()
Definition Ops.cpp.inc:836
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
Definition Ops.cpp.inc:1121
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::mlir::ArrayRef<::mlir::NamedAttribute > attrs)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:999
inline ::mlir::FailureOr< SymbolLookupResult< FieldDefOp > > getFieldDefOp(::mlir::SymbolTableCollection &tables)
Gets the definition for the field referenced in this op.
Definition Ops.h.inc:605
FieldReadOpAdaptor Adaptor
Definition Ops.h.inc:497
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:1073
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type resultType, ::mlir::Value component, ::mlir::StringAttr field, ::mlir::Attribute dist, ::mlir::ValueRange mapOperands, std::optional< int32_t > numDims)
::mlir::StringAttr getMapOpGroupSizesAttrName()
Definition Ops.h.inc:515
::mlir::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1233
::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name)
Definition Ops.h.inc:519
void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr)
Definition Ops.cpp.inc:1147
::mlir::StringAttr getTableOffsetAttrName(::mlir::OperationName name)
Definition Ops.h.inc:535
::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:513
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:539
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
Definition Ops.cpp.inc:1126
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.cpp.inc:830
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:1159
::mlir::FlatSymbolRefAttr getFieldNameAttr()
Definition Ops.cpp.inc:1099
::std::optional<::mlir::Attribute > getTableOffset()
Definition Ops.cpp.inc:1112
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1046
::mlir::Attribute removeTableOffsetAttr()
Definition Ops.cpp.inc:1163
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1036
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1239
void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr)
Definition Ops.cpp.inc:1155
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1014
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:954
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:869
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:991
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
Definition Ops.cpp.inc:1130
::mlir::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1185
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.cpp.inc:855
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:812
::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name)
Definition Ops.h.inc:527
void setFieldName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:1139
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:502
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:1089
void setFieldNameAttr(::mlir::FlatSymbolRefAttr attr)
Definition Ops.cpp.inc:1135
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1319
FieldReadOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:499
void setTableOffsetAttr(::mlir::Attribute attr)
Definition Ops.cpp.inc:1143
::mlir::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1404
FieldWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:668
FieldWriteOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:673
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:675
FieldWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:670
FieldWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:668
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:679
::mlir::OpOperand & getComponentMutable()
Definition Ops.cpp.inc:1431
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1451
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:1533
bool isRead()
Return true if the op is a read, false if it's a write.
Definition Ops.cpp.inc:1717
::llvm::StringRef getFieldName()
Definition Ops.cpp.inc:1542
::mlir::OpOperand & getValMutable()
Definition Ops.cpp.inc:1436
FieldWriteOpAdaptor Adaptor
Definition Ops.h.inc:711
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.cpp.inc:1441
::mlir::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1591
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:1526
void setFieldName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:1551
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1619
::mlir::StringAttr getFieldNameAttrName()
Definition Ops.h.inc:721
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:714
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1513
::mlir::StringAttr getFieldNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:725
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.cpp.inc:1445
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.cpp.inc:1417
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:1413
::mlir::FlatSymbolRefAttr getFieldNameAttr()
Definition Ops.cpp.inc:1538
::mlir::TypedValue<::llzk::component::StructType > getComponent()
Definition Ops.cpp.inc:1423
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1479
::mlir::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1615
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1517
inline ::mlir::FailureOr< SymbolLookupResult< FieldDefOp > > getFieldDefOp(::mlir::SymbolTableCollection &tables)
Gets the definition for the field referenced in this op.
Definition Ops.h.inc:780
::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:531
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value component, ::mlir::FlatSymbolRefAttr field_name, ::mlir::Value val)
Definition Ops.cpp.inc:1555
FieldWriteOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:713
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:716
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:729
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1506
FoldAdaptor::Properties Properties
Definition Ops.h.inc:715
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1495
void setFieldNameAttr(::mlir::FlatSymbolRefAttr attr)
Definition Ops.cpp.inc:1547
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1684
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1500
StructDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:858
::mlir::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1777
StructDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:858
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:865
StructDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:860
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:869
StructDefOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:863
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1884
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1890
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.cpp.inc:1794
::mlir::StringAttr getSymNameAttr()
Definition Ops.cpp.inc:1949
::mlir::Region & getBody()
Definition Ops.cpp.inc:1810
::mlir::LogicalResult hasColumns()
Returns wether the struct defines fields marked as columns.
Definition Ops.h.inc:982
StructType getType(::std::optional<::mlir::ArrayAttr > constParams={})
Gets the StructType representing this struct.
Definition Ops.cpp:142
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:915
FieldDefOp getFieldDef(::mlir::StringAttr fieldName)
Gets the FieldDefOp that defines the field in this structure with the given name, if present.
Definition Ops.cpp:328
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1899
::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:182
::mlir::ArrayAttr getConstParamsAttr()
Definition Ops.cpp.inc:1958
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:919
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1911
::std::vector< FieldDefOp > getFieldDefs()
Get all FieldDefOp in this structure.
Definition Ops.cpp:341
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1861
::llvm::StringRef getSymName()
Definition Ops.cpp.inc:1953
void setSymNameAttr(::mlir::StringAttr attr)
Definition Ops.cpp.inc:1967
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:1790
StructDefOpAdaptor Adaptor
Definition Ops.h.inc:893
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1814
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.cpp.inc:1804
::mlir::SymbolRefAttr getFullyQualifiedName()
Return the full name for this struct from the root module, including any surrounding module scopes.
Definition Ops.cpp:176
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:1932
FoldAdaptor::Properties Properties
Definition Ops.h.inc:897
::mlir::StringAttr getConstParamsAttrName()
Definition Ops.h.inc:903
::mlir::Attribute removeConstParamsAttr()
Definition Ops.cpp.inc:1979
bool hasParamNamed(::mlir::FlatSymbolRefAttr find)
Definition Ops.h.inc:999
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2055
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:1942
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.cpp.inc:1800
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::ArrayAttr const_params)
Definition Ops.cpp.inc:1985
::mlir::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2031
::llzk::function::FuncDefOp getConstrainFuncOp()
Gets the FuncDefOp that defines the constrain function in this structure, if present.
Definition Ops.cpp:357
::mlir::StringAttr getConstParamsAttrName(::mlir::OperationName name)
Definition Ops.h.inc:907
::std::optional< ::mlir::ArrayAttr > getConstParams()
Definition Ops.cpp.inc:1962
void setSymName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:1971
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:896
bool hasParamNamed(::mlir::StringAttr find)
Return true iff this StructDefOp has a parameter with the given name.
::mlir::LogicalResult verifyRegions()
Definition Ops.cpp:235
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1917
::llzk::function::FuncDefOp getComputeFuncOp()
Gets the FuncDefOp that defines the compute function in this structure, if present.
Definition Ops.cpp:353
::mlir::StringAttr getSymNameAttrName()
Definition Ops.h.inc:911
bool isMainComponent()
Return true iff this StructDefOp is named "Main".
Definition Ops.cpp:361
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:898
StructDefOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:895
void setConstParamsAttr(::mlir::ArrayAttr attr)
Definition Ops.cpp.inc:1975
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2090
::mlir::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2051
::std::string getHeaderString()
Generate header string, in the same format as the assemblyFormat.
Definition Ops.cpp:148
CreateStructOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.cpp.inc:179
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:59
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:185
FieldDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.cpp.inc:305
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:196
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:311
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:725
::std::optional<::mlir::Attribute > getTableOffset()
Definition Ops.cpp.inc:762
FieldReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.cpp.inc:719
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:417
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:645
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:1383
FieldWriteOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.cpp.inc:1377
StructDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.cpp.inc:1732
::std::optional< ::mlir::ArrayAttr > getConstParams()
Definition Ops.cpp.inc:1761
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:831
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:1738
llvm::StringLiteral getOperationName()
Get the operation name, like "constrain.eq" for the given OpClass.
Definition OpHelpers.h:27
void setColumn(const ::mlir::UnitAttr &propValue)
Definition Ops.h.inc:160
void setSymName(const ::mlir::StringAttr &propValue)
Definition Ops.h.inc:170
void setType(const ::mlir::TypeAttr &propValue)
Definition Ops.h.inc:180
void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue)
Definition Ops.h.inc:380
void setTableOffset(const ::mlir::Attribute &propValue)
Definition Ops.h.inc:400
void setFieldName(const ::mlir::FlatSymbolRefAttr &propValue)
Definition Ops.h.inc:370
void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue)
Definition Ops.h.inc:390
void setFieldName(const ::mlir::FlatSymbolRefAttr &propValue)
Definition Ops.h.inc:631
void setConstParams(const ::mlir::ArrayAttr &propValue)
Definition Ops.h.inc:806
void setSymName(const ::mlir::StringAttr &propValue)
Definition Ops.h.inc:816