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