LLZK 0.1.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 {
11namespace pod {
12class NewPodOp;
13} // namespace pod
14} // namespace llzk
15namespace llzk {
16namespace pod {
17class ReadPodOp;
18} // namespace pod
19} // namespace llzk
20namespace llzk {
21namespace pod {
22class WritePodOp;
23} // namespace pod
24} // namespace llzk
25#ifdef GET_OP_CLASSES
26#undef GET_OP_CLASSES
27
28namespace llzk {
29namespace pod {
30
31//===----------------------------------------------------------------------===//
32// ::llzk::pod::NewPodOp declarations
33//===----------------------------------------------------------------------===//
34
35namespace detail {
37public:
38 struct Properties {
39 using initializedRecordsTy = ::mlir::ArrayAttr;
41
43 auto &propStorage = this->initializedRecords;
44 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
45 }
46 void setInitializedRecords(const ::mlir::ArrayAttr &propValue) {
47 this->initializedRecords = propValue;
48 }
49 using mapOpGroupSizesTy = ::mlir::DenseI32ArrayAttr;
51
53 auto &propStorage = this->mapOpGroupSizes;
54 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(propStorage);
55 }
56 void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue) {
57 this->mapOpGroupSizes = propValue;
58 }
59 using numDimsPerMapTy = ::mlir::DenseI32ArrayAttr;
61
63 auto &propStorage = this->numDimsPerMap;
64 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(propStorage);
65 }
66 void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue) {
67 this->numDimsPerMap = propValue;
68 }
69 using operandSegmentSizesTy = std::array<int32_t, 2>;
71 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
72 auto &propStorage = this->operandSegmentSizes;
73 return propStorage;
74 }
75 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
76 auto &propStorage = this->operandSegmentSizes;
77 ::llvm::copy(propValue, propStorage.begin());
78 }
79 bool operator==(const Properties &rhs) const {
80 return
81 rhs.initializedRecords == this->initializedRecords &&
82 rhs.mapOpGroupSizes == this->mapOpGroupSizes &&
83 rhs.numDimsPerMap == this->numDimsPerMap &&
84 rhs.operandSegmentSizes == this->operandSegmentSizes &&
85 true;
86 }
87 bool operator!=(const Properties &rhs) const {
88 return !(*this == rhs);
89 }
90 };
91protected:
92 ::mlir::DictionaryAttr odsAttrs;
93 ::std::optional<::mlir::OperationName> odsOpName;
95 ::mlir::RegionRange odsRegions;
96public:
97 NewPodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
98 odsOpName.emplace("pod.new", odsAttrs.getContext());
99 }
100
102
103 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
105 return properties;
106 }
107
108 ::mlir::DictionaryAttr getAttributes() {
109 return odsAttrs;
110 }
111
112 ::mlir::ArrayAttr getInitializedRecordsAttr();
113 ::mlir::ArrayAttr getInitializedRecords();
114 ::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr();
115 ::llvm::ArrayRef<int32_t> getNumDimsPerMap();
116 ::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr() {
117 auto attr = ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
118 return attr;
119 }
120
121 ::llvm::ArrayRef<int32_t> getMapOpGroupSizes();
122};
123} // namespace detail
124template <typename RangeT>
126 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
128public:
129 NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
130
131 NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : NewPodOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
132
133 NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : NewPodOpGenericAdaptor(values, attrs, Properties{}, {}) {}
134
135 NewPodOpGenericAdaptor(RangeT values, const NewPodOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
136
137 template <typename LateInst = NewPodOp, typename = std::enable_if_t<std::is_same_v<LateInst, NewPodOp>>>
138 NewPodOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
139
140 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
141 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
142 }
143
144 RangeT getODSOperands(unsigned index) {
145 auto valueRange = getODSOperandIndexAndLength(index);
146 return {std::next(odsOperands.begin(), valueRange.first),
147 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
148 }
149
151 return getODSOperands(0);
152 }
153
154 ::llvm::SmallVector<RangeT> getMapOperands() {
155 auto tblgenTmpOperands = getODSOperands(1);
156 auto sizes = getMapOpGroupSizes();
157
158 ::llvm::SmallVector<RangeT> tblgenTmpOperandGroups;
159 for (int i = 0, e = sizes.size(); i < e; ++i) {
160 tblgenTmpOperandGroups.push_back(tblgenTmpOperands.take_front(sizes[i]));
161 tblgenTmpOperands = tblgenTmpOperands.drop_front(sizes[i]);
162 }
163 return tblgenTmpOperandGroups;
164 }
165
166 RangeT getOperands() {
167 return odsOperands;
168 }
169
170private:
171 RangeT odsOperands;
172};
173class NewPodOpAdaptor : public NewPodOpGenericAdaptor<::mlir::ValueRange> {
174public:
177
178 ::llvm::LogicalResult verify(::mlir::Location loc);
179};
180class NewPodOp : public ::mlir::Op<NewPodOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::llzk::pod::PodType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::AttrSizedOperandSegments, ::llzk::VerifySizesForMultiAffineOps<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpAsmOpInterface::Trait> {
181public:
182 using Op::Op;
183 using Op::print;
185 template <typename RangeT>
189 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
190 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("initializedRecords"), ::llvm::StringRef("mapOpGroupSizes"), ::llvm::StringRef("numDimsPerMap"), ::llvm::StringRef("operandSegmentSizes")};
191 return ::llvm::ArrayRef(attrNames);
192 }
193
194 ::mlir::StringAttr getInitializedRecordsAttrName() {
195 return getAttributeNameForIndex(0);
196 }
197
198 static ::mlir::StringAttr getInitializedRecordsAttrName(::mlir::OperationName name) {
199 return getAttributeNameForIndex(name, 0);
200 }
201
202 ::mlir::StringAttr getMapOpGroupSizesAttrName() {
203 return getAttributeNameForIndex(1);
204 }
205
206 static ::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name) {
207 return getAttributeNameForIndex(name, 1);
208 }
209
210 ::mlir::StringAttr getNumDimsPerMapAttrName() {
211 return getAttributeNameForIndex(2);
212 }
213
214 static ::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name) {
215 return getAttributeNameForIndex(name, 2);
216 }
217
218 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
219 return (*this)->getName().getAttributeNames().back();
220 }
221
222 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
223 return name.getAttributeNames().back();
224 }
225
226 static constexpr ::llvm::StringLiteral getOperationName() {
227 return ::llvm::StringLiteral("pod.new");
228 }
229
230 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
231 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
232 auto valueRange = getODSOperandIndexAndLength(index);
233 return {std::next(getOperation()->operand_begin(), valueRange.first),
234 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
235 }
236
237 ::mlir::Operation::operand_range getInitialValues() {
238 return getODSOperands(0);
239 }
240
241 ::mlir::OperandRangeRange getMapOperands() {
242 return getODSOperands(1).split(getMapOpGroupSizesAttr());
243 }
244
245 ::mlir::MutableOperandRange getInitialValuesMutable();
246 ::mlir::MutableOperandRangeRange getMapOperandsMutable();
247 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
248 return {index, 1};
249 }
250
251 ::mlir::Operation::result_range getODSResults(unsigned index) {
252 auto valueRange = getODSResultIndexAndLength(index);
253 return {std::next(getOperation()->result_begin(), valueRange.first),
254 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
255 }
256
257 ::mlir::TypedValue<::llzk::pod::PodType> getResult() {
258 return ::llvm::cast<::mlir::TypedValue<::llzk::pod::PodType>>(*getODSResults(0).begin());
259 }
260
261 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
262 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
263 static llvm::hash_code computePropertiesHash(const Properties &prop);
264 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
265 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
266 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
267 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
268 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
269 void writeProperties(::mlir::DialectBytecodeWriter &writer);
270 ::mlir::ArrayAttr getInitializedRecordsAttr() {
271 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().initializedRecords);
272 }
273
274 ::mlir::ArrayAttr getInitializedRecords();
275 ::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr() {
276 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(getProperties().numDimsPerMap);
277 }
278
279 ::llvm::ArrayRef<int32_t> getNumDimsPerMap();
280 ::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr() {
281 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
282 }
283
284 ::llvm::ArrayRef<int32_t> getMapOpGroupSizes();
285 void setInitializedRecordsAttr(::mlir::ArrayAttr attr) {
286 getProperties().initializedRecords = attr;
287 }
288
289 void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr) {
290 getProperties().numDimsPerMap = attr;
291 }
292
293 void setNumDimsPerMap(::llvm::ArrayRef<int32_t> attrValue);
294 void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr) {
295 getProperties().mapOpGroupSizes = attr;
296 }
297
298 void setMapOpGroupSizes(::llvm::ArrayRef<int32_t> attrValue);
299 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::pod::InitializedRecords initialValues = {});
300 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::pod::PodType resultType, ::llzk::pod::InitializedRecords initialValues = {});
301 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::pod::PodType resultType, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::llzk::pod::InitializedRecords initialValues = {});
302 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::pod::PodType resultType, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::llzk::pod::InitializedRecords initialValues = {});
303 static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
304 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
305 void print(::mlir::OpAsmPrinter &p);
306 ::llvm::LogicalResult verifyInvariantsImpl();
307 ::llvm::LogicalResult verifyInvariants();
308 ::llvm::LogicalResult verify();
309 void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn);
310 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
311private:
312 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
313 return getAttributeNameForIndex((*this)->getName(), index);
314 }
315
316 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
317 assert(index < 3 && "invalid attribute index");
318 assert(name.getStringRef() == getOperationName() && "invalid operation name");
319 assert(name.isRegistered() && "Operation isn't registered, missing a "
320 "dependent dialect loading?");
321 return name.getAttributeNames()[index];
322 }
323
324public:
325 ::mlir::SmallVector<::llzk::pod::RecordValue> getInitializedRecordValues();
326};
327} // namespace pod
328} // namespace llzk
329MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::pod::NewPodOp)
330
331namespace llzk {
332namespace pod {
333
334//===----------------------------------------------------------------------===//
335// ::llzk::pod::ReadPodOp declarations
336//===----------------------------------------------------------------------===//
337
338namespace detail {
340public:
341 struct Properties {
342 using record_nameTy = ::mlir::FlatSymbolRefAttr;
344
346 auto &propStorage = this->record_name;
347 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(propStorage);
348 }
349 void setRecordName(const ::mlir::FlatSymbolRefAttr &propValue) {
350 this->record_name = propValue;
351 }
352 bool operator==(const Properties &rhs) const {
353 return
354 rhs.record_name == this->record_name &&
355 true;
356 }
357 bool operator!=(const Properties &rhs) const {
358 return !(*this == rhs);
359 }
360 };
361protected:
362 ::mlir::DictionaryAttr odsAttrs;
363 ::std::optional<::mlir::OperationName> odsOpName;
365 ::mlir::RegionRange odsRegions;
366public:
367 ReadPodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
368 odsOpName.emplace("pod.read", odsAttrs.getContext());
369 }
370
372
373 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
374 return {index, 1};
375 }
376
378 return properties;
379 }
380
381 ::mlir::DictionaryAttr getAttributes() {
382 return odsAttrs;
383 }
384
385 ::mlir::FlatSymbolRefAttr getRecordNameAttr() {
386 auto attr = ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().record_name);
387 return attr;
388 }
389
390 ::llvm::StringRef getRecordName();
391};
392} // namespace detail
393template <typename RangeT>
395 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
397public:
398 ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
399
400 ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : ReadPodOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
401
402 ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ReadPodOpGenericAdaptor(values, attrs, Properties{}, {}) {}
403
404 ReadPodOpGenericAdaptor(RangeT values, const ReadPodOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
405
406 template <typename LateInst = ReadPodOp, typename = std::enable_if_t<std::is_same_v<LateInst, ReadPodOp>>>
407 ReadPodOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
408
409 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
410 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
411 }
412
413 RangeT getODSOperands(unsigned index) {
414 auto valueRange = getODSOperandIndexAndLength(index);
415 return {std::next(odsOperands.begin(), valueRange.first),
416 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
417 }
418
419 ValueT getPodRef() {
420 return (*getODSOperands(0).begin());
421 }
422
423 RangeT getOperands() {
424 return odsOperands;
425 }
426
427private:
428 RangeT odsOperands;
429};
430class ReadPodOpAdaptor : public ReadPodOpGenericAdaptor<::mlir::ValueRange> {
431public:
434
435 ::llvm::LogicalResult verify(::mlir::Location loc);
436};
437class ReadPodOp : public ::mlir::Op<ReadPodOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
438public:
439 using Op::Op;
440 using Op::print;
442 template <typename RangeT>
446 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
447 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("record_name")};
448 return ::llvm::ArrayRef(attrNames);
449 }
450
451 ::mlir::StringAttr getRecordNameAttrName() {
452 return getAttributeNameForIndex(0);
453 }
454
455 static ::mlir::StringAttr getRecordNameAttrName(::mlir::OperationName name) {
456 return getAttributeNameForIndex(name, 0);
457 }
458
459 static constexpr ::llvm::StringLiteral getOperationName() {
460 return ::llvm::StringLiteral("pod.read");
461 }
462
463 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
464 return {index, 1};
465 }
466
467 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
468 auto valueRange = getODSOperandIndexAndLength(index);
469 return {std::next(getOperation()->operand_begin(), valueRange.first),
470 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
471 }
472
473 ::mlir::TypedValue<::llzk::pod::PodType> getPodRef() {
474 return ::llvm::cast<::mlir::TypedValue<::llzk::pod::PodType>>(*getODSOperands(0).begin());
475 }
476
477 ::mlir::OpOperand &getPodRefMutable() {
478 auto range = getODSOperandIndexAndLength(0);
479 return getOperation()->getOpOperand(range.first);
480 }
481
482 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
483 return {index, 1};
484 }
485
486 ::mlir::Operation::result_range getODSResults(unsigned index) {
487 auto valueRange = getODSResultIndexAndLength(index);
488 return {std::next(getOperation()->result_begin(), valueRange.first),
489 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
490 }
491
492 ::mlir::TypedValue<::mlir::Type> getResult() {
493 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
494 }
495
496 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
497 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
498 static llvm::hash_code computePropertiesHash(const Properties &prop);
499 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
500 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
501 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
502 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
503 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
504 void writeProperties(::mlir::DialectBytecodeWriter &writer);
505 ::mlir::FlatSymbolRefAttr getRecordNameAttr() {
506 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().record_name);
507 }
508
509 ::llvm::StringRef getRecordName();
510 void setRecordNameAttr(::mlir::FlatSymbolRefAttr attr) {
511 getProperties().record_name = attr;
512 }
513
514 void setRecordName(::llvm::StringRef attrValue);
515 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name);
516 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name);
517 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value pod_ref, ::llvm::StringRef record_name);
518 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::llvm::StringRef record_name);
519 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
520 ::llvm::LogicalResult verifyInvariantsImpl();
521 ::llvm::LogicalResult verifyInvariants();
522 ::llvm::LogicalResult verify();
523 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
524 void print(::mlir::OpAsmPrinter &_odsPrinter);
525private:
526 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
527 return getAttributeNameForIndex((*this)->getName(), index);
528 }
529
530 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
531 assert(index < 1 && "invalid attribute index");
532 assert(name.getStringRef() == getOperationName() && "invalid operation name");
533 assert(name.isRegistered() && "Operation isn't registered, missing a "
534 "dependent dialect loading?");
535 return name.getAttributeNames()[index];
536 }
537
538public:
539};
540} // namespace pod
541} // namespace llzk
542MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::pod::ReadPodOp)
543
544namespace llzk {
545namespace pod {
546
547//===----------------------------------------------------------------------===//
548// ::llzk::pod::WritePodOp declarations
549//===----------------------------------------------------------------------===//
550
551namespace detail {
553public:
554 struct Properties {
555 using record_nameTy = ::mlir::FlatSymbolRefAttr;
557
559 auto &propStorage = this->record_name;
560 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(propStorage);
561 }
562 void setRecordName(const ::mlir::FlatSymbolRefAttr &propValue) {
563 this->record_name = propValue;
564 }
565 bool operator==(const Properties &rhs) const {
566 return
567 rhs.record_name == this->record_name &&
568 true;
569 }
570 bool operator!=(const Properties &rhs) const {
571 return !(*this == rhs);
572 }
573 };
574protected:
575 ::mlir::DictionaryAttr odsAttrs;
576 ::std::optional<::mlir::OperationName> odsOpName;
578 ::mlir::RegionRange odsRegions;
579public:
580 WritePodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
581 odsOpName.emplace("pod.write", odsAttrs.getContext());
582 }
583
585
586 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
587 return {index, 1};
588 }
589
591 return properties;
592 }
593
594 ::mlir::DictionaryAttr getAttributes() {
595 return odsAttrs;
596 }
597
598 ::mlir::FlatSymbolRefAttr getRecordNameAttr() {
599 auto attr = ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().record_name);
600 return attr;
601 }
602
603 ::llvm::StringRef getRecordName();
604};
605} // namespace detail
606template <typename RangeT>
608 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
610public:
611 WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
612
613 WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : WritePodOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
614
615 WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : WritePodOpGenericAdaptor(values, attrs, Properties{}, {}) {}
616
617 WritePodOpGenericAdaptor(RangeT values, const WritePodOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
618
619 template <typename LateInst = WritePodOp, typename = std::enable_if_t<std::is_same_v<LateInst, WritePodOp>>>
620 WritePodOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
621
622 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
623 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
624 }
625
626 RangeT getODSOperands(unsigned index) {
627 auto valueRange = getODSOperandIndexAndLength(index);
628 return {std::next(odsOperands.begin(), valueRange.first),
629 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
630 }
631
632 ValueT getPodRef() {
633 return (*getODSOperands(0).begin());
634 }
635
636 ValueT getValue() {
637 return (*getODSOperands(1).begin());
638 }
639
640 RangeT getOperands() {
641 return odsOperands;
642 }
643
644private:
645 RangeT odsOperands;
646};
647class WritePodOpAdaptor : public WritePodOpGenericAdaptor<::mlir::ValueRange> {
648public:
651
652 ::llvm::LogicalResult verify(::mlir::Location loc);
653};
654class WritePodOp : public ::mlir::Op<WritePodOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> {
655public:
656 using Op::Op;
657 using Op::print;
659 template <typename RangeT>
663 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
664 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("record_name")};
665 return ::llvm::ArrayRef(attrNames);
666 }
667
668 ::mlir::StringAttr getRecordNameAttrName() {
669 return getAttributeNameForIndex(0);
670 }
671
672 static ::mlir::StringAttr getRecordNameAttrName(::mlir::OperationName name) {
673 return getAttributeNameForIndex(name, 0);
674 }
675
676 static constexpr ::llvm::StringLiteral getOperationName() {
677 return ::llvm::StringLiteral("pod.write");
678 }
679
680 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
681 return {index, 1};
682 }
683
684 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
685 auto valueRange = getODSOperandIndexAndLength(index);
686 return {std::next(getOperation()->operand_begin(), valueRange.first),
687 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
688 }
689
690 ::mlir::TypedValue<::llzk::pod::PodType> getPodRef() {
691 return ::llvm::cast<::mlir::TypedValue<::llzk::pod::PodType>>(*getODSOperands(0).begin());
692 }
693
694 ::mlir::TypedValue<::mlir::Type> getValue() {
695 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
696 }
697
698 ::mlir::OpOperand &getPodRefMutable() {
699 auto range = getODSOperandIndexAndLength(0);
700 return getOperation()->getOpOperand(range.first);
701 }
702
703 ::mlir::OpOperand &getValueMutable() {
704 auto range = getODSOperandIndexAndLength(1);
705 return getOperation()->getOpOperand(range.first);
706 }
707
708 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
709 return {index, 1};
710 }
711
712 ::mlir::Operation::result_range getODSResults(unsigned index) {
713 auto valueRange = getODSResultIndexAndLength(index);
714 return {std::next(getOperation()->result_begin(), valueRange.first),
715 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
716 }
717
718 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
719 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
720 static llvm::hash_code computePropertiesHash(const Properties &prop);
721 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
722 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
723 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
724 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
725 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
726 void writeProperties(::mlir::DialectBytecodeWriter &writer);
727 ::mlir::FlatSymbolRefAttr getRecordNameAttr() {
728 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().record_name);
729 }
730
731 ::llvm::StringRef getRecordName();
732 void setRecordNameAttr(::mlir::FlatSymbolRefAttr attr) {
733 getProperties().record_name = attr;
734 }
735
736 void setRecordName(::llvm::StringRef attrValue);
737 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name, ::mlir::Value value);
738 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name, ::mlir::Value value);
739 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value pod_ref, ::llvm::StringRef record_name, ::mlir::Value value);
740 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::llvm::StringRef record_name, ::mlir::Value value);
741 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
742 ::llvm::LogicalResult verifyInvariantsImpl();
743 ::llvm::LogicalResult verifyInvariants();
744 ::llvm::LogicalResult verify();
745 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
746 void print(::mlir::OpAsmPrinter &_odsPrinter);
747private:
748 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
749 return getAttributeNameForIndex((*this)->getName(), index);
750 }
751
752 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
753 assert(index < 1 && "invalid attribute index");
754 assert(name.getStringRef() == getOperationName() && "invalid operation name");
755 assert(name.isRegistered() && "Operation isn't registered, missing a "
756 "dependent dialect loading?");
757 return name.getAttributeNames()[index];
758 }
759
760public:
761};
762} // namespace pod
763} // namespace llzk
764MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::pod::WritePodOp)
765
766
767#endif // GET_OP_CLASSES
768
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:159
NewPodOpAdaptor(NewPodOp op)
Definition Ops.cpp.inc:157
NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:129
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:140
NewPodOpGenericAdaptor(RangeT values, const NewPodOpGenericAdaptorBase &base)
Definition Ops.h.inc:135
::llvm::SmallVector< RangeT > getMapOperands()
Definition Ops.h.inc:154
NewPodOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:138
NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs)
Definition Ops.h.inc:133
NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:129
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:144
NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:131
void print(::mlir::OpAsmPrinter &p)
Definition Ops.cpp:307
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:521
::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name)
Definition Ops.h.inc:206
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:197
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:297
NewPodOpAdaptor Adaptor
Definition Ops.h.inc:184
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:527
void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr)
Definition Ops.h.inc:294
::mlir::ArrayAttr getInitializedRecordsAttr()
Definition Ops.h.inc:270
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:376
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:478
::mlir::Operation::operand_range getInitialValues()
Definition Ops.h.inc:237
::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name)
Definition Ops.h.inc:214
::mlir::OperandRangeRange getMapOperands()
Definition Ops.h.inc:241
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:308
::mlir::SmallVector<::llzk::pod::RecordValue > getInitializedRecordValues()
Definition Ops.cpp:336
NewPodOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:186
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:259
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
Definition Ops.cpp.inc:470
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:321
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:454
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::pod::InitializedRecords initialValues={})
Definition Ops.cpp.inc:458
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:247
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::pod::PodType resultType, ::llvm::ArrayRef<::mlir::ValueRange > mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::llzk::pod::InitializedRecords initialValues={})
::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name)
Definition Ops.h.inc:222
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
Definition Ops.cpp.inc:440
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:346
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:187
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:176
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
Definition Ops.h.inc:275
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:251
::mlir::TypedValue<::llzk::pod::PodType > getResult()
Definition Ops.h.inc:257
::mlir::StringAttr getInitializedRecordsAttrName()
Definition Ops.h.inc:194
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
Definition Ops.cpp.inc:445
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:231
::mlir::StringAttr getMapOpGroupSizesAttrName()
Definition Ops.h.inc:202
void setInitializedRecordsAttr(::mlir::ArrayAttr attr)
Definition Ops.h.inc:285
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
Definition Ops.h.inc:280
::mlir::MutableOperandRange getInitialValuesMutable()
Definition Ops.cpp.inc:185
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:450
void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn)
Definition Ops.cpp:81
::mlir::StringAttr getOperandSegmentSizesAttrName()
Definition Ops.h.inc:218
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:189
FoldAdaptor::Properties Properties
Definition Ops.h.inc:188
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:355
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::pod::PodType resultType, ::llzk::pod::InitializedRecords initialValues={})
::mlir::MutableOperandRangeRange getMapOperandsMutable()
Definition Ops.cpp.inc:191
::llvm::LogicalResult verify()
Definition Ops.cpp:176
::mlir::StringAttr getInitializedRecordsAttrName(::mlir::OperationName name)
Definition Ops.h.inc:198
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:413
::mlir::ArrayAttr getInitializedRecords()
Definition Ops.cpp.inc:435
void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr)
Definition Ops.h.inc:289
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp:207
::mlir::StringAttr getNumDimsPerMapAttrName()
Definition Ops.h.inc:210
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:226
ReadPodOpAdaptor(ReadPodOp op)
Definition Ops.cpp.inc:550
ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:398
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:552
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:409
ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:398
ReadPodOpGenericAdaptor(RangeT values, const ReadPodOpGenericAdaptorBase &base)
Definition Ops.h.inc:404
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:413
ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:402
ReadPodOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:407
ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:400
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:723
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:584
::llvm::StringRef getRecordName()
Definition Ops.cpp.inc:643
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:618
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:492
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:467
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:482
ReadPodOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:443
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:463
::mlir::FlatSymbolRefAttr getRecordNameAttr()
Definition Ops.h.inc:505
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:696
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:638
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:729
::llvm::LogicalResult verify()
Definition Ops.cpp:349
FoldAdaptor::Properties Properties
Definition Ops.h.inc:445
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:561
::mlir::TypedValue<::llzk::pod::PodType > getPodRef()
Definition Ops.h.inc:473
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:784
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:600
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:444
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:611
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:459
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:605
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:486
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:446
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:631
::mlir::OpOperand & getPodRefMutable()
Definition Ops.h.inc:477
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name)
Definition Ops.cpp.inc:652
::mlir::StringAttr getRecordNameAttrName()
Definition Ops.h.inc:451
::mlir::StringAttr getRecordNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:455
void setRecordNameAttr(::mlir::FlatSymbolRefAttr attr)
Definition Ops.h.inc:510
void setRecordName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:648
ReadPodOpAdaptor Adaptor
Definition Ops.h.inc:441
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:622
WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:611
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:835
WritePodOpAdaptor(WritePodOp op)
Definition Ops.cpp.inc:833
WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:611
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:626
WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:613
WritePodOpGenericAdaptor(RangeT values, const WritePodOpGenericAdaptorBase &base)
Definition Ops.h.inc:617
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:622
WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:615
WritePodOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:620
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:712
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:663
::mlir::FlatSymbolRefAttr getRecordNameAttr()
Definition Ops.h.inc:727
::llvm::LogicalResult verify()
Definition Ops.cpp:373
void setRecordNameAttr(::mlir::FlatSymbolRefAttr attr)
Definition Ops.h.inc:732
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:883
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1076
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:914
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1005
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:708
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:676
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1011
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:905
::mlir::TypedValue<::mlir::Type > getValue()
Definition Ops.h.inc:694
::mlir::StringAttr getRecordNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:672
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:661
::mlir::OpOperand & getPodRefMutable()
Definition Ops.h.inc:698
void setRecordName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:931
WritePodOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:660
::mlir::TypedValue<::llzk::pod::PodType > getPodRef()
Definition Ops.h.inc:690
FoldAdaptor::Properties Properties
Definition Ops.h.inc:662
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:888
::mlir::OpOperand & getValueMutable()
Definition Ops.h.inc:703
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:684
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:981
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:921
WritePodOpAdaptor Adaptor
Definition Ops.h.inc:658
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:680
::llvm::StringRef getRecordName()
Definition Ops.cpp.inc:926
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:901
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:844
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:894
::mlir::StringAttr getRecordNameAttrName()
Definition Ops.h.inc:668
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name, ::mlir::Value value)
Definition Ops.cpp.inc:935
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:867
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
Definition Ops.h.inc:116
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:122
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
Definition Ops.cpp.inc:151
NewPodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:97
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
Definition Ops.cpp.inc:146
::mlir::DictionaryAttr getAttributes()
Definition Ops.h.inc:108
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
Definition Ops.cpp.inc:141
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:93
::mlir::FlatSymbolRefAttr getRecordNameAttr()
Definition Ops.h.inc:385
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:373
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:363
ReadPodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:367
::mlir::FlatSymbolRefAttr getRecordNameAttr()
Definition Ops.h.inc:598
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:586
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:576
WritePodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:580
mlir::ArrayRef< RecordValue > InitializedRecords
Definition Types.h:23
bool operator!=(const Properties &rhs) const
Definition Ops.h.inc:87
bool operator==(const Properties &rhs) const
Definition Ops.h.inc:79
void setOperandSegmentSizes(::llvm::ArrayRef< int32_t > propValue)
Definition Ops.h.inc:75
void setInitializedRecords(const ::mlir::ArrayAttr &propValue)
Definition Ops.h.inc:46
void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue)
Definition Ops.h.inc:66
void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue)
Definition Ops.h.inc:56
::llvm::ArrayRef< int32_t > getOperandSegmentSizes() const
Definition Ops.h.inc:71
void setRecordName(const ::mlir::FlatSymbolRefAttr &propValue)
Definition Ops.h.inc:349
void setRecordName(const ::mlir::FlatSymbolRefAttr &propValue)
Definition Ops.h.inc:562