LLZK 2.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 polymorphic {
12class ApplyMapOp;
13} // namespace polymorphic
14} // namespace llzk
15namespace llzk {
16namespace polymorphic {
17class ConstReadOp;
18} // namespace polymorphic
19} // namespace llzk
20namespace llzk {
21namespace polymorphic {
22class TemplateExprOp;
23} // namespace polymorphic
24} // namespace llzk
25namespace llzk {
26namespace polymorphic {
27class TemplateOp;
28} // namespace polymorphic
29} // namespace llzk
30namespace llzk {
31namespace polymorphic {
32class TemplateParamOp;
33} // namespace polymorphic
34} // namespace llzk
35namespace llzk {
36namespace polymorphic {
37class UnifiableCastOp;
38} // namespace polymorphic
39} // namespace llzk
40namespace llzk {
41namespace polymorphic {
42class YieldOp;
43} // namespace polymorphic
44} // namespace llzk
45#ifdef GET_OP_CLASSES
46#undef GET_OP_CLASSES
47
48namespace llzk {
49namespace polymorphic {
50
51//===----------------------------------------------------------------------===//
52// ::llzk::polymorphic::ApplyMapOp declarations
53//===----------------------------------------------------------------------===//
54
55namespace detail {
57public:
58 struct Properties {
59 using mapTy = ::mlir::AffineMapAttr;
61
62 auto getMap() {
63 auto &propStorage = this->map;
64 return ::llvm::cast<::mlir::AffineMapAttr>(propStorage);
65 }
66 void setMap(const ::mlir::AffineMapAttr &propValue) {
67 this->map = propValue;
68 }
69 using numDimsTy = ::mlir::IntegerAttr;
71
72 auto getNumDims() {
73 auto &propStorage = this->numDims;
74 return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
75 }
76 void setNumDims(const ::mlir::IntegerAttr &propValue) {
77 this->numDims = propValue;
78 }
79 bool operator==(const Properties &rhs) const {
80 return
81 rhs.map == this->map &&
82 rhs.numDims == this->numDims &&
83 true;
84 }
85 bool operator!=(const Properties &rhs) const {
86 return !(*this == rhs);
87 }
88 };
89protected:
90 ::mlir::DictionaryAttr odsAttrs;
91 ::std::optional<::mlir::OperationName> odsOpName;
93 ::mlir::RegionRange odsRegions;
94public:
95 ApplyMapOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
96 odsOpName.emplace("poly.applymap", odsAttrs.getContext());
97 }
98
100
101 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
103 return properties;
104 }
105
106 ::mlir::DictionaryAttr getAttributes() {
107 return odsAttrs;
108 }
109
110 ::mlir::AffineMapAttr getMapAttr() {
111 auto attr = ::llvm::cast<::mlir::AffineMapAttr>(getProperties().map);
112 return attr;
113 }
114
115 ::mlir::AffineMap getMap();
116 ::mlir::IntegerAttr getNumDimsAttr() {
117 auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().numDims);
118 return attr;
119 }
120
121 ::llvm::APInt getNumDims();
122};
123} // namespace detail
124template <typename RangeT>
126 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
128public:
129 ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
130
131 ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : ApplyMapOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
132
133 ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ApplyMapOpGenericAdaptor(values, attrs, Properties{}, {}) {}
134
135 ApplyMapOpGenericAdaptor(RangeT values, const ApplyMapOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
136
137 template <typename LateInst = ApplyMapOp, typename = std::enable_if_t<std::is_same_v<LateInst, ApplyMapOp>>>
138 ApplyMapOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
139
140 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
141 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
142 }
143
144 RangeT getODSOperands(unsigned index) {
145 auto valueRange = getODSOperandIndexAndLength(index);
146 return {std::next(odsOperands.begin(), valueRange.first),
147 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
148 }
149
150 RangeT getMapOperands() {
151 return getODSOperands(0);
152 }
153
154 RangeT getOperands() {
155 return odsOperands;
156 }
157
158private:
159 RangeT odsOperands;
160};
161class ApplyMapOpAdaptor : public ApplyMapOpGenericAdaptor<::mlir::ValueRange> {
162public:
165
166 ::llvm::LogicalResult verify(::mlir::Location loc);
167};
168class ApplyMapOp : public ::mlir::Op<ApplyMapOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IndexType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
169public:
170 using Op::Op;
171 using Op::print;
173 template <typename RangeT>
177 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
178 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("map"), ::llvm::StringRef("numDims")};
179 return ::llvm::ArrayRef(attrNames);
180 }
181
182 ::mlir::StringAttr getMapAttrName() {
183 return getAttributeNameForIndex(0);
184 }
185
186 static ::mlir::StringAttr getMapAttrName(::mlir::OperationName name) {
187 return getAttributeNameForIndex(name, 0);
188 }
189
190 ::mlir::StringAttr getNumDimsAttrName() {
191 return getAttributeNameForIndex(1);
192 }
193
194 static ::mlir::StringAttr getNumDimsAttrName(::mlir::OperationName name) {
195 return getAttributeNameForIndex(name, 1);
196 }
197
198 static constexpr ::llvm::StringLiteral getOperationName() {
199 return ::llvm::StringLiteral("poly.applymap");
200 }
201
202 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
203 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
204 auto valueRange = getODSOperandIndexAndLength(index);
205 return {std::next(getOperation()->operand_begin(), valueRange.first),
206 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
207 }
208
209 ::mlir::Operation::operand_range getMapOperands() {
210 return getODSOperands(0);
211 }
212
213 ::mlir::MutableOperandRange getMapOperandsMutable();
214 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
215 return {index, 1};
216 }
217
218 ::mlir::Operation::result_range getODSResults(unsigned index) {
219 auto valueRange = getODSResultIndexAndLength(index);
220 return {std::next(getOperation()->result_begin(), valueRange.first),
221 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
222 }
223
224 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
225 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
226 static llvm::hash_code computePropertiesHash(const Properties &prop);
227 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
228 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
229 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
230 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
231 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
232 void writeProperties(::mlir::DialectBytecodeWriter &writer);
233 ::mlir::AffineMapAttr getMapAttr() {
234 return ::llvm::cast<::mlir::AffineMapAttr>(getProperties().map);
235 }
236
237 ::mlir::AffineMap getMap();
238 ::mlir::IntegerAttr getNumDimsAttr() {
239 return ::llvm::cast<::mlir::IntegerAttr>(getProperties().numDims);
240 }
241
242 ::llvm::APInt getNumDims();
243 void setMapAttr(::mlir::AffineMapAttr attr) {
244 getProperties().map = attr;
245 }
246
247 void setMap(::mlir::AffineMap attrValue);
248 void setNumDimsAttr(::mlir::IntegerAttr attr) {
249 getProperties().numDims = attr;
250 }
251
252 void setNumDims(::llvm::APInt attrValue);
253 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMapAttr map, ::mlir::ValueRange mapOperands = {});
254 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMap map, ::mlir::ValueRange mapOperands = {});
255 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineExpr expr, ::mlir::ValueRange mapOperands = {});
256 ::llvm::LogicalResult verifyInvariantsImpl();
257 ::llvm::LogicalResult verifyInvariants();
258 ::llvm::LogicalResult verify();
259 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
260 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
261 void print(::mlir::OpAsmPrinter &_odsPrinter);
262 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
263private:
264 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
265 return getAttributeNameForIndex((*this)->getName(), index);
266 }
267
268 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
269 assert(index < 2 && "invalid attribute index");
270 assert(name.getStringRef() == getOperationName() && "invalid operation name");
271 assert(name.isRegistered() && "Operation isn't registered, missing a "
272 "dependent dialect loading?");
273 return name.getAttributeNames()[index];
274 }
275
276public:
278 ::mlir::AffineMap inline getAffineMap() { return getMap(); }
279
281 ::mlir::affine::AffineValueMap getAffineValueMap() {
282 return ::mlir::affine::AffineValueMap(getAffineMap(), getOperands(), getResult());
283 }
284
286 ::mlir::ValueRange getDimOperands() {
287 return ::mlir::OperandRange{
288 getOperands().begin(),
289 getOperands().begin() + getMap().getNumDims()};
290 }
291
293 ::mlir::ValueRange getSymbolOperands() {
294 return ::mlir::OperandRange{
295 getOperands().begin() + getMap().getNumDims(),
296 getOperands().end()};
297 }
298};
299} // namespace polymorphic
300} // namespace llzk
301MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::polymorphic::ApplyMapOp)
302
303namespace llzk {
304namespace polymorphic {
305
306//===----------------------------------------------------------------------===//
307// ::llzk::polymorphic::ConstReadOp declarations
308//===----------------------------------------------------------------------===//
309
310namespace detail {
312public:
313 struct Properties {
314 using const_nameTy = ::mlir::FlatSymbolRefAttr;
316
318 auto &propStorage = this->const_name;
319 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(propStorage);
320 }
321 void setConstName(const ::mlir::FlatSymbolRefAttr &propValue) {
322 this->const_name = propValue;
323 }
324 bool operator==(const Properties &rhs) const {
325 return
326 rhs.const_name == this->const_name &&
327 true;
328 }
329 bool operator!=(const Properties &rhs) const {
330 return !(*this == rhs);
331 }
332 };
333protected:
334 ::mlir::DictionaryAttr odsAttrs;
335 ::std::optional<::mlir::OperationName> odsOpName;
337 ::mlir::RegionRange odsRegions;
338public:
339 ConstReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
340 odsOpName.emplace("poly.read_const", odsAttrs.getContext());
341 }
342
344
345 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
346 return {index, 1};
347 }
348
350 return properties;
351 }
352
353 ::mlir::DictionaryAttr getAttributes() {
354 return odsAttrs;
355 }
356
357 ::mlir::FlatSymbolRefAttr getConstNameAttr() {
358 auto attr = ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().const_name);
359 return attr;
360 }
361
362 ::llvm::StringRef getConstName();
363};
364} // namespace detail
365template <typename RangeT>
367 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
369public:
370 ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
371
372 ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : ConstReadOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
373
374 ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConstReadOpGenericAdaptor(values, attrs, Properties{}, {}) {}
375
376 ConstReadOpGenericAdaptor(RangeT values, const ConstReadOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
377
378 template <typename LateInst = ConstReadOp, typename = std::enable_if_t<std::is_same_v<LateInst, ConstReadOp>>>
379 ConstReadOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
380
381 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
382 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
383 }
384
385 RangeT getODSOperands(unsigned index) {
386 auto valueRange = getODSOperandIndexAndLength(index);
387 return {std::next(odsOperands.begin(), valueRange.first),
388 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
389 }
390
391 RangeT getOperands() {
392 return odsOperands;
393 }
394
395private:
396 RangeT odsOperands;
397};
398class ConstReadOpAdaptor : public ConstReadOpGenericAdaptor<::mlir::ValueRange> {
399public:
402
403 ::llvm::LogicalResult verify(::mlir::Location loc);
404};
405class ConstReadOp : public ::mlir::Op<ConstReadOp, ::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::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait> {
406public:
407 using Op::Op;
408 using Op::print;
410 template <typename RangeT>
414 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
415 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("const_name")};
416 return ::llvm::ArrayRef(attrNames);
417 }
418
419 ::mlir::StringAttr getConstNameAttrName() {
420 return getAttributeNameForIndex(0);
421 }
422
423 static ::mlir::StringAttr getConstNameAttrName(::mlir::OperationName name) {
424 return getAttributeNameForIndex(name, 0);
425 }
426
427 static constexpr ::llvm::StringLiteral getOperationName() {
428 return ::llvm::StringLiteral("poly.read_const");
429 }
430
431 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
432 return {index, 1};
433 }
434
435 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
436 auto valueRange = getODSOperandIndexAndLength(index);
437 return {std::next(getOperation()->operand_begin(), valueRange.first),
438 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
439 }
440
441 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
442 return {index, 1};
443 }
444
445 ::mlir::Operation::result_range getODSResults(unsigned index) {
446 auto valueRange = getODSResultIndexAndLength(index);
447 return {std::next(getOperation()->result_begin(), valueRange.first),
448 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
449 }
450
451 ::mlir::TypedValue<::mlir::Type> getVal() {
452 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
453 }
454
455 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
456 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
457 static llvm::hash_code computePropertiesHash(const Properties &prop);
458 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
459 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
460 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
461 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
462 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
463 void writeProperties(::mlir::DialectBytecodeWriter &writer);
464 ::mlir::FlatSymbolRefAttr getConstNameAttr() {
465 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().const_name);
466 }
467
468 ::llvm::StringRef getConstName();
469 void setConstNameAttr(::mlir::FlatSymbolRefAttr attr) {
470 getProperties().const_name = attr;
471 }
472
473 void setConstName(::llvm::StringRef attrValue);
474 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::FlatSymbolRefAttr const_name);
475 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::FlatSymbolRefAttr const_name);
476 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::llvm::StringRef const_name);
477 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef const_name);
478 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
479 ::llvm::LogicalResult verifyInvariantsImpl();
480 ::llvm::LogicalResult verifyInvariants();
481 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
482 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
483 void print(::mlir::OpAsmPrinter &_odsPrinter);
484 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
485private:
486 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
487 return getAttributeNameForIndex((*this)->getName(), index);
488 }
489
490 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
491 assert(index < 1 && "invalid attribute index");
492 assert(name.getStringRef() == getOperationName() && "invalid operation name");
493 assert(name.isRegistered() && "Operation isn't registered, missing a "
494 "dependent dialect loading?");
495 return name.getAttributeNames()[index];
496 }
497
498public:
499};
500} // namespace polymorphic
501} // namespace llzk
502MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::polymorphic::ConstReadOp)
503
504namespace llzk {
505namespace polymorphic {
506
507//===----------------------------------------------------------------------===//
508// ::llzk::polymorphic::TemplateExprOp declarations
509//===----------------------------------------------------------------------===//
510
511namespace detail {
513public:
514 struct Properties {
515 using sym_nameTy = ::mlir::StringAttr;
517
518 auto getSymName() {
519 auto &propStorage = this->sym_name;
520 return ::llvm::cast<::mlir::StringAttr>(propStorage);
521 }
522 void setSymName(const ::mlir::StringAttr &propValue) {
523 this->sym_name = propValue;
524 }
525 bool operator==(const Properties &rhs) const {
526 return
527 rhs.sym_name == this->sym_name &&
528 true;
529 }
530 bool operator!=(const Properties &rhs) const {
531 return !(*this == rhs);
532 }
533 };
534protected:
535 ::mlir::DictionaryAttr odsAttrs;
536 ::std::optional<::mlir::OperationName> odsOpName;
538 ::mlir::RegionRange odsRegions;
539public:
540 TemplateExprOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
541 odsOpName.emplace("poly.expr", odsAttrs.getContext());
542 }
543
545
546 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
547 return {index, 1};
548 }
549
551 return properties;
552 }
553
554 ::mlir::DictionaryAttr getAttributes() {
555 return odsAttrs;
556 }
557
558 ::mlir::StringAttr getSymNameAttr() {
559 auto attr = ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
560 return attr;
561 }
562
563 ::llvm::StringRef getSymName();
564 ::mlir::Region &getInitializerRegion() {
565 return *odsRegions[0];
566 }
567
568 ::mlir::RegionRange getRegions() {
569 return odsRegions;
570 }
571
572};
573} // namespace detail
574template <typename RangeT>
576 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
578public:
579 TemplateExprOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
580
581 TemplateExprOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : TemplateExprOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
582
583 TemplateExprOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : TemplateExprOpGenericAdaptor(values, attrs, Properties{}, {}) {}
584
585 TemplateExprOpGenericAdaptor(RangeT values, const TemplateExprOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
586
587 template <typename LateInst = TemplateExprOp, typename = std::enable_if_t<std::is_same_v<LateInst, TemplateExprOp>>>
588 TemplateExprOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
589
590 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
591 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
592 }
593
594 RangeT getODSOperands(unsigned index) {
595 auto valueRange = getODSOperandIndexAndLength(index);
596 return {std::next(odsOperands.begin(), valueRange.first),
597 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
598 }
599
600 RangeT getOperands() {
601 return odsOperands;
602 }
603
604private:
605 RangeT odsOperands;
606};
607class TemplateExprOpAdaptor : public TemplateExprOpGenericAdaptor<::mlir::ValueRange> {
608public:
611
612 ::llvm::LogicalResult verify(::mlir::Location loc);
613};
614class TemplateExprOp : public ::mlir::Op<TemplateExprOp, ::mlir::OpTrait::OneRegion, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::HasParent<::llzk::polymorphic::TemplateOp>::Impl, ::mlir::OpTrait::NoRegionArguments, ::mlir::OpTrait::SingleBlock, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::SymbolOpInterface::Trait, ::llzk::polymorphic::TemplateSymbolBindingOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::mlir::OpTrait::IsIsolatedFromAbove> {
615public:
616 using Op::Op;
617 using Op::print;
619 template <typename RangeT>
623 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
624 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("sym_name")};
625 return ::llvm::ArrayRef(attrNames);
626 }
627
628 ::mlir::StringAttr getSymNameAttrName() {
629 return getAttributeNameForIndex(0);
630 }
631
632 static ::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name) {
633 return getAttributeNameForIndex(name, 0);
634 }
635
636 static constexpr ::llvm::StringLiteral getOperationName() {
637 return ::llvm::StringLiteral("poly.expr");
638 }
639
640 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
641 return {index, 1};
642 }
643
644 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
645 auto valueRange = getODSOperandIndexAndLength(index);
646 return {std::next(getOperation()->operand_begin(), valueRange.first),
647 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
648 }
649
650 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
651 return {index, 1};
652 }
653
654 ::mlir::Operation::result_range getODSResults(unsigned index) {
655 auto valueRange = getODSResultIndexAndLength(index);
656 return {std::next(getOperation()->result_begin(), valueRange.first),
657 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
658 }
659
660 ::mlir::Region &getInitializerRegion() {
661 return (*this)->getRegion(0);
662 }
663
664 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
665 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
666 static llvm::hash_code computePropertiesHash(const Properties &prop);
667 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
668 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
669 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
670 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
671 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
672 void writeProperties(::mlir::DialectBytecodeWriter &writer);
673 ::mlir::StringAttr getSymNameAttr() {
674 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
675 }
676
677 ::llvm::StringRef getSymName();
678 void setSymNameAttr(::mlir::StringAttr attr) {
679 getProperties().sym_name = attr;
680 }
681
682 void setSymName(::llvm::StringRef attrValue);
683 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name);
684 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name);
685 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name);
686 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name);
687 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
688 ::llvm::LogicalResult verifyInvariantsImpl();
689 ::llvm::LogicalResult verifyInvariants();
690 ::llvm::LogicalResult verifyRegions();
691 ::std::optional<::mlir::Type> getTypeOpt();
692 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
693 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
694 void print(::mlir::OpAsmPrinter &_odsPrinter);
695private:
696 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
697 return getAttributeNameForIndex((*this)->getName(), index);
698 }
699
700 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
701 assert(index < 1 && "invalid attribute index");
702 assert(name.getStringRef() == getOperationName() && "invalid operation name");
703 assert(name.isRegistered() && "Operation isn't registered, missing a "
704 "dependent dialect loading?");
705 return name.getAttributeNames()[index];
706 }
707
708public:
710 ::mlir::Type getType();
711};
712} // namespace polymorphic
713} // namespace llzk
714MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::polymorphic::TemplateExprOp)
715
716namespace llzk {
717namespace polymorphic {
718
719//===----------------------------------------------------------------------===//
720// ::llzk::polymorphic::TemplateOp declarations
721//===----------------------------------------------------------------------===//
722
723namespace detail {
725public:
726 struct Properties {
727 using sym_nameTy = ::mlir::StringAttr;
729
730 auto getSymName() {
731 auto &propStorage = this->sym_name;
732 return ::llvm::cast<::mlir::StringAttr>(propStorage);
733 }
734 void setSymName(const ::mlir::StringAttr &propValue) {
735 this->sym_name = propValue;
736 }
737 bool operator==(const Properties &rhs) const {
738 return
739 rhs.sym_name == this->sym_name &&
740 true;
741 }
742 bool operator!=(const Properties &rhs) const {
743 return !(*this == rhs);
744 }
745 };
746protected:
747 ::mlir::DictionaryAttr odsAttrs;
748 ::std::optional<::mlir::OperationName> odsOpName;
750 ::mlir::RegionRange odsRegions;
751public:
752 TemplateOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
753 odsOpName.emplace("poly.template", odsAttrs.getContext());
754 }
755
757
758 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
759 return {index, 1};
760 }
761
763 return properties;
764 }
765
766 ::mlir::DictionaryAttr getAttributes() {
767 return odsAttrs;
768 }
769
770 ::mlir::StringAttr getSymNameAttr() {
771 auto attr = ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
772 return attr;
773 }
774
775 ::llvm::StringRef getSymName();
776 ::mlir::Region &getBodyRegion() {
777 return *odsRegions[0];
778 }
779
780 ::mlir::RegionRange getRegions() {
781 return odsRegions;
782 }
783
784};
785} // namespace detail
786template <typename RangeT>
788 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
790public:
791 TemplateOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
792
793 TemplateOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : TemplateOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
794
795 TemplateOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : TemplateOpGenericAdaptor(values, attrs, Properties{}, {}) {}
796
797 TemplateOpGenericAdaptor(RangeT values, const TemplateOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
798
799 template <typename LateInst = TemplateOp, typename = std::enable_if_t<std::is_same_v<LateInst, TemplateOp>>>
800 TemplateOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
801
802 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
803 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
804 }
805
806 RangeT getODSOperands(unsigned index) {
807 auto valueRange = getODSOperandIndexAndLength(index);
808 return {std::next(odsOperands.begin(), valueRange.first),
809 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
810 }
811
812 RangeT getOperands() {
813 return odsOperands;
814 }
815
816private:
817 RangeT odsOperands;
818};
819class TemplateOpAdaptor : public TemplateOpGenericAdaptor<::mlir::ValueRange> {
820public:
823
824 ::llvm::LogicalResult verify(::mlir::Location loc);
825};
826class TemplateOp : public ::mlir::Op<TemplateOp, ::mlir::OpTrait::OneRegion, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::HasParent<::mlir::ModuleOp>::Impl, ::mlir::OpTrait::NoRegionArguments, ::mlir::OpTrait::NoTerminator, ::mlir::OpTrait::SingleBlock, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::SymbolOpInterface::Trait, ::llzk::LLZKSymbolTableImplTrait, ::mlir::OpTrait::SymbolTable, ::mlir::OpTrait::IsIsolatedFromAbove> {
827public:
828 using Op::Op;
829 using Op::print;
831 template <typename RangeT>
835 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
836 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("sym_name")};
837 return ::llvm::ArrayRef(attrNames);
838 }
839
840 ::mlir::StringAttr getSymNameAttrName() {
841 return getAttributeNameForIndex(0);
842 }
843
844 static ::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name) {
845 return getAttributeNameForIndex(name, 0);
846 }
847
848 static constexpr ::llvm::StringLiteral getOperationName() {
849 return ::llvm::StringLiteral("poly.template");
850 }
851
852 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
853 return {index, 1};
854 }
855
856 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
857 auto valueRange = getODSOperandIndexAndLength(index);
858 return {std::next(getOperation()->operand_begin(), valueRange.first),
859 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
860 }
861
862 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
863 return {index, 1};
864 }
865
866 ::mlir::Operation::result_range getODSResults(unsigned index) {
867 auto valueRange = getODSResultIndexAndLength(index);
868 return {std::next(getOperation()->result_begin(), valueRange.first),
869 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
870 }
871
872 ::mlir::Region &getBodyRegion() {
873 return (*this)->getRegion(0);
874 }
875
876 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
877 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
878 static llvm::hash_code computePropertiesHash(const Properties &prop);
879 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
880 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
881 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
882 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
883 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
884 void writeProperties(::mlir::DialectBytecodeWriter &writer);
885 ::mlir::StringAttr getSymNameAttr() {
886 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
887 }
888
889 ::llvm::StringRef getSymName();
890 void setSymNameAttr(::mlir::StringAttr attr) {
891 getProperties().sym_name = attr;
892 }
893
894 void setSymName(::llvm::StringRef attrValue);
895 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name);
896 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name);
897 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name);
898 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name);
899 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
900 ::llvm::LogicalResult verifyInvariantsImpl();
901 ::llvm::LogicalResult verifyInvariants();
902 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
903 void print(::mlir::OpAsmPrinter &_odsPrinter);
904private:
905 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
906 return getAttributeNameForIndex((*this)->getName(), index);
907 }
908
909 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
910 assert(index < 1 && "invalid attribute index");
911 assert(name.getStringRef() == getOperationName() && "invalid operation name");
912 assert(name.isRegistered() && "Operation isn't registered, missing a "
913 "dependent dialect loading?");
914 return name.getAttributeNames()[index];
915 }
916
917public:
920 template <TemplateSymbolBindingOp OpT>
921 inline ::llvm::iterator_range<::mlir::Region::op_iterator<OpT>> getConstOps() {
922 return getBodyRegion().getOps<OpT>();
923 }
924
926 template <TemplateSymbolBindingOp OpT>
927 inline bool hasConstOps() {
928 return !getConstOps<OpT>().empty();
929 }
930
932 template <TemplateSymbolBindingOp OpT>
933 inline size_t numConstOps() {
934 return llvm::range_size(getConstOps<OpT>());
935 }
936
940 template <TemplateSymbolBindingOp OpT>
941 ::llvm::SmallVector<::mlir::Attribute> getConstNames() {
942 return ::llvm::to_vector(::llvm::map_range(getConstOps<OpT>(), [](auto p) -> ::mlir::Attribute {
943 return ::mlir::FlatSymbolRefAttr::get(p.getNameAttr());
944 }));
945 }
946
948 template <TemplateSymbolBindingOp OpT>
949 inline bool hasConstNamed(::mlir::StringRef find) {
950 return ::llvm::any_of(getConstOps<OpT>(), [&](OpT op) {
951 return op.getName() == find;
952 });
953 }
954
956 template <TemplateSymbolBindingOp OpT>
957 inline bool hasConstNamed(::mlir::StringAttr find) {
958 return hasConstNamed<OpT>(find.strref());
959 }
960
962 template <TemplateSymbolBindingOp OpT>
963 inline bool hasConstNamed(::mlir::FlatSymbolRefAttr find) {
964 return hasConstNamed<OpT>(find.getRootReference());
965 }
966
968 template <TemplateSymbolBindingOp OpT>
969 inline OpT getConstNamed(::mlir::StringRef find) {
970 auto range = getConstOps<OpT>();
971 auto it = ::llvm::find_if(range, [&find](OpT op) { return op.getName() == find; });
972 return it != range.end() ? *it : OpT{};
973 }
974
976 template <TemplateSymbolBindingOp OpT>
977 inline OpT getConstNamed(::mlir::StringAttr find) {
978 return getConstNamed<OpT>(find.strref());
979 }
980
982 template <TemplateSymbolBindingOp OpT>
983 inline OpT getConstNamed(::mlir::FlatSymbolRefAttr find) {
984 return getConstNamed<OpT>(find.getRootReference());
985 }
986};
987} // namespace polymorphic
988} // namespace llzk
989MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::polymorphic::TemplateOp)
990
991namespace llzk {
992namespace polymorphic {
993
994//===----------------------------------------------------------------------===//
995// ::llzk::polymorphic::TemplateParamOp declarations
996//===----------------------------------------------------------------------===//
997
998namespace detail {
1000public:
1001 struct Properties {
1002 using sym_nameTy = ::mlir::StringAttr;
1004
1005 auto getSymName() {
1006 auto &propStorage = this->sym_name;
1007 return ::llvm::cast<::mlir::StringAttr>(propStorage);
1008 }
1009 void setSymName(const ::mlir::StringAttr &propValue) {
1010 this->sym_name = propValue;
1011 }
1012 using type_optTy = ::mlir::TypeAttr;
1014
1015 auto getTypeOpt() {
1016 auto &propStorage = this->type_opt;
1017 return ::llvm::dyn_cast_or_null<::mlir::TypeAttr>(propStorage);
1018 }
1019 void setTypeOpt(const ::mlir::TypeAttr &propValue) {
1020 this->type_opt = propValue;
1021 }
1022 bool operator==(const Properties &rhs) const {
1023 return
1024 rhs.sym_name == this->sym_name &&
1025 rhs.type_opt == this->type_opt &&
1026 true;
1027 }
1028 bool operator!=(const Properties &rhs) const {
1029 return !(*this == rhs);
1030 }
1031 };
1032protected:
1033 ::mlir::DictionaryAttr odsAttrs;
1034 ::std::optional<::mlir::OperationName> odsOpName;
1036 ::mlir::RegionRange odsRegions;
1037public:
1038 TemplateParamOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1039 odsOpName.emplace("poly.param", odsAttrs.getContext());
1040 }
1041
1043
1044 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1045 return {index, 1};
1046 }
1047
1049 return properties;
1050 }
1051
1052 ::mlir::DictionaryAttr getAttributes() {
1053 return odsAttrs;
1054 }
1055
1056 ::mlir::StringAttr getSymNameAttr() {
1057 auto attr = ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
1058 return attr;
1059 }
1060
1061 ::llvm::StringRef getSymName();
1062 ::mlir::TypeAttr getTypeOptAttr() {
1063 auto attr = ::llvm::dyn_cast_or_null<::mlir::TypeAttr>(getProperties().type_opt);
1064 return attr;
1065 }
1066
1067 ::std::optional<::mlir::Type> getTypeOpt();
1068};
1069} // namespace detail
1070template <typename RangeT>
1072 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1074public:
1075 TemplateParamOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1076
1077 TemplateParamOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : TemplateParamOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
1078
1079 TemplateParamOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : TemplateParamOpGenericAdaptor(values, attrs, Properties{}, {}) {}
1080
1081 TemplateParamOpGenericAdaptor(RangeT values, const TemplateParamOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1082
1083 template <typename LateInst = TemplateParamOp, typename = std::enable_if_t<std::is_same_v<LateInst, TemplateParamOp>>>
1084 TemplateParamOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1085
1086 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1087 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1088 }
1089
1090 RangeT getODSOperands(unsigned index) {
1091 auto valueRange = getODSOperandIndexAndLength(index);
1092 return {std::next(odsOperands.begin(), valueRange.first),
1093 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1094 }
1095
1096 RangeT getOperands() {
1097 return odsOperands;
1098 }
1099
1100private:
1101 RangeT odsOperands;
1102};
1103class TemplateParamOpAdaptor : public TemplateParamOpGenericAdaptor<::mlir::ValueRange> {
1104public:
1107
1108 ::llvm::LogicalResult verify(::mlir::Location loc);
1109};
1110class TemplateParamOp : public ::mlir::Op<TemplateParamOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::HasParent<::llzk::polymorphic::TemplateOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::SymbolOpInterface::Trait, ::llzk::polymorphic::TemplateSymbolBindingOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait> {
1111public:
1112 using Op::Op;
1113 using Op::print;
1115 template <typename RangeT>
1119 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1120 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("sym_name"), ::llvm::StringRef("type_opt")};
1121 return ::llvm::ArrayRef(attrNames);
1122 }
1123
1124 ::mlir::StringAttr getSymNameAttrName() {
1125 return getAttributeNameForIndex(0);
1126 }
1127
1128 static ::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name) {
1129 return getAttributeNameForIndex(name, 0);
1130 }
1131
1132 ::mlir::StringAttr getTypeOptAttrName() {
1133 return getAttributeNameForIndex(1);
1134 }
1135
1136 static ::mlir::StringAttr getTypeOptAttrName(::mlir::OperationName name) {
1137 return getAttributeNameForIndex(name, 1);
1138 }
1139
1140 static constexpr ::llvm::StringLiteral getOperationName() {
1141 return ::llvm::StringLiteral("poly.param");
1142 }
1143
1144 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1145 return {index, 1};
1146 }
1147
1148 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1149 auto valueRange = getODSOperandIndexAndLength(index);
1150 return {std::next(getOperation()->operand_begin(), valueRange.first),
1151 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1152 }
1153
1154 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1155 return {index, 1};
1156 }
1157
1158 ::mlir::Operation::result_range getODSResults(unsigned index) {
1159 auto valueRange = getODSResultIndexAndLength(index);
1160 return {std::next(getOperation()->result_begin(), valueRange.first),
1161 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1162 }
1163
1164 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1165 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1166 static llvm::hash_code computePropertiesHash(const Properties &prop);
1167 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1168 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1169 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
1170 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1171 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
1172 void writeProperties(::mlir::DialectBytecodeWriter &writer);
1173 ::mlir::StringAttr getSymNameAttr() {
1174 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
1175 }
1176
1177 ::llvm::StringRef getSymName();
1178 ::mlir::TypeAttr getTypeOptAttr() {
1179 return ::llvm::dyn_cast_or_null<::mlir::TypeAttr>(getProperties().type_opt);
1180 }
1181
1182 ::std::optional<::mlir::Type> getTypeOpt();
1183 void setSymNameAttr(::mlir::StringAttr attr) {
1184 getProperties().sym_name = attr;
1185 }
1186
1187 void setSymName(::llvm::StringRef attrValue);
1188 void setTypeOptAttr(::mlir::TypeAttr attr) {
1189 getProperties().type_opt = attr;
1190 }
1191
1192 void setTypeOpt(::std::optional<::mlir::Type> attrValue);
1193 ::mlir::Attribute removeTypeOptAttr() {
1194 auto &attr = getProperties().type_opt;
1195 attr = {};
1196 return attr;
1197 }
1198
1199 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, /*optional*/::mlir::TypeAttr type_opt);
1200 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, /*optional*/::mlir::TypeAttr type_opt);
1201 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, /*optional*/::mlir::TypeAttr type_opt);
1202 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, /*optional*/::mlir::TypeAttr type_opt);
1203 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1204 ::llvm::LogicalResult verifyInvariantsImpl();
1205 ::llvm::LogicalResult verifyInvariants();
1206 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
1207 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1208 void print(::mlir::OpAsmPrinter &_odsPrinter);
1209private:
1210 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
1211 return getAttributeNameForIndex((*this)->getName(), index);
1212 }
1213
1214 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
1215 assert(index < 2 && "invalid attribute index");
1216 assert(name.getStringRef() == getOperationName() && "invalid operation name");
1217 assert(name.isRegistered() && "Operation isn't registered, missing a "
1218 "dependent dialect loading?");
1219 return name.getAttributeNames()[index];
1220 }
1221
1222public:
1223};
1224} // namespace polymorphic
1225} // namespace llzk
1226MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::polymorphic::TemplateParamOp)
1227
1228namespace llzk {
1229namespace polymorphic {
1230
1231//===----------------------------------------------------------------------===//
1232// ::llzk::polymorphic::UnifiableCastOp declarations
1233//===----------------------------------------------------------------------===//
1234
1235namespace detail {
1237public:
1238protected:
1239 ::mlir::DictionaryAttr odsAttrs;
1240 ::std::optional<::mlir::OperationName> odsOpName;
1241 ::mlir::RegionRange odsRegions;
1242public:
1243 UnifiableCastOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), odsRegions(regions) { if (odsAttrs)
1244 odsOpName.emplace("poly.unifiable_cast", odsAttrs.getContext());
1245 }
1246
1247 UnifiableCastOpGenericAdaptorBase(::mlir::Operation *op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), odsRegions(op->getRegions()) {}
1248
1249 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1250 return {index, 1};
1251 }
1252
1253 ::mlir::DictionaryAttr getAttributes() {
1254 return odsAttrs;
1255 }
1256
1257};
1258} // namespace detail
1259template <typename RangeT>
1261 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1263public:
1264 UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1265
1266 UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : UnifiableCastOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
1267
1268 UnifiableCastOpGenericAdaptor(RangeT values, const UnifiableCastOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1269
1270 template <typename LateInst = UnifiableCastOp, typename = std::enable_if_t<std::is_same_v<LateInst, UnifiableCastOp>>>
1271 UnifiableCastOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1272
1273 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1274 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1275 }
1276
1277 RangeT getODSOperands(unsigned index) {
1278 auto valueRange = getODSOperandIndexAndLength(index);
1279 return {std::next(odsOperands.begin(), valueRange.first),
1280 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1281 }
1282
1283 ValueT getInput() {
1284 return (*getODSOperands(0).begin());
1285 }
1286
1287 RangeT getOperands() {
1288 return odsOperands;
1289 }
1290
1291private:
1292 RangeT odsOperands;
1293};
1294class UnifiableCastOpAdaptor : public UnifiableCastOpGenericAdaptor<::mlir::ValueRange> {
1295public:
1298
1299 ::llvm::LogicalResult verify(::mlir::Location loc);
1300};
1301class UnifiableCastOp : public ::mlir::Op<UnifiableCastOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
1302public:
1303 using Op::Op;
1304 using Op::print;
1306 template <typename RangeT>
1309 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1310 return {};
1311 }
1312
1313 static constexpr ::llvm::StringLiteral getOperationName() {
1314 return ::llvm::StringLiteral("poly.unifiable_cast");
1315 }
1316
1317 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1318 return {index, 1};
1319 }
1320
1321 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1322 auto valueRange = getODSOperandIndexAndLength(index);
1323 return {std::next(getOperation()->operand_begin(), valueRange.first),
1324 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1325 }
1326
1327 ::mlir::TypedValue<::mlir::Type> getInput() {
1328 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
1329 }
1330
1331 ::mlir::OpOperand &getInputMutable() {
1332 auto range = getODSOperandIndexAndLength(0);
1333 return getOperation()->getOpOperand(range.first);
1334 }
1335
1336 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1337 return {index, 1};
1338 }
1339
1340 ::mlir::Operation::result_range getODSResults(unsigned index) {
1341 auto valueRange = getODSResultIndexAndLength(index);
1342 return {std::next(getOperation()->result_begin(), valueRange.first),
1343 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1344 }
1345
1346 ::mlir::TypedValue<::mlir::Type> getResult() {
1347 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
1348 }
1349
1350 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input);
1351 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input);
1352 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1353 ::llvm::LogicalResult verifyInvariantsImpl();
1354 ::llvm::LogicalResult verifyInvariants();
1355 ::llvm::LogicalResult verify();
1356 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1357 void print(::mlir::OpAsmPrinter &_odsPrinter);
1358 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1359public:
1360};
1361} // namespace polymorphic
1362} // namespace llzk
1363MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::polymorphic::UnifiableCastOp)
1364
1365namespace llzk {
1366namespace polymorphic {
1367
1368//===----------------------------------------------------------------------===//
1369// ::llzk::polymorphic::YieldOp declarations
1370//===----------------------------------------------------------------------===//
1371
1372namespace detail {
1374public:
1375protected:
1376 ::mlir::DictionaryAttr odsAttrs;
1377 ::std::optional<::mlir::OperationName> odsOpName;
1378 ::mlir::RegionRange odsRegions;
1379public:
1380 YieldOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), odsRegions(regions) { if (odsAttrs)
1381 odsOpName.emplace("poly.yield", odsAttrs.getContext());
1382 }
1383
1384 YieldOpGenericAdaptorBase(::mlir::Operation *op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), odsRegions(op->getRegions()) {}
1385
1386 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1387 return {index, 1};
1388 }
1389
1390 ::mlir::DictionaryAttr getAttributes() {
1391 return odsAttrs;
1392 }
1393
1394};
1395} // namespace detail
1396template <typename RangeT>
1398 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1400public:
1401 YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1402
1403 YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : YieldOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
1404
1405 YieldOpGenericAdaptor(RangeT values, const YieldOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1406
1407 template <typename LateInst = YieldOp, typename = std::enable_if_t<std::is_same_v<LateInst, YieldOp>>>
1408 YieldOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1409
1410 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1411 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1412 }
1413
1414 RangeT getODSOperands(unsigned index) {
1415 auto valueRange = getODSOperandIndexAndLength(index);
1416 return {std::next(odsOperands.begin(), valueRange.first),
1417 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1418 }
1419
1420 ValueT getVal() {
1421 return (*getODSOperands(0).begin());
1422 }
1423
1424 RangeT getOperands() {
1425 return odsOperands;
1426 }
1427
1428private:
1429 RangeT odsOperands;
1430};
1431class YieldOpAdaptor : public YieldOpGenericAdaptor<::mlir::ValueRange> {
1432public:
1435
1436 ::llvm::LogicalResult verify(::mlir::Location loc);
1437};
1438class YieldOp : public ::mlir::Op<YieldOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::HasParent<::llzk::polymorphic::TemplateExprOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::RegionBranchTerminatorOpInterface::Trait, ::mlir::OpTrait::ReturnLike, ::mlir::OpTrait::IsTerminator> {
1439public:
1440 using Op::Op;
1441 using Op::print;
1443 template <typename RangeT>
1446 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1447 return {};
1448 }
1449
1450 static constexpr ::llvm::StringLiteral getOperationName() {
1451 return ::llvm::StringLiteral("poly.yield");
1452 }
1453
1454 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1455 return {index, 1};
1456 }
1457
1458 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1459 auto valueRange = getODSOperandIndexAndLength(index);
1460 return {std::next(getOperation()->operand_begin(), valueRange.first),
1461 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1462 }
1463
1464 ::mlir::TypedValue<::mlir::Type> getVal() {
1465 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
1466 }
1467
1468 ::mlir::OpOperand &getValMutable() {
1469 auto range = getODSOperandIndexAndLength(0);
1470 return getOperation()->getOpOperand(range.first);
1471 }
1472
1473 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1474 return {index, 1};
1475 }
1476
1477 ::mlir::Operation::result_range getODSResults(unsigned index) {
1478 auto valueRange = getODSResultIndexAndLength(index);
1479 return {std::next(getOperation()->result_begin(), valueRange.first),
1480 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1481 }
1482
1483 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value val);
1484 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val);
1485 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1486 ::llvm::LogicalResult verifyInvariantsImpl();
1487 ::llvm::LogicalResult verifyInvariants();
1488 ::mlir::MutableOperandRange getMutableSuccessorOperands(::mlir::RegionBranchPoint point);
1489 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1490 void print(::mlir::OpAsmPrinter &_odsPrinter);
1491public:
1492};
1493} // namespace polymorphic
1494} // namespace llzk
1495MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::polymorphic::YieldOp)
1496
1497
1498#endif // GET_OP_CLASSES
1499
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:196
ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:129
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:140
ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:133
ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:131
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:144
ApplyMapOpGenericAdaptor(RangeT values, const ApplyMapOpGenericAdaptorBase &base)
Definition Ops.h.inc:135
ApplyMapOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:138
ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:129
::mlir::ValueRange getSymbolOperands()
Returns all symbol operands.
Definition Ops.h.inc:293
::mlir::AffineMapAttr getMapAttr()
Definition Ops.h.inc:233
::mlir::IntegerAttr getNumDimsAttr()
Definition Ops.h.inc:238
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:210
::mlir::ValueRange getDimOperands()
Returns all dimension operands.
Definition Ops.h.inc:286
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:218
::mlir::affine::AffineValueMap getAffineValueMap()
Returns the affine value map computed from this operation.
Definition Ops.h.inc:281
::mlir::Operation::operand_range getMapOperands()
Definition Ops.h.inc:209
::mlir::StringAttr getNumDimsAttrName(::mlir::OperationName name)
Definition Ops.h.inc:194
::llvm::LogicalResult verify()
Definition Ops.cpp:183
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:476
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:175
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:198
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:443
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:435
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:429
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:294
FoldAdaptor::Properties Properties
Definition Ops.h.inc:176
::mlir::StringAttr getMapAttrName(::mlir::OperationName name)
Definition Ops.h.inc:186
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:203
ApplyMapOpAdaptor Adaptor
Definition Ops.h.inc:172
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMapAttr map, ::mlir::ValueRange mapOperands={})
Definition Ops.cpp.inc:376
::mlir::StringAttr getMapAttrName()
Definition Ops.h.inc:182
::mlir::AffineMap getMap()
Definition Ops.cpp.inc:358
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:177
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:321
ApplyMapOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:174
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:352
void setMap(::mlir::AffineMap attrValue)
Definition Ops.cpp.inc:368
void setNumDimsAttr(::mlir::IntegerAttr attr)
Definition Ops.h.inc:248
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:271
::mlir::StringAttr getNumDimsAttrName()
Definition Ops.h.inc:190
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:327
::mlir::MutableOperandRange getMapOperandsMutable()
Definition Ops.cpp.inc:228
::mlir::AffineMap getAffineMap()
Returns the affine map to be applied by this operation.
Definition Ops.h.inc:278
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:397
void setMapAttr(::mlir::AffineMapAttr attr)
Definition Ops.h.inc:243
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:309
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:342
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:234
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:487
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:300
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:214
void setNumDims(::llvm::APInt attrValue)
Definition Ops.cpp.inc:372
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:512
ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:370
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:381
ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:372
ConstReadOpGenericAdaptor(RangeT values, const ConstReadOpGenericAdaptorBase &base)
Definition Ops.h.inc:376
ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:370
ConstReadOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:379
ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:374
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:598
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:431
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:435
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:674
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:427
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:414
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:705
FoldAdaptor::Properties Properties
Definition Ops.h.inc:413
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:582
::mlir::TypedValue<::mlir::Type > getVal()
Definition Ops.h.inc:451
::mlir::StringAttr getConstNameAttrName()
Definition Ops.h.inc:419
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:544
ConstReadOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:411
::mlir::StringAttr getConstNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:423
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:571
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:445
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:521
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:560
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:441
void setConstName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:608
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:652
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:722
void setConstNameAttr(::mlir::FlatSymbolRefAttr attr)
Definition Ops.h.inc:469
::mlir::FlatSymbolRefAttr getConstNameAttr()
Definition Ops.h.inc:464
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::FlatSymbolRefAttr const_name)
Definition Ops.cpp.inc:612
ConstReadOpAdaptor Adaptor
Definition Ops.h.inc:409
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:565
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:578
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:591
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:670
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:152
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:412
::llvm::StringRef getConstName()
Definition Ops.cpp.inc:603
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:747
TemplateExprOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:579
TemplateExprOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:588
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:590
TemplateExprOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:579
TemplateExprOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:583
TemplateExprOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:581
TemplateExprOpGenericAdaptor(RangeT values, const TemplateExprOpGenericAdaptorBase &base)
Definition Ops.h.inc:585
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:817
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:806
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:650
::mlir::StringAttr getSymNameAttr()
Definition Ops.h.inc:673
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:800
::llvm::LogicalResult verifyRegions()
Definition Ops.cpp:108
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:779
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:621
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:813
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:644
::mlir::Region & getInitializerRegion()
Definition Ops.h.inc:660
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:71
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:795
TemplateExprOpAdaptor Adaptor
Definition Ops.h.inc:618
::mlir::Type getType()
Returns the type of the poly.yield op in the initializer region.
Definition Ops.cpp:138
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:623
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:911
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:891
::llvm::StringRef getSymName()
Definition Ops.cpp.inc:838
void setSymName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:843
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:632
void setSymNameAttr(::mlir::StringAttr attr)
Definition Ops.h.inc:678
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:833
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:756
TemplateExprOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:620
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:826
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:654
FoldAdaptor::Properties Properties
Definition Ops.h.inc:622
::std::optional<::mlir::Type > getTypeOpt()
Definition Ops.cpp:146
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name)
Definition Ops.cpp.inc:847
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:640
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:636
::mlir::StringAttr getSymNameAttrName()
Definition Ops.h.inc:628
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:907
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:936
TemplateOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:791
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:968
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:802
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:806
TemplateOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:800
TemplateOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:791
TemplateOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:793
TemplateOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:795
TemplateOpGenericAdaptor(RangeT values, const TemplateOpGenericAdaptorBase &base)
Definition Ops.h.inc:797
::mlir::Region & getBodyRegion()
Definition Ops.h.inc:872
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1038
::mlir::StringAttr getSymNameAttrName()
Definition Ops.h.inc:840
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1016
OpT getConstNamed(::mlir::StringRef find)
Return the op of type OpT with the given name within the body region if it exists,...
Definition Ops.h.inc:969
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1000
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:844
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:1054
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1157
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1132
::llvm::SmallVector<::mlir::Attribute > getConstNames()
Return the names of all ops of type OpT within the body region in the order they are defined.
Definition Ops.h.inc:941
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1034
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name)
Definition Ops.cpp.inc:1068
OpT getConstNamed(::mlir::FlatSymbolRefAttr find)
Return the op of type OpT with the given name within the body region if it exists,...
Definition Ops.h.inc:983
bool hasConstNamed(::mlir::StringRef find)
Return true if there is an op of type OpT with the given name within the body region.
Definition Ops.h.inc:949
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1021
FoldAdaptor::Properties Properties
Definition Ops.h.inc:834
OpT getConstNamed(::mlir::StringAttr find)
Return the op of type OpT with the given name within the body region if it exists,...
Definition Ops.h.inc:977
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:852
::mlir::StringAttr getSymNameAttr()
Definition Ops.h.inc:885
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:833
TemplateOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:832
void setSymNameAttr(::mlir::StringAttr attr)
Definition Ops.h.inc:890
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1112
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:856
bool hasConstNamed(::mlir::FlatSymbolRefAttr find)
Return true if there is an op of type OpT with the given name within the body region.
Definition Ops.h.inc:963
void setSymName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:1064
bool hasConstOps()
Return true if there are ops of type OpT within the body region.
Definition Ops.h.inc:927
bool hasConstNamed(::mlir::StringAttr find)
Return true if there is an op of type OpT with the given name within the body region.
Definition Ops.h.inc:957
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1027
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:1047
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:866
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:848
::llvm::StringRef getSymName()
Definition Ops.cpp.inc:1059
size_t numConstOps()
Return the number of ops of type OpT within the body region.
Definition Ops.h.inc:933
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:977
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:862
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1128
TemplateOpAdaptor Adaptor
Definition Ops.h.inc:830
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:835
inline ::llvm::iterator_range<::mlir::Region::op_iterator< OpT > > getConstOps()
Return ops of type OpT within the body region.
Definition Ops.h.inc:921
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1194
TemplateParamOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1075
TemplateParamOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1075
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1086
TemplateParamOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:1079
TemplateParamOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1084
TemplateParamOpGenericAdaptor(RangeT values, const TemplateParamOpGenericAdaptorBase &base)
Definition Ops.h.inc:1081
TemplateParamOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1077
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1417
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1300
void setSymName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:1342
::mlir::StringAttr getTypeOptAttrName()
Definition Ops.h.inc:1132
void setTypeOpt(::std::optional<::mlir::Type > attrValue)
Definition Ops.cpp.inc:1346
::mlir::Attribute removeTypeOptAttr()
Definition Ops.h.inc:1193
::mlir::TypeAttr getTypeOptAttr()
Definition Ops.h.inc:1178
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::TypeAttr type_opt)
Definition Ops.cpp.inc:1354
TemplateParamOpAdaptor Adaptor
Definition Ops.h.inc:1114
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1119
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1244
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1282
void setSymNameAttr(::mlir::StringAttr attr)
Definition Ops.h.inc:1183
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1144
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1118
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1158
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1421
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1148
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:1325
TemplateParamOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1116
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:63
::mlir::StringAttr getTypeOptAttrName(::mlir::OperationName name)
Definition Ops.h.inc:1136
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:1315
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1447
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1207
::mlir::StringAttr getSymNameAttrName()
Definition Ops.h.inc:1124
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1154
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1117
::mlir::StringAttr getSymNameAttr()
Definition Ops.h.inc:1173
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1140
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1294
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1404
::std::optional<::mlir::Type > getTypeOpt()
Definition Ops.cpp.inc:1337
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1273
void setTypeOptAttr(::mlir::TypeAttr attr)
Definition Ops.h.inc:1188
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1267
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:1128
UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1264
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1476
UnifiableCastOpGenericAdaptor(RangeT values, const UnifiableCastOpGenericAdaptorBase &base)
Definition Ops.h.inc:1268
UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1264
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1273
UnifiableCastOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1271
UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1266
::llvm::LogicalResult verify()
Definition Ops.cpp:207
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1336
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input)
Definition Ops.cpp.inc:1480
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:1566
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1308
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1321
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1313
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1309
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1317
::mlir::OpOperand & getInputMutable()
Definition Ops.h.inc:1331
UnifiableCastOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1307
::mlir::TypedValue<::mlir::Type > getInput()
Definition Ops.h.inc:1327
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:1346
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1499
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1521
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1340
UnifiableCastOpAdaptor Adaptor
Definition Ops.h.inc:1305
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1527
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1556
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1584
YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1401
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1410
YieldOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1408
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:1414
YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1403
YieldOpGenericAdaptor(RangeT values, const YieldOpGenericAdaptorBase &base)
Definition Ops.h.inc:1405
YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1401
::mlir::OpOperand & getValMutable()
Definition Ops.h.inc:1468
::mlir::MutableOperandRange getMutableSuccessorOperands(::mlir::RegionBranchPoint point)
Definition Ops.cpp.inc:1668
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1606
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1652
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1446
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1450
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1454
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1445
YieldOpAdaptor Adaptor
Definition Ops.h.inc:1442
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1477
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1623
YieldOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1444
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1619
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1458
::mlir::TypedValue<::mlir::Type > getVal()
Definition Ops.h.inc:1464
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value val)
Definition Ops.cpp.inc:1588
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1473
ApplyMapOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:95
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:165
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:91
ConstReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:339
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:345
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:335
TemplateExprOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:540
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:536
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:546
TemplateOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:752
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:758
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:748
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1034
TemplateParamOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1038
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:1044
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1240
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:1249
UnifiableCastOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1243
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1377
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:1386
YieldOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1380
void setMap(const ::mlir::AffineMapAttr &propValue)
Definition Ops.h.inc:66
void setNumDims(const ::mlir::IntegerAttr &propValue)
Definition Ops.h.inc:76
void setConstName(const ::mlir::FlatSymbolRefAttr &propValue)
Definition Ops.h.inc:321
void setSymName(const ::mlir::StringAttr &propValue)
Definition Ops.h.inc:734