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
10namespace llzk {
11namespace global {
12class GlobalDefOp;
13} // namespace global
14} // namespace llzk
15namespace llzk {
16namespace global {
17class GlobalReadOp;
18} // namespace global
19} // namespace llzk
20namespace llzk {
21namespace global {
22class GlobalWriteOp;
23} // namespace global
24} // namespace llzk
25#ifdef GET_OP_CLASSES
26#undef GET_OP_CLASSES
27
28namespace llzk {
29namespace global {
30
31//===----------------------------------------------------------------------===//
32// ::llzk::global::GlobalDefOp declarations
33//===----------------------------------------------------------------------===//
34
35namespace detail {
37public:
38 struct Properties {
39 using constantTy = ::mlir::UnitAttr;
41
42 auto getConstant() {
43 auto &propStorage = this->constant;
44 return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage);
45 }
46 void setConstant(const ::mlir::UnitAttr &propValue) {
47 this->constant = propValue;
48 }
49 using initial_valueTy = ::mlir::Attribute;
51
53 auto &propStorage = this->initial_value;
54 return ::llvm::dyn_cast_or_null<::mlir::Attribute>(propStorage);
55 }
56 void setInitialValue(const ::mlir::Attribute &propValue) {
57 this->initial_value = propValue;
58 }
59 using sym_nameTy = ::mlir::StringAttr;
61
62 auto getSymName() {
63 auto &propStorage = this->sym_name;
64 return ::llvm::cast<::mlir::StringAttr>(propStorage);
65 }
66 void setSymName(const ::mlir::StringAttr &propValue) {
67 this->sym_name = propValue;
68 }
69 using typeTy = ::mlir::TypeAttr;
71
72 auto getType() {
73 auto &propStorage = this->type;
74 return ::llvm::cast<::mlir::TypeAttr>(propStorage);
75 }
76 void setType(const ::mlir::TypeAttr &propValue) {
77 this->type = propValue;
78 }
79 bool operator==(const Properties &rhs) const {
80 return
81 rhs.constant == this->constant &&
82 rhs.initial_value == this->initial_value &&
83 rhs.sym_name == this->sym_name &&
84 rhs.type == this->type &&
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 GlobalDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
98 odsOpName.emplace("global.def", odsAttrs.getContext());
99 }
100
102
103 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
104 return {index, 1};
105 }
106
108 return properties;
109 }
110
111 ::mlir::DictionaryAttr getAttributes() {
112 return odsAttrs;
113 }
114
115 ::mlir::StringAttr getSymNameAttr() {
116 auto attr = ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
117 return attr;
118 }
119
120 ::llvm::StringRef getSymName();
121 ::mlir::UnitAttr getConstantAttr();
122 bool getConstant();
123 ::mlir::TypeAttr getTypeAttr() {
124 auto attr = ::llvm::cast<::mlir::TypeAttr>(getProperties().type);
125 return attr;
126 }
127
128 ::mlir::Type getType();
129 ::mlir::Attribute getInitialValueAttr();
130 ::mlir::Attribute getInitialValue();
131};
132} // namespace detail
133template <typename RangeT>
135 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
137public:
138 GlobalDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
139
140 GlobalDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : GlobalDefOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
141
142 GlobalDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : GlobalDefOpGenericAdaptor(values, attrs, Properties{}, {}) {}
143
144 GlobalDefOpGenericAdaptor(RangeT values, const GlobalDefOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
145
146 template <typename LateInst = GlobalDefOp, typename = std::enable_if_t<std::is_same_v<LateInst, GlobalDefOp>>>
147 GlobalDefOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
148
149 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
150 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
151 }
152
153 RangeT getODSOperands(unsigned index) {
154 auto valueRange = getODSOperandIndexAndLength(index);
155 return {std::next(odsOperands.begin(), valueRange.first),
156 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
157 }
158
159 RangeT getOperands() {
160 return odsOperands;
161 }
162
163private:
164 RangeT odsOperands;
165};
166class GlobalDefOpAdaptor : public GlobalDefOpGenericAdaptor<::mlir::ValueRange> {
167public:
170
171 ::llvm::LogicalResult verify(::mlir::Location loc);
172};
173class GlobalDefOp : public ::mlir::Op<GlobalDefOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::HasParent<mlir::ModuleOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::mlir::SymbolOpInterface::Trait> {
174public:
175 using Op::Op;
176 using Op::print;
178 template <typename RangeT>
182 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
183 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("constant"), ::llvm::StringRef("initial_value"), ::llvm::StringRef("sym_name"), ::llvm::StringRef("type")};
184 return ::llvm::ArrayRef(attrNames);
185 }
186
187 ::mlir::StringAttr getConstantAttrName() {
188 return getAttributeNameForIndex(0);
189 }
190
191 static ::mlir::StringAttr getConstantAttrName(::mlir::OperationName name) {
192 return getAttributeNameForIndex(name, 0);
193 }
194
195 ::mlir::StringAttr getInitialValueAttrName() {
196 return getAttributeNameForIndex(1);
197 }
198
199 static ::mlir::StringAttr getInitialValueAttrName(::mlir::OperationName name) {
200 return getAttributeNameForIndex(name, 1);
201 }
202
203 ::mlir::StringAttr getSymNameAttrName() {
204 return getAttributeNameForIndex(2);
205 }
206
207 static ::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name) {
208 return getAttributeNameForIndex(name, 2);
209 }
210
211 ::mlir::StringAttr getTypeAttrName() {
212 return getAttributeNameForIndex(3);
213 }
214
215 static ::mlir::StringAttr getTypeAttrName(::mlir::OperationName name) {
216 return getAttributeNameForIndex(name, 3);
217 }
218
219 static constexpr ::llvm::StringLiteral getOperationName() {
220 return ::llvm::StringLiteral("global.def");
221 }
222
223 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
224 return {index, 1};
225 }
226
227 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
228 auto valueRange = getODSOperandIndexAndLength(index);
229 return {std::next(getOperation()->operand_begin(), valueRange.first),
230 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
231 }
232
233 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
234 return {index, 1};
235 }
236
237 ::mlir::Operation::result_range getODSResults(unsigned index) {
238 auto valueRange = getODSResultIndexAndLength(index);
239 return {std::next(getOperation()->result_begin(), valueRange.first),
240 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
241 }
242
243 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
244 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
245 static llvm::hash_code computePropertiesHash(const Properties &prop);
246 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
247 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
248 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
249 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
250 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
251 void writeProperties(::mlir::DialectBytecodeWriter &writer);
252 ::mlir::StringAttr getSymNameAttr() {
253 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
254 }
255
256 ::llvm::StringRef getSymName();
257 ::mlir::UnitAttr getConstantAttr() {
258 return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().constant);
259 }
260
261 bool getConstant();
262 ::mlir::TypeAttr getTypeAttr() {
263 return ::llvm::cast<::mlir::TypeAttr>(getProperties().type);
264 }
265
266 ::mlir::Type getType();
267 ::mlir::Attribute getInitialValueAttr() {
268 return ::llvm::dyn_cast_or_null<::mlir::Attribute>(getProperties().initial_value);
269 }
270
271 ::mlir::Attribute getInitialValue();
272 void setSymNameAttr(::mlir::StringAttr attr) {
273 getProperties().sym_name = attr;
274 }
275
276 void setSymName(::llvm::StringRef attrValue);
277 void setConstantAttr(::mlir::UnitAttr attr) {
278 getProperties().constant = attr;
279 }
280
281 void setConstant(bool attrValue);
282 void setTypeAttr(::mlir::TypeAttr attr) {
283 getProperties().type = attr;
284 }
285
286 void setType(::mlir::Type attrValue);
287 void setInitialValueAttr(::mlir::Attribute attr) {
288 getProperties().initial_value = attr;
289 }
290
291 ::mlir::Attribute removeConstantAttr() {
292 auto &attr = getProperties().constant;
293 attr = {};
294 return attr;
295 }
296
297 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, /*optional*/::mlir::UnitAttr constant, ::mlir::TypeAttr type, ::mlir::Attribute initial_value = nullptr);
298 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, /*optional*/::mlir::UnitAttr constant, ::mlir::TypeAttr type, ::mlir::Attribute initial_value = nullptr);
299 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, /*optional*/bool constant, ::mlir::Type type, ::mlir::Attribute initial_value);
300 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, /*optional*/bool constant, ::mlir::Type type, ::mlir::Attribute initial_value);
301 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
302 static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
303 ::llvm::LogicalResult verifyInvariantsImpl();
304 ::llvm::LogicalResult verifyInvariants();
305 ::llvm::LogicalResult verify();
306 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
307 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
308 void print(::mlir::OpAsmPrinter &_odsPrinter);
309private:
310 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
311 return getAttributeNameForIndex((*this)->getName(), index);
312 }
313
314 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
315 assert(index < 4 && "invalid attribute index");
316 assert(name.getStringRef() == getOperationName() && "invalid operation name");
317 assert(name.isRegistered() && "Operation isn't registered, missing a "
318 "dependent dialect loading?");
319 return name.getAttributeNames()[index];
320 }
321
322public:
323 inline bool isConstant() { return getConstant(); }
324
325 private:
326 static ::mlir::ParseResult parseGlobalInitialValue(::mlir::OpAsmParser &parser,
327 ::mlir::Attribute &initialValue, ::mlir::TypeAttr typeAttr
328 );
329
330 static void printGlobalInitialValue(::mlir::OpAsmPrinter &printer, GlobalDefOp op,
331 ::mlir::Attribute initialValue, ::mlir::TypeAttr typeAttr
332 );
333};
334} // namespace global
335} // namespace llzk
336MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::global::GlobalDefOp)
337
338namespace llzk {
339namespace global {
340
341//===----------------------------------------------------------------------===//
342// ::llzk::global::GlobalReadOp declarations
343//===----------------------------------------------------------------------===//
344
345namespace detail {
347public:
348 struct Properties {
349 using name_refTy = ::mlir::SymbolRefAttr;
351
352 auto getNameRef() {
353 auto &propStorage = this->name_ref;
354 return ::llvm::cast<::mlir::SymbolRefAttr>(propStorage);
355 }
356 void setNameRef(const ::mlir::SymbolRefAttr &propValue) {
357 this->name_ref = propValue;
358 }
359 bool operator==(const Properties &rhs) const {
360 return
361 rhs.name_ref == this->name_ref &&
362 true;
363 }
364 bool operator!=(const Properties &rhs) const {
365 return !(*this == rhs);
366 }
367 };
368protected:
369 ::mlir::DictionaryAttr odsAttrs;
370 ::std::optional<::mlir::OperationName> odsOpName;
372 ::mlir::RegionRange odsRegions;
373public:
374 GlobalReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
375 odsOpName.emplace("global.read", odsAttrs.getContext());
376 }
377
379
380 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
381 return {index, 1};
382 }
383
385 return properties;
386 }
387
388 ::mlir::DictionaryAttr getAttributes() {
389 return odsAttrs;
390 }
391
392 ::mlir::SymbolRefAttr getNameRefAttr() {
393 auto attr = ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().name_ref);
394 return attr;
395 }
396
397 ::mlir::SymbolRefAttr getNameRef();
398};
399} // namespace detail
400template <typename RangeT>
402 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
404public:
405 GlobalReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
406
407 GlobalReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : GlobalReadOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
408
409 GlobalReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : GlobalReadOpGenericAdaptor(values, attrs, Properties{}, {}) {}
410
411 GlobalReadOpGenericAdaptor(RangeT values, const GlobalReadOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
412
413 template <typename LateInst = GlobalReadOp, typename = std::enable_if_t<std::is_same_v<LateInst, GlobalReadOp>>>
414 GlobalReadOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
415
416 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
417 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
418 }
419
420 RangeT getODSOperands(unsigned index) {
421 auto valueRange = getODSOperandIndexAndLength(index);
422 return {std::next(odsOperands.begin(), valueRange.first),
423 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
424 }
425
426 RangeT getOperands() {
427 return odsOperands;
428 }
429
430private:
431 RangeT odsOperands;
432};
433class GlobalReadOpAdaptor : public GlobalReadOpGenericAdaptor<::mlir::ValueRange> {
434public:
437
438 ::llvm::LogicalResult verify(::mlir::Location loc);
439};
440class GlobalReadOp : public ::mlir::Op<GlobalReadOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::llzk::global::GlobalRefOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait> {
441public:
442 using Op::Op;
443 using Op::print;
445 template <typename RangeT>
449 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
450 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("name_ref")};
451 return ::llvm::ArrayRef(attrNames);
452 }
453
454 ::mlir::StringAttr getNameRefAttrName() {
455 return getAttributeNameForIndex(0);
456 }
457
458 static ::mlir::StringAttr getNameRefAttrName(::mlir::OperationName name) {
459 return getAttributeNameForIndex(name, 0);
460 }
461
462 static constexpr ::llvm::StringLiteral getOperationName() {
463 return ::llvm::StringLiteral("global.read");
464 }
465
466 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
467 return {index, 1};
468 }
469
470 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
471 auto valueRange = getODSOperandIndexAndLength(index);
472 return {std::next(getOperation()->operand_begin(), valueRange.first),
473 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
474 }
475
476 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
477 return {index, 1};
478 }
479
480 ::mlir::Operation::result_range getODSResults(unsigned index) {
481 auto valueRange = getODSResultIndexAndLength(index);
482 return {std::next(getOperation()->result_begin(), valueRange.first),
483 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
484 }
485
486 ::mlir::TypedValue<::mlir::Type> getVal() {
487 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
488 }
489
490 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
491 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
492 static llvm::hash_code computePropertiesHash(const Properties &prop);
493 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
494 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
495 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
496 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
497 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
498 void writeProperties(::mlir::DialectBytecodeWriter &writer);
499 ::mlir::SymbolRefAttr getNameRefAttr() {
500 return ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().name_ref);
501 }
502
503 ::mlir::SymbolRefAttr getNameRef();
504 void setNameRefAttr(::mlir::SymbolRefAttr attr) {
505 getProperties().name_ref = attr;
506 }
507
508 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::SymbolRefAttr name_ref);
509 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr name_ref);
510 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
511 ::llvm::LogicalResult verifyInvariantsImpl();
512 ::llvm::LogicalResult verifyInvariants();
513 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
514 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
515 void print(::mlir::OpAsmPrinter &_odsPrinter);
516private:
517 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
518 return getAttributeNameForIndex((*this)->getName(), index);
519 }
520
521 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
522 assert(index < 1 && "invalid attribute index");
523 assert(name.getStringRef() == getOperationName() && "invalid operation name");
524 assert(name.isRegistered() && "Operation isn't registered, missing a "
525 "dependent dialect loading?");
526 return name.getAttributeNames()[index];
527 }
528
529public:
531 inline ::mlir::FailureOr<SymbolLookupResult<GlobalDefOp>> getGlobalDefOp(::mlir::SymbolTableCollection &tables) {
532 return ::llvm::cast<GlobalRefOpInterface>(getOperation()).getGlobalDefOp(tables);
533 }
534};
535} // namespace global
536} // namespace llzk
537MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::global::GlobalReadOp)
538
539namespace llzk {
540namespace global {
541
542//===----------------------------------------------------------------------===//
543// ::llzk::global::GlobalWriteOp declarations
544//===----------------------------------------------------------------------===//
545
546namespace detail {
548public:
549 struct Properties {
550 using name_refTy = ::mlir::SymbolRefAttr;
552
553 auto getNameRef() {
554 auto &propStorage = this->name_ref;
555 return ::llvm::cast<::mlir::SymbolRefAttr>(propStorage);
556 }
557 void setNameRef(const ::mlir::SymbolRefAttr &propValue) {
558 this->name_ref = propValue;
559 }
560 bool operator==(const Properties &rhs) const {
561 return
562 rhs.name_ref == this->name_ref &&
563 true;
564 }
565 bool operator!=(const Properties &rhs) const {
566 return !(*this == rhs);
567 }
568 };
569protected:
570 ::mlir::DictionaryAttr odsAttrs;
571 ::std::optional<::mlir::OperationName> odsOpName;
573 ::mlir::RegionRange odsRegions;
574public:
575 GlobalWriteOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
576 odsOpName.emplace("global.write", odsAttrs.getContext());
577 }
578
580
581 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
582 return {index, 1};
583 }
584
586 return properties;
587 }
588
589 ::mlir::DictionaryAttr getAttributes() {
590 return odsAttrs;
591 }
592
593 ::mlir::SymbolRefAttr getNameRefAttr() {
594 auto attr = ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().name_ref);
595 return attr;
596 }
597
598 ::mlir::SymbolRefAttr getNameRef();
599};
600} // namespace detail
601template <typename RangeT>
603 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
605public:
606 GlobalWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
607
608 GlobalWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : GlobalWriteOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
609
610 GlobalWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : GlobalWriteOpGenericAdaptor(values, attrs, Properties{}, {}) {}
611
612 GlobalWriteOpGenericAdaptor(RangeT values, const GlobalWriteOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
613
614 template <typename LateInst = GlobalWriteOp, typename = std::enable_if_t<std::is_same_v<LateInst, GlobalWriteOp>>>
615 GlobalWriteOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
616
617 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
618 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
619 }
620
621 RangeT getODSOperands(unsigned index) {
622 auto valueRange = getODSOperandIndexAndLength(index);
623 return {std::next(odsOperands.begin(), valueRange.first),
624 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
625 }
626
627 ValueT getVal() {
628 return (*getODSOperands(0).begin());
629 }
630
631 RangeT getOperands() {
632 return odsOperands;
633 }
634
635private:
636 RangeT odsOperands;
637};
638class GlobalWriteOpAdaptor : public GlobalWriteOpGenericAdaptor<::mlir::ValueRange> {
639public:
642
643 ::llvm::LogicalResult verify(::mlir::Location loc);
644};
645class GlobalWriteOp : public ::mlir::Op<GlobalWriteOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::llzk::function::WitnessGen, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::llzk::global::GlobalRefOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait> {
646public:
647 using Op::Op;
648 using Op::print;
650 template <typename RangeT>
654 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
655 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("name_ref")};
656 return ::llvm::ArrayRef(attrNames);
657 }
658
659 ::mlir::StringAttr getNameRefAttrName() {
660 return getAttributeNameForIndex(0);
661 }
662
663 static ::mlir::StringAttr getNameRefAttrName(::mlir::OperationName name) {
664 return getAttributeNameForIndex(name, 0);
665 }
666
667 static constexpr ::llvm::StringLiteral getOperationName() {
668 return ::llvm::StringLiteral("global.write");
669 }
670
671 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
672 return {index, 1};
673 }
674
675 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
676 auto valueRange = getODSOperandIndexAndLength(index);
677 return {std::next(getOperation()->operand_begin(), valueRange.first),
678 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
679 }
680
681 ::mlir::TypedValue<::mlir::Type> getVal() {
682 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
683 }
684
685 ::mlir::OpOperand &getValMutable() {
686 auto range = getODSOperandIndexAndLength(0);
687 return getOperation()->getOpOperand(range.first);
688 }
689
690 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
691 return {index, 1};
692 }
693
694 ::mlir::Operation::result_range getODSResults(unsigned index) {
695 auto valueRange = getODSResultIndexAndLength(index);
696 return {std::next(getOperation()->result_begin(), valueRange.first),
697 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
698 }
699
700 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
701 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
702 static llvm::hash_code computePropertiesHash(const Properties &prop);
703 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
704 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
705 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
706 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
707 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
708 void writeProperties(::mlir::DialectBytecodeWriter &writer);
709 ::mlir::SymbolRefAttr getNameRefAttr() {
710 return ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().name_ref);
711 }
712
713 ::mlir::SymbolRefAttr getNameRef();
714 void setNameRefAttr(::mlir::SymbolRefAttr attr) {
715 getProperties().name_ref = attr;
716 }
717
718 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::SymbolRefAttr name_ref, ::mlir::Value val);
719 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr name_ref, ::mlir::Value val);
720 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
721 ::llvm::LogicalResult verifyInvariantsImpl();
722 ::llvm::LogicalResult verifyInvariants();
723 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
724 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
725 void print(::mlir::OpAsmPrinter &_odsPrinter);
726private:
727 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
728 return getAttributeNameForIndex((*this)->getName(), index);
729 }
730
731 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
732 assert(index < 1 && "invalid attribute index");
733 assert(name.getStringRef() == getOperationName() && "invalid operation name");
734 assert(name.isRegistered() && "Operation isn't registered, missing a "
735 "dependent dialect loading?");
736 return name.getAttributeNames()[index];
737 }
738
739public:
741 inline ::mlir::FailureOr<SymbolLookupResult<GlobalDefOp>> getGlobalDefOp(::mlir::SymbolTableCollection &tables) {
742 return ::llvm::cast<GlobalRefOpInterface>(getOperation()).getGlobalDefOp(tables);
743 }
744};
745} // namespace global
746} // namespace llzk
747MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::global::GlobalWriteOp)
748
749
750#endif // GET_OP_CLASSES
751
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:157
GlobalDefOpAdaptor(GlobalDefOp op)
Definition Ops.cpp.inc:155
GlobalDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:138
GlobalDefOpGenericAdaptor(RangeT values, const GlobalDefOpGenericAdaptorBase &base)
Definition Ops.h.inc:144
GlobalDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:140
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:149
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:153
GlobalDefOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:147
GlobalDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:142
GlobalDefOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:138
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:336
void setInitialValueAttr(::mlir::Attribute attr)
Definition Ops.h.inc:287
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
Definition Ops.cpp.inc:489
GlobalDefOpAdaptor Adaptor
Definition Ops.h.inc:177
FoldAdaptor::Properties Properties
Definition Ops.h.inc:181
::mlir::Attribute getInitialValue()
Definition Ops.cpp.inc:406
void setType(::mlir::Type attrValue)
Definition Ops.cpp.inc:423
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:207
::mlir::Attribute removeConstantAttr()
Definition Ops.h.inc:291
::mlir::Type getType()
Definition Ops.cpp.inc:401
::mlir::StringAttr getConstantAttrName(::mlir::OperationName name)
Definition Ops.h.inc:191
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:233
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:363
void setTypeAttr(::mlir::TypeAttr attr)
Definition Ops.h.inc:282
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:289
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:517
::mlir::TypeAttr getTypeAttr()
Definition Ops.h.inc:262
::llvm::StringRef getSymName()
Definition Ops.cpp.inc:389
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:223
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:180
::mlir::StringAttr getSymNameAttrName()
Definition Ops.h.inc:203
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:244
::mlir::Attribute getInitialValueAttr()
Definition Ops.h.inc:267
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:77
GlobalDefOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:179
::mlir::StringAttr getSymNameAttr()
Definition Ops.h.inc:252
::mlir::StringAttr getInitialValueAttrName(::mlir::OperationName name)
Definition Ops.h.inc:199
::mlir::UnitAttr getConstantAttr()
Definition Ops.h.inc:257
void setSymName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:411
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:379
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:558
::mlir::StringAttr getTypeAttrName(::mlir::OperationName name)
Definition Ops.h.inc:215
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:495
::mlir::StringAttr getTypeAttrName()
Definition Ops.h.inc:211
void setConstant(bool attrValue)
Definition Ops.cpp.inc:415
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:179
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:219
void setConstantAttr(::mlir::UnitAttr attr)
Definition Ops.h.inc:277
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:326
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::UnitAttr constant, ::mlir::TypeAttr type, ::mlir::Attribute initial_value=nullptr)
Definition Ops.cpp.inc:427
::mlir::StringAttr getInitialValueAttrName()
Definition Ops.h.inc:195
::llvm::LogicalResult verify()
Definition Ops.cpp:170
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:281
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:237
::mlir::StringAttr getConstantAttrName()
Definition Ops.h.inc:187
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:182
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:227
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:304
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:523
void setSymNameAttr(::mlir::StringAttr attr)
Definition Ops.h.inc:272
GlobalReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:405
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:610
GlobalReadOpAdaptor(GlobalReadOp op)
Definition Ops.cpp.inc:608
GlobalReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:409
GlobalReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:407
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:416
GlobalReadOpGenericAdaptor(RangeT values, const GlobalReadOpGenericAdaptorBase &base)
Definition Ops.h.inc:411
GlobalReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:405
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:420
GlobalReadOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:414
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::SymbolRefAttr name_ref)
Definition Ops.cpp.inc:706
::mlir::StringAttr getNameRefAttrName()
Definition Ops.h.inc:454
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:696
FoldAdaptor::Properties Properties
Definition Ops.h.inc:448
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:462
GlobalReadOpAdaptor Adaptor
Definition Ops.h.inc:444
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:642
GlobalReadOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:446
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:466
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:480
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:753
inline ::mlir::FailureOr< SymbolLookupResult< GlobalDefOp > > getGlobalDefOp(::mlir::SymbolTableCollection &tables)
Gets the definition for the global referenced in this op.
Definition Ops.h.inc:531
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:449
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:788
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:212
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:658
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:447
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:757
::mlir::StringAttr getNameRefAttrName(::mlir::OperationName name)
Definition Ops.h.inc:458
void setNameRefAttr(::mlir::SymbolRefAttr attr)
Definition Ops.h.inc:504
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:663
::mlir::SymbolRefAttr getNameRefAttr()
Definition Ops.h.inc:499
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:669
::mlir::TypedValue<::mlir::Type > getVal()
Definition Ops.h.inc:486
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:476
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:619
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:680
::mlir::SymbolRefAttr getNameRef()
Definition Ops.cpp.inc:701
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:470
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:689
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:676
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:735
GlobalWriteOpAdaptor(GlobalWriteOp op)
Definition Ops.cpp.inc:825
GlobalWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:606
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:827
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:617
GlobalWriteOpGenericAdaptor(RangeT values, const GlobalWriteOpGenericAdaptorBase &base)
Definition Ops.h.inc:612
GlobalWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:608
GlobalWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:606
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:621
GlobalWriteOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:615
GlobalWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:610
::mlir::OpOperand & getValMutable()
Definition Ops.h.inc:685
::mlir::TypedValue<::mlir::Type > getVal()
Definition Ops.h.inc:681
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:875
::mlir::StringAttr getNameRefAttrName()
Definition Ops.h.inc:659
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:220
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:667
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:975
::mlir::SymbolRefAttr getNameRefAttr()
Definition Ops.h.inc:709
::mlir::StringAttr getNameRefAttrName(::mlir::OperationName name)
Definition Ops.h.inc:663
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:675
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:893
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1016
GlobalWriteOpAdaptor Adaptor
Definition Ops.h.inc:649
inline ::mlir::FailureOr< SymbolLookupResult< GlobalDefOp > > getGlobalDefOp(::mlir::SymbolTableCollection &tables)
Gets the definition for the global referenced in this op.
Definition Ops.h.inc:741
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:671
FoldAdaptor::Properties Properties
Definition Ops.h.inc:653
void setNameRefAttr(::mlir::SymbolRefAttr attr)
Definition Ops.h.inc:714
GlobalWriteOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:651
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:971
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:859
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:897
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:694
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::SymbolRefAttr name_ref, ::mlir::Value val)
Definition Ops.cpp.inc:923
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:652
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:886
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:690
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:913
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:880
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:953
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:654
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:836
::mlir::SymbolRefAttr getNameRef()
Definition Ops.cpp.inc:918
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:906
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:103
GlobalDefOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:97
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:93
GlobalReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:374
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:370
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:380
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:581
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:571
GlobalWriteOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:575
void setInitialValue(const ::mlir::Attribute &propValue)
Definition Ops.h.inc:56
void setType(const ::mlir::TypeAttr &propValue)
Definition Ops.h.inc:76
void setSymName(const ::mlir::StringAttr &propValue)
Definition Ops.h.inc:66
void setConstant(const ::mlir::UnitAttr &propValue)
Definition Ops.h.inc:46
void setNameRef(const ::mlir::SymbolRefAttr &propValue)
Definition Ops.h.inc:356
void setNameRef(const ::mlir::SymbolRefAttr &propValue)
Definition Ops.h.inc:557