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 static ::mlir::ParseResult parseGlobalInitialValue(::mlir::OpAsmParser &parser,
324 ::mlir::Attribute &initialValue, ::mlir::TypeAttr typeAttr
325 );
326 static void printGlobalInitialValue(::mlir::OpAsmPrinter &printer, GlobalDefOp op,
327 ::mlir::Attribute initialValue, ::mlir::TypeAttr typeAttr
328 );
329
330 inline bool isConstant() { return getConstant(); }
331};
332} // namespace global
333} // namespace llzk
334MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::global::GlobalDefOp)
335
336namespace llzk {
337namespace global {
338
339//===----------------------------------------------------------------------===//
340// ::llzk::global::GlobalReadOp declarations
341//===----------------------------------------------------------------------===//
342
343namespace detail {
345public:
346 struct Properties {
347 using name_refTy = ::mlir::SymbolRefAttr;
349
350 auto getNameRef() {
351 auto &propStorage = this->name_ref;
352 return ::llvm::cast<::mlir::SymbolRefAttr>(propStorage);
353 }
354 void setNameRef(const ::mlir::SymbolRefAttr &propValue) {
355 this->name_ref = propValue;
356 }
357 bool operator==(const Properties &rhs) const {
358 return
359 rhs.name_ref == this->name_ref &&
360 true;
361 }
362 bool operator!=(const Properties &rhs) const {
363 return !(*this == rhs);
364 }
365 };
366protected:
367 ::mlir::DictionaryAttr odsAttrs;
368 ::std::optional<::mlir::OperationName> odsOpName;
370 ::mlir::RegionRange odsRegions;
371public:
372 GlobalReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
373 odsOpName.emplace("global.read", odsAttrs.getContext());
374 }
375
377
378 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
379 return {index, 1};
380 }
381
383 return properties;
384 }
385
386 ::mlir::DictionaryAttr getAttributes() {
387 return odsAttrs;
388 }
389
390 ::mlir::SymbolRefAttr getNameRefAttr() {
391 auto attr = ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().name_ref);
392 return attr;
393 }
394
395 ::mlir::SymbolRefAttr getNameRef();
396};
397} // namespace detail
398template <typename RangeT>
400 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
402public:
403 GlobalReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
404
405 GlobalReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : GlobalReadOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
406
407 GlobalReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : GlobalReadOpGenericAdaptor(values, attrs, Properties{}, {}) {}
408
409 GlobalReadOpGenericAdaptor(RangeT values, const GlobalReadOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
410
411 template <typename LateInst = GlobalReadOp, typename = std::enable_if_t<std::is_same_v<LateInst, GlobalReadOp>>>
412 GlobalReadOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
413
414 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
415 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
416 }
417
418 RangeT getODSOperands(unsigned index) {
419 auto valueRange = getODSOperandIndexAndLength(index);
420 return {std::next(odsOperands.begin(), valueRange.first),
421 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
422 }
423
424 RangeT getOperands() {
425 return odsOperands;
426 }
427
428private:
429 RangeT odsOperands;
430};
431class GlobalReadOpAdaptor : public GlobalReadOpGenericAdaptor<::mlir::ValueRange> {
432public:
435
436 ::llvm::LogicalResult verify(::mlir::Location loc);
437};
438class 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> {
439public:
440 using Op::Op;
441 using Op::print;
443 template <typename RangeT>
447 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
448 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("name_ref")};
449 return ::llvm::ArrayRef(attrNames);
450 }
451
452 ::mlir::StringAttr getNameRefAttrName() {
453 return getAttributeNameForIndex(0);
454 }
455
456 static ::mlir::StringAttr getNameRefAttrName(::mlir::OperationName name) {
457 return getAttributeNameForIndex(name, 0);
458 }
459
460 static constexpr ::llvm::StringLiteral getOperationName() {
461 return ::llvm::StringLiteral("global.read");
462 }
463
464 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
465 return {index, 1};
466 }
467
468 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
469 auto valueRange = getODSOperandIndexAndLength(index);
470 return {std::next(getOperation()->operand_begin(), valueRange.first),
471 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
472 }
473
474 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
475 return {index, 1};
476 }
477
478 ::mlir::Operation::result_range getODSResults(unsigned index) {
479 auto valueRange = getODSResultIndexAndLength(index);
480 return {std::next(getOperation()->result_begin(), valueRange.first),
481 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
482 }
483
484 ::mlir::TypedValue<::mlir::Type> getVal() {
485 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
486 }
487
488 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
489 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
490 static llvm::hash_code computePropertiesHash(const Properties &prop);
491 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
492 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
493 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
494 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
495 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
496 void writeProperties(::mlir::DialectBytecodeWriter &writer);
497 ::mlir::SymbolRefAttr getNameRefAttr() {
498 return ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().name_ref);
499 }
500
501 ::mlir::SymbolRefAttr getNameRef();
502 void setNameRefAttr(::mlir::SymbolRefAttr attr) {
503 getProperties().name_ref = attr;
504 }
505
506 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::SymbolRefAttr name_ref);
507 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr name_ref);
508 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
509 ::llvm::LogicalResult verifyInvariantsImpl();
510 ::llvm::LogicalResult verifyInvariants();
511 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
512 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
513 void print(::mlir::OpAsmPrinter &_odsPrinter);
514private:
515 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
516 return getAttributeNameForIndex((*this)->getName(), index);
517 }
518
519 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
520 assert(index < 1 && "invalid attribute index");
521 assert(name.getStringRef() == getOperationName() && "invalid operation name");
522 assert(name.isRegistered() && "Operation isn't registered, missing a "
523 "dependent dialect loading?");
524 return name.getAttributeNames()[index];
525 }
526
527public:
529 inline ::mlir::FailureOr<SymbolLookupResult<GlobalDefOp>> getGlobalDefOp(::mlir::SymbolTableCollection &tables) {
530 return ::llvm::cast<GlobalRefOpInterface>(getOperation()).getGlobalDefOp(tables);
531 }
532};
533} // namespace global
534} // namespace llzk
535MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::global::GlobalReadOp)
536
537namespace llzk {
538namespace global {
539
540//===----------------------------------------------------------------------===//
541// ::llzk::global::GlobalWriteOp declarations
542//===----------------------------------------------------------------------===//
543
544namespace detail {
546public:
547 struct Properties {
548 using name_refTy = ::mlir::SymbolRefAttr;
550
551 auto getNameRef() {
552 auto &propStorage = this->name_ref;
553 return ::llvm::cast<::mlir::SymbolRefAttr>(propStorage);
554 }
555 void setNameRef(const ::mlir::SymbolRefAttr &propValue) {
556 this->name_ref = propValue;
557 }
558 bool operator==(const Properties &rhs) const {
559 return
560 rhs.name_ref == this->name_ref &&
561 true;
562 }
563 bool operator!=(const Properties &rhs) const {
564 return !(*this == rhs);
565 }
566 };
567protected:
568 ::mlir::DictionaryAttr odsAttrs;
569 ::std::optional<::mlir::OperationName> odsOpName;
571 ::mlir::RegionRange odsRegions;
572public:
573 GlobalWriteOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
574 odsOpName.emplace("global.write", odsAttrs.getContext());
575 }
576
578
579 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
580 return {index, 1};
581 }
582
584 return properties;
585 }
586
587 ::mlir::DictionaryAttr getAttributes() {
588 return odsAttrs;
589 }
590
591 ::mlir::SymbolRefAttr getNameRefAttr() {
592 auto attr = ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().name_ref);
593 return attr;
594 }
595
596 ::mlir::SymbolRefAttr getNameRef();
597};
598} // namespace detail
599template <typename RangeT>
601 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
603public:
604 GlobalWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
605
606 GlobalWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : GlobalWriteOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
607
608 GlobalWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : GlobalWriteOpGenericAdaptor(values, attrs, Properties{}, {}) {}
609
610 GlobalWriteOpGenericAdaptor(RangeT values, const GlobalWriteOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
611
612 template <typename LateInst = GlobalWriteOp, typename = std::enable_if_t<std::is_same_v<LateInst, GlobalWriteOp>>>
613 GlobalWriteOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
614
615 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
616 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
617 }
618
619 RangeT getODSOperands(unsigned index) {
620 auto valueRange = getODSOperandIndexAndLength(index);
621 return {std::next(odsOperands.begin(), valueRange.first),
622 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
623 }
624
625 ValueT getVal() {
626 return (*getODSOperands(0).begin());
627 }
628
629 RangeT getOperands() {
630 return odsOperands;
631 }
632
633private:
634 RangeT odsOperands;
635};
636class GlobalWriteOpAdaptor : public GlobalWriteOpGenericAdaptor<::mlir::ValueRange> {
637public:
640
641 ::llvm::LogicalResult verify(::mlir::Location loc);
642};
643class 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> {
644public:
645 using Op::Op;
646 using Op::print;
648 template <typename RangeT>
652 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
653 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("name_ref")};
654 return ::llvm::ArrayRef(attrNames);
655 }
656
657 ::mlir::StringAttr getNameRefAttrName() {
658 return getAttributeNameForIndex(0);
659 }
660
661 static ::mlir::StringAttr getNameRefAttrName(::mlir::OperationName name) {
662 return getAttributeNameForIndex(name, 0);
663 }
664
665 static constexpr ::llvm::StringLiteral getOperationName() {
666 return ::llvm::StringLiteral("global.write");
667 }
668
669 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
670 return {index, 1};
671 }
672
673 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
674 auto valueRange = getODSOperandIndexAndLength(index);
675 return {std::next(getOperation()->operand_begin(), valueRange.first),
676 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
677 }
678
679 ::mlir::TypedValue<::mlir::Type> getVal() {
680 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
681 }
682
683 ::mlir::OpOperand &getValMutable() {
684 auto range = getODSOperandIndexAndLength(0);
685 return getOperation()->getOpOperand(range.first);
686 }
687
688 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
689 return {index, 1};
690 }
691
692 ::mlir::Operation::result_range getODSResults(unsigned index) {
693 auto valueRange = getODSResultIndexAndLength(index);
694 return {std::next(getOperation()->result_begin(), valueRange.first),
695 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
696 }
697
698 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
699 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
700 static llvm::hash_code computePropertiesHash(const Properties &prop);
701 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
702 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
703 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
704 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
705 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
706 void writeProperties(::mlir::DialectBytecodeWriter &writer);
707 ::mlir::SymbolRefAttr getNameRefAttr() {
708 return ::llvm::cast<::mlir::SymbolRefAttr>(getProperties().name_ref);
709 }
710
711 ::mlir::SymbolRefAttr getNameRef();
712 void setNameRefAttr(::mlir::SymbolRefAttr attr) {
713 getProperties().name_ref = attr;
714 }
715
716 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::SymbolRefAttr name_ref, ::mlir::Value val);
717 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::SymbolRefAttr name_ref, ::mlir::Value val);
718 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
719 ::llvm::LogicalResult verifyInvariantsImpl();
720 ::llvm::LogicalResult verifyInvariants();
721 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
722 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
723 void print(::mlir::OpAsmPrinter &_odsPrinter);
724private:
725 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
726 return getAttributeNameForIndex((*this)->getName(), index);
727 }
728
729 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
730 assert(index < 1 && "invalid attribute index");
731 assert(name.getStringRef() == getOperationName() && "invalid operation name");
732 assert(name.isRegistered() && "Operation isn't registered, missing a "
733 "dependent dialect loading?");
734 return name.getAttributeNames()[index];
735 }
736
737public:
739 inline ::mlir::FailureOr<SymbolLookupResult<GlobalDefOp>> getGlobalDefOp(::mlir::SymbolTableCollection &tables) {
740 return ::llvm::cast<GlobalRefOpInterface>(getOperation()).getGlobalDefOp(tables);
741 }
742};
743} // namespace global
744} // namespace llzk
745MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::global::GlobalWriteOp)
746
747
748#endif // GET_OP_CLASSES
749
MlirStringRef name
Definition Poly.cpp:48
::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
::mlir::ParseResult parseGlobalInitialValue(::mlir::OpAsmParser &parser, ::mlir::Attribute &initialValue, ::mlir::TypeAttr typeAttr)
Definition Ops.cpp:36
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:289
static void printGlobalInitialValue(::mlir::OpAsmPrinter &printer, GlobalDefOp op, ::mlir::Attribute initialValue, ::mlir::TypeAttr typeAttr)
Definition Ops.cpp:62
::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:403
::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:407
GlobalReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:405
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:414
GlobalReadOpGenericAdaptor(RangeT values, const GlobalReadOpGenericAdaptorBase &base)
Definition Ops.h.inc:409
GlobalReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:403
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:418
GlobalReadOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:412
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:452
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:696
FoldAdaptor::Properties Properties
Definition Ops.h.inc:446
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:460
GlobalReadOpAdaptor Adaptor
Definition Ops.h.inc:442
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:642
GlobalReadOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:444
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:464
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:478
::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:529
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:447
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:445
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:757
::mlir::StringAttr getNameRefAttrName(::mlir::OperationName name)
Definition Ops.h.inc:456
void setNameRefAttr(::mlir::SymbolRefAttr attr)
Definition Ops.h.inc:502
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:497
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:484
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:474
::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:468
::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:604
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:827
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:615
GlobalWriteOpGenericAdaptor(RangeT values, const GlobalWriteOpGenericAdaptorBase &base)
Definition Ops.h.inc:610
GlobalWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:606
GlobalWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:604
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:619
GlobalWriteOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:613
GlobalWriteOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:608
::mlir::OpOperand & getValMutable()
Definition Ops.h.inc:683
::mlir::TypedValue<::mlir::Type > getVal()
Definition Ops.h.inc:679
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:875
::mlir::StringAttr getNameRefAttrName()
Definition Ops.h.inc:657
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:220
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:665
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:975
::mlir::SymbolRefAttr getNameRefAttr()
Definition Ops.h.inc:707
::mlir::StringAttr getNameRefAttrName(::mlir::OperationName name)
Definition Ops.h.inc:661
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:673
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:647
inline ::mlir::FailureOr< SymbolLookupResult< GlobalDefOp > > getGlobalDefOp(::mlir::SymbolTableCollection &tables)
Gets the definition for the global referenced in this op.
Definition Ops.h.inc:739
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:669
FoldAdaptor::Properties Properties
Definition Ops.h.inc:651
void setNameRefAttr(::mlir::SymbolRefAttr attr)
Definition Ops.h.inc:712
GlobalWriteOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:649
::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:692
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:650
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:688
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:652
::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:372
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:368
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:378
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:579
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:569
GlobalWriteOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:573
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:354
void setNameRef(const ::mlir::SymbolRefAttr &propValue)
Definition Ops.h.inc:555