LLZK 3.0.0
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Ops.h.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op Declarations *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: Ops.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10namespace llzk::polymorphic {
11
30class ApplyMapOp;
31
32} // namespace llzk::polymorphic
33namespace llzk::polymorphic {
34
49class ConstReadOp;
50
51} // namespace llzk::polymorphic
52namespace llzk::polymorphic {
53
72class TemplateExprOp;
73
74} // namespace llzk::polymorphic
75namespace llzk::polymorphic {
76
115class TemplateOp;
116
117} // namespace llzk::polymorphic
118namespace llzk::polymorphic {
119
133class TemplateParamOp;
134
135} // namespace llzk::polymorphic
136namespace llzk::polymorphic {
137
155class UnifiableCastOp;
156
157} // namespace llzk::polymorphic
158namespace llzk::polymorphic {
159
163class YieldOp;
164
165} // namespace llzk::polymorphic
166#ifdef GET_OP_CLASSES
167#undef GET_OP_CLASSES
168
169namespace llzk::polymorphic {
170
171
172//===----------------------------------------------------------------------===//
173// ::llzk::polymorphic::ApplyMapOp declarations
174//===----------------------------------------------------------------------===//
175
176namespace detail {
177
179public:
180 struct Properties {
181 using mapTy = ::mlir::AffineMapAttr;
183
184 auto getMap() const {
185 auto &propStorage = this->map;
186 return ::llvm::cast<::mlir::AffineMapAttr>(propStorage);
187 }
188 void setMap(const ::mlir::AffineMapAttr &propValue) {
189 this->map = propValue;
190 }
191 using numDimsTy = ::mlir::IntegerAttr;
193
194 auto getNumDims() const {
195 auto &propStorage = this->numDims;
196 return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
197 }
198 void setNumDims(const ::mlir::IntegerAttr &propValue) {
199 this->numDims = propValue;
200 }
201 bool operator==(const Properties &rhs) const {
202 return
203 rhs.map == this->map &&
204 rhs.numDims == this->numDims &&
205 true;
206 }
207 bool operator!=(const Properties &rhs) const {
208 return !(*this == rhs);
209 }
210 };
211protected:
212 ::mlir::DictionaryAttr odsAttrs;
213 ::std::optional<::mlir::OperationName> odsOpName;
215 ::mlir::RegionRange odsRegions;
216public:
217 ApplyMapOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
218 odsOpName.emplace("poly.applymap", odsAttrs.getContext());
219 }
220
222
223 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
225 return properties;
226 }
227
228 ::mlir::DictionaryAttr getAttributes() {
229 return odsAttrs;
230 }
231
232 ::mlir::AffineMapAttr getMapAttr() {
233 auto attr = ::llvm::cast<::mlir::AffineMapAttr>(getProperties().map);
234 return attr;
235 }
236
237 ::mlir::AffineMap getMap();
238 ::mlir::IntegerAttr getNumDimsAttr() {
239 auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().numDims);
240 return attr;
241 }
242
243 ::llvm::APInt getNumDims();
244};
245
246} // namespace detail
247template <typename RangeT>
249 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
251 static constexpr int odsIndex_mapOperands = 0;
252public:
253 ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
254
255 ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ApplyMapOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
256
257 ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ApplyMapOpGenericAdaptor(values, attrs, Properties{}, {}) {}
258
259 ApplyMapOpGenericAdaptor(RangeT values, const ApplyMapOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
260
261 template <typename LateInst = ApplyMapOp, typename = std::enable_if_t<std::is_same_v<LateInst, ApplyMapOp>>>
262 ApplyMapOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
263
264 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
265 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
266 }
267
268 RangeT getODSOperands(unsigned index) {
269 auto valueRange = getODSOperandIndexAndLength(index);
270 return {std::next(odsOperands.begin(), valueRange.first),
271 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
272 }
273
274 RangeT getMapOperands() {
275 return getODSOperands(0);
276 }
277
278 RangeT getOperands() {
279 return odsOperands;
280 }
281
282private:
283 RangeT odsOperands;
284};
285class ApplyMapOpAdaptor : public ApplyMapOpGenericAdaptor<::mlir::ValueRange> {
286public:
289
290 ::llvm::LogicalResult verify(::mlir::Location loc);
291};
292class 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> {
293public:
294 using Op::Op;
295 using Op::print;
297 template <typename RangeT>
300 static constexpr int odsIndex_mapOperands = 0;
302 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
303 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("map"), ::llvm::StringRef("numDims")};
304 return ::llvm::ArrayRef(attrNames);
305 }
306
307 ::mlir::StringAttr getMapAttrName() {
308 return getAttributeNameForIndex(0);
309 }
310
311 static ::mlir::StringAttr getMapAttrName(::mlir::OperationName name) {
312 return getAttributeNameForIndex(name, 0);
313 }
314
315 ::mlir::StringAttr getNumDimsAttrName() {
316 return getAttributeNameForIndex(1);
317 }
318
319 static ::mlir::StringAttr getNumDimsAttrName(::mlir::OperationName name) {
320 return getAttributeNameForIndex(name, 1);
321 }
322
323 static constexpr ::llvm::StringLiteral getOperationName() {
324 return ::llvm::StringLiteral("poly.applymap");
325 }
326
327 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
328 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
329 auto valueRange = getODSOperandIndexAndLength(index);
330 return {std::next(getOperation()->operand_begin(), valueRange.first),
331 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
332 }
333
334 ::mlir::Operation::operand_range getMapOperands() {
335 return getODSOperands(0);
336 }
337
338 ::mlir::MutableOperandRange getMapOperandsMutable();
339 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
340 return {index, 1};
341 }
342
343 ::mlir::Operation::result_range getODSResults(unsigned index) {
344 auto valueRange = getODSResultIndexAndLength(index);
345 return {std::next(getOperation()->result_begin(), valueRange.first),
346 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
347 }
348
349 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
350 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
351 static llvm::hash_code computePropertiesHash(const Properties &prop);
352 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
353 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
354 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
355 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
356 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
357 void writeProperties(::mlir::DialectBytecodeWriter &writer);
358 ::mlir::AffineMapAttr getMapAttr() {
359 return ::llvm::cast<::mlir::AffineMapAttr>(getProperties().map);
360 }
361
362 ::mlir::AffineMap getMap();
363 ::mlir::IntegerAttr getNumDimsAttr() {
364 return ::llvm::cast<::mlir::IntegerAttr>(getProperties().numDims);
365 }
366
367 ::llvm::APInt getNumDims();
368 void setMapAttr(::mlir::AffineMapAttr attr) {
369 getProperties().map = attr;
370 }
371
372 void setMap(::mlir::AffineMap attrValue);
373 void setNumDimsAttr(::mlir::IntegerAttr attr) {
374 getProperties().numDims = attr;
375 }
376
377 void setNumDims(::llvm::APInt attrValue);
378 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMapAttr map, ::mlir::ValueRange mapOperands = {});
379 static ApplyMapOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::AffineMapAttr map, ::mlir::ValueRange mapOperands = {});
380 static ApplyMapOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::AffineMapAttr map, ::mlir::ValueRange mapOperands = {});
381 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMap map, ::mlir::ValueRange mapOperands = {});
382 static ApplyMapOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::AffineMap map, ::mlir::ValueRange mapOperands = {});
383 static ApplyMapOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::AffineMap map, ::mlir::ValueRange mapOperands = {});
384 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineExpr expr, ::mlir::ValueRange mapOperands = {});
385 static ApplyMapOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::AffineExpr expr, ::mlir::ValueRange mapOperands = {});
386 static ApplyMapOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::AffineExpr expr, ::mlir::ValueRange mapOperands = {});
387 ::llvm::LogicalResult verifyInvariantsImpl();
388 ::llvm::LogicalResult verifyInvariants();
389 ::llvm::LogicalResult verify();
390 ::mlir::OpFoldResult fold(FoldAdaptor adaptor);
391 static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
392 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
393 void print(::mlir::OpAsmPrinter &_odsPrinter);
394 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
395private:
396 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
397 return getAttributeNameForIndex((*this)->getName(), index);
398 }
399
400 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
401 assert(index < 2 && "invalid attribute index");
402 assert(name.getStringRef() == getOperationName() && "invalid operation name");
403 assert(name.isRegistered() && "Operation isn't registered, missing a "
404 "dependent dialect loading?");
405 return name.getAttributeNames()[index];
406 }
407
408public:
410 ::mlir::AffineMap inline getAffineMap() { return getMap(); }
411
413 ::mlir::affine::AffineValueMap getAffineValueMap() {
414 return ::mlir::affine::AffineValueMap(getAffineMap(), getOperands(), getResult());
415 }
416
418 ::mlir::ValueRange getDimOperands() {
419 return ::mlir::OperandRange{
420 getOperands().begin(),
421 getOperands().begin() + getMap().getNumDims()};
422 }
423
425 ::mlir::ValueRange getSymbolOperands() {
426 return ::mlir::OperandRange{
427 getOperands().begin() + getMap().getNumDims(),
428 getOperands().end()};
429 }
430};
431
432} // namespace llzk::polymorphic
433MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::polymorphic::ApplyMapOp)
435
436namespace llzk::polymorphic {
437
438
439//===----------------------------------------------------------------------===//
440// ::llzk::polymorphic::ConstReadOp declarations
441//===----------------------------------------------------------------------===//
442
443namespace detail {
444
446public:
447 struct Properties {
448 using const_nameTy = ::mlir::FlatSymbolRefAttr;
450
451 auto getConstName() const {
452 auto &propStorage = this->const_name;
453 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(propStorage);
454 }
455 void setConstName(const ::mlir::FlatSymbolRefAttr &propValue) {
456 this->const_name = propValue;
457 }
458 bool operator==(const Properties &rhs) const {
459 return
460 rhs.const_name == this->const_name &&
461 true;
462 }
463 bool operator!=(const Properties &rhs) const {
464 return !(*this == rhs);
465 }
466 };
467protected:
468 ::mlir::DictionaryAttr odsAttrs;
469 ::std::optional<::mlir::OperationName> odsOpName;
471 ::mlir::RegionRange odsRegions;
472public:
473 ConstReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
474 odsOpName.emplace("poly.read_const", odsAttrs.getContext());
475 }
476
478
479 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
480 return {index, 1};
481 }
482
484 return properties;
485 }
486
487 ::mlir::DictionaryAttr getAttributes() {
488 return odsAttrs;
489 }
490
491 ::mlir::FlatSymbolRefAttr getConstNameAttr() {
492 auto attr = ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().const_name);
493 return attr;
494 }
495
496 ::llvm::StringRef getConstName();
497};
498
499} // namespace detail
500template <typename RangeT>
502 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
504public:
505 ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
506
507 ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConstReadOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
508
509 ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConstReadOpGenericAdaptor(values, attrs, Properties{}, {}) {}
510
511 ConstReadOpGenericAdaptor(RangeT values, const ConstReadOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
512
513 template <typename LateInst = ConstReadOp, typename = std::enable_if_t<std::is_same_v<LateInst, ConstReadOp>>>
514 ConstReadOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
515
516 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
517 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
518 }
519
520 RangeT getODSOperands(unsigned index) {
521 auto valueRange = getODSOperandIndexAndLength(index);
522 return {std::next(odsOperands.begin(), valueRange.first),
523 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
524 }
525
526 RangeT getOperands() {
527 return odsOperands;
528 }
529
530private:
531 RangeT odsOperands;
532};
533class ConstReadOpAdaptor : public ConstReadOpGenericAdaptor<::mlir::ValueRange> {
534public:
537
538 ::llvm::LogicalResult verify(::mlir::Location loc);
539};
540class 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> {
541public:
542 using Op::Op;
543 using Op::print;
545 template <typename RangeT>
549 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
550 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("const_name")};
551 return ::llvm::ArrayRef(attrNames);
552 }
553
554 ::mlir::StringAttr getConstNameAttrName() {
555 return getAttributeNameForIndex(0);
556 }
557
558 static ::mlir::StringAttr getConstNameAttrName(::mlir::OperationName name) {
559 return getAttributeNameForIndex(name, 0);
560 }
561
562 static constexpr ::llvm::StringLiteral getOperationName() {
563 return ::llvm::StringLiteral("poly.read_const");
564 }
565
566 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
567 return {index, 1};
568 }
569
570 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
571 auto valueRange = getODSOperandIndexAndLength(index);
572 return {std::next(getOperation()->operand_begin(), valueRange.first),
573 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
574 }
575
576 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
577 return {index, 1};
578 }
579
580 ::mlir::Operation::result_range getODSResults(unsigned index) {
581 auto valueRange = getODSResultIndexAndLength(index);
582 return {std::next(getOperation()->result_begin(), valueRange.first),
583 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
584 }
585
586 ::mlir::TypedValue<::mlir::Type> getVal() {
587 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
588 }
589
590 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
591 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
592 static llvm::hash_code computePropertiesHash(const Properties &prop);
593 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
594 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
595 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
596 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
597 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
598 void writeProperties(::mlir::DialectBytecodeWriter &writer);
599 ::mlir::FlatSymbolRefAttr getConstNameAttr() {
600 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().const_name);
601 }
602
603 ::llvm::StringRef getConstName();
604 void setConstNameAttr(::mlir::FlatSymbolRefAttr attr) {
605 getProperties().const_name = attr;
606 }
607
608 void setConstName(::llvm::StringRef attrValue);
609 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::FlatSymbolRefAttr const_name);
610 static ConstReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type val, ::mlir::FlatSymbolRefAttr const_name);
611 static ConstReadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type val, ::mlir::FlatSymbolRefAttr const_name);
612 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::FlatSymbolRefAttr const_name);
613 static ConstReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::FlatSymbolRefAttr const_name);
614 static ConstReadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::FlatSymbolRefAttr const_name);
615 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::llvm::StringRef const_name);
616 static ConstReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type val, ::llvm::StringRef const_name);
617 static ConstReadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type val, ::llvm::StringRef const_name);
618 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef const_name);
619 static ConstReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::llvm::StringRef const_name);
620 static ConstReadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::llvm::StringRef const_name);
621 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
622 static ConstReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
623 static ConstReadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
624 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
625 static ConstReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
626 static ConstReadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
627 ::llvm::LogicalResult verifyInvariantsImpl();
628 ::llvm::LogicalResult verifyInvariants();
629 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
630 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
631 void print(::mlir::OpAsmPrinter &_odsPrinter);
632 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
633private:
634 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
635 return getAttributeNameForIndex((*this)->getName(), index);
636 }
637
638 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
639 assert(index < 1 && "invalid attribute index");
640 assert(name.getStringRef() == getOperationName() && "invalid operation name");
641 assert(name.isRegistered() && "Operation isn't registered, missing a "
642 "dependent dialect loading?");
643 return name.getAttributeNames()[index];
644 }
645
646public:
647};
648
649} // namespace llzk::polymorphic
650MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::polymorphic::ConstReadOp)
652
653namespace llzk::polymorphic {
654
655
656//===----------------------------------------------------------------------===//
657// ::llzk::polymorphic::TemplateExprOp declarations
658//===----------------------------------------------------------------------===//
659
660namespace detail {
661
663public:
664 struct Properties {
665 using sym_nameTy = ::mlir::StringAttr;
667
668 auto getSymName() const {
669 auto &propStorage = this->sym_name;
670 return ::llvm::cast<::mlir::StringAttr>(propStorage);
671 }
672 void setSymName(const ::mlir::StringAttr &propValue) {
673 this->sym_name = propValue;
674 }
675 bool operator==(const Properties &rhs) const {
676 return
677 rhs.sym_name == this->sym_name &&
678 true;
679 }
680 bool operator!=(const Properties &rhs) const {
681 return !(*this == rhs);
682 }
683 };
684protected:
685 ::mlir::DictionaryAttr odsAttrs;
686 ::std::optional<::mlir::OperationName> odsOpName;
688 ::mlir::RegionRange odsRegions;
689public:
690 TemplateExprOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
691 odsOpName.emplace("poly.expr", odsAttrs.getContext());
692 }
693
695
696 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
697 return {index, 1};
698 }
699
701 return properties;
702 }
703
704 ::mlir::DictionaryAttr getAttributes() {
705 return odsAttrs;
706 }
707
708 ::mlir::StringAttr getSymNameAttr() {
709 auto attr = ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
710 return attr;
711 }
712
713 ::llvm::StringRef getSymName();
714 ::mlir::Region &getInitializerRegion() {
715 return *odsRegions[0];
716 }
717
718 ::mlir::RegionRange getRegions() {
719 return odsRegions;
720 }
721
722};
723
724} // namespace detail
725template <typename RangeT>
727 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
729public:
730 TemplateExprOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
731
732 TemplateExprOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : TemplateExprOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
733
734 TemplateExprOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : TemplateExprOpGenericAdaptor(values, attrs, Properties{}, {}) {}
735
736 TemplateExprOpGenericAdaptor(RangeT values, const TemplateExprOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
737
738 template <typename LateInst = TemplateExprOp, typename = std::enable_if_t<std::is_same_v<LateInst, TemplateExprOp>>>
739 TemplateExprOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
740
741 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
742 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
743 }
744
745 RangeT getODSOperands(unsigned index) {
746 auto valueRange = getODSOperandIndexAndLength(index);
747 return {std::next(odsOperands.begin(), valueRange.first),
748 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
749 }
750
751 RangeT getOperands() {
752 return odsOperands;
753 }
754
755private:
756 RangeT odsOperands;
757};
758class TemplateExprOpAdaptor : public TemplateExprOpGenericAdaptor<::mlir::ValueRange> {
759public:
762
763 ::llvm::LogicalResult verify(::mlir::Location loc);
764};
765class 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> {
766public:
767 using Op::Op;
768 using Op::print;
770 template <typename RangeT>
774 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
775 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("sym_name")};
776 return ::llvm::ArrayRef(attrNames);
777 }
778
779 ::mlir::StringAttr getSymNameAttrName() {
780 return getAttributeNameForIndex(0);
781 }
782
783 static ::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name) {
784 return getAttributeNameForIndex(name, 0);
785 }
786
787 static constexpr ::llvm::StringLiteral getOperationName() {
788 return ::llvm::StringLiteral("poly.expr");
789 }
790
791 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
792 return {index, 1};
793 }
794
795 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
796 auto valueRange = getODSOperandIndexAndLength(index);
797 return {std::next(getOperation()->operand_begin(), valueRange.first),
798 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
799 }
800
801 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
802 return {index, 1};
803 }
804
805 ::mlir::Operation::result_range getODSResults(unsigned index) {
806 auto valueRange = getODSResultIndexAndLength(index);
807 return {std::next(getOperation()->result_begin(), valueRange.first),
808 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
809 }
810
811 ::mlir::Region &getInitializerRegion() {
812 return (*this)->getRegion(0);
813 }
814
815 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
816 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
817 static llvm::hash_code computePropertiesHash(const Properties &prop);
818 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
819 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
820 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
821 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
822 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
823 void writeProperties(::mlir::DialectBytecodeWriter &writer);
824 ::mlir::StringAttr getSymNameAttr() {
825 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
826 }
827
828 ::llvm::StringRef getSymName();
829 void setSymNameAttr(::mlir::StringAttr attr) {
830 getProperties().sym_name = attr;
831 }
832
833 void setSymName(::llvm::StringRef attrValue);
834 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name);
835 static TemplateExprOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name);
836 static TemplateExprOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::StringAttr sym_name);
837 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name);
838 static TemplateExprOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name);
839 static TemplateExprOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name);
840 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name);
841 static TemplateExprOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llvm::StringRef sym_name);
842 static TemplateExprOp create(::mlir::ImplicitLocOpBuilder &builder, ::llvm::StringRef sym_name);
843 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name);
844 static TemplateExprOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name);
845 static TemplateExprOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name);
846 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
847 static TemplateExprOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
848 static TemplateExprOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
849 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
850 static TemplateExprOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
851 static TemplateExprOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
852 ::llvm::LogicalResult verifyInvariantsImpl();
853 ::llvm::LogicalResult verifyInvariants();
854 ::llvm::LogicalResult verifyRegions();
855 ::std::optional<::mlir::Type> getTypeOpt();
856 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
857 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
858 void print(::mlir::OpAsmPrinter &_odsPrinter);
859private:
860 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
861 return getAttributeNameForIndex((*this)->getName(), index);
862 }
863
864 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
865 assert(index < 1 && "invalid attribute index");
866 assert(name.getStringRef() == getOperationName() && "invalid operation name");
867 assert(name.isRegistered() && "Operation isn't registered, missing a "
868 "dependent dialect loading?");
869 return name.getAttributeNames()[index];
870 }
871
872public:
874 ::mlir::Type getType();
875};
876
877} // namespace llzk::polymorphic
878MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::polymorphic::TemplateExprOp)
880
881namespace llzk::polymorphic {
882
883
884//===----------------------------------------------------------------------===//
885// ::llzk::polymorphic::TemplateOp declarations
886//===----------------------------------------------------------------------===//
887
888namespace detail {
889
891public:
892 struct Properties {
893 using sym_nameTy = ::mlir::StringAttr;
895
896 auto getSymName() const {
897 auto &propStorage = this->sym_name;
898 return ::llvm::cast<::mlir::StringAttr>(propStorage);
899 }
900 void setSymName(const ::mlir::StringAttr &propValue) {
901 this->sym_name = propValue;
902 }
903 bool operator==(const Properties &rhs) const {
904 return
905 rhs.sym_name == this->sym_name &&
906 true;
907 }
908 bool operator!=(const Properties &rhs) const {
909 return !(*this == rhs);
910 }
911 };
912protected:
913 ::mlir::DictionaryAttr odsAttrs;
914 ::std::optional<::mlir::OperationName> odsOpName;
916 ::mlir::RegionRange odsRegions;
917public:
918 TemplateOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
919 odsOpName.emplace("poly.template", odsAttrs.getContext());
920 }
921
923
924 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
925 return {index, 1};
926 }
927
929 return properties;
930 }
931
932 ::mlir::DictionaryAttr getAttributes() {
933 return odsAttrs;
934 }
935
936 ::mlir::StringAttr getSymNameAttr() {
937 auto attr = ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
938 return attr;
939 }
940
941 ::llvm::StringRef getSymName();
942 ::mlir::Region &getBodyRegion() {
943 return *odsRegions[0];
944 }
945
946 ::mlir::RegionRange getRegions() {
947 return odsRegions;
948 }
949
950};
951
952} // namespace detail
953template <typename RangeT>
955 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
957public:
958 TemplateOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
959
960 TemplateOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : TemplateOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
961
962 TemplateOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : TemplateOpGenericAdaptor(values, attrs, Properties{}, {}) {}
963
964 TemplateOpGenericAdaptor(RangeT values, const TemplateOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
965
966 template <typename LateInst = TemplateOp, typename = std::enable_if_t<std::is_same_v<LateInst, TemplateOp>>>
967 TemplateOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
968
969 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
970 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
971 }
972
973 RangeT getODSOperands(unsigned index) {
974 auto valueRange = getODSOperandIndexAndLength(index);
975 return {std::next(odsOperands.begin(), valueRange.first),
976 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
977 }
978
979 RangeT getOperands() {
980 return odsOperands;
981 }
982
983private:
984 RangeT odsOperands;
985};
986class TemplateOpAdaptor : public TemplateOpGenericAdaptor<::mlir::ValueRange> {
987public:
990
991 ::llvm::LogicalResult verify(::mlir::Location loc);
992};
993class 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> {
994public:
995 using Op::Op;
996 using Op::print;
998 template <typename RangeT>
1002 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1003 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("sym_name")};
1004 return ::llvm::ArrayRef(attrNames);
1005 }
1006
1007 ::mlir::StringAttr getSymNameAttrName() {
1008 return getAttributeNameForIndex(0);
1009 }
1010
1011 static ::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name) {
1012 return getAttributeNameForIndex(name, 0);
1013 }
1014
1015 static constexpr ::llvm::StringLiteral getOperationName() {
1016 return ::llvm::StringLiteral("poly.template");
1017 }
1018
1019 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1020 return {index, 1};
1021 }
1022
1023 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1024 auto valueRange = getODSOperandIndexAndLength(index);
1025 return {std::next(getOperation()->operand_begin(), valueRange.first),
1026 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1027 }
1028
1029 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1030 return {index, 1};
1031 }
1032
1033 ::mlir::Operation::result_range getODSResults(unsigned index) {
1034 auto valueRange = getODSResultIndexAndLength(index);
1035 return {std::next(getOperation()->result_begin(), valueRange.first),
1036 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1037 }
1038
1039 ::mlir::Region &getBodyRegion() {
1040 return (*this)->getRegion(0);
1041 }
1042
1043 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1044 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1045 static llvm::hash_code computePropertiesHash(const Properties &prop);
1046 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1047 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1048 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
1049 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1050 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
1051 void writeProperties(::mlir::DialectBytecodeWriter &writer);
1052 ::mlir::StringAttr getSymNameAttr() {
1053 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
1054 }
1055
1056 ::llvm::StringRef getSymName();
1057 void setSymNameAttr(::mlir::StringAttr attr) {
1058 getProperties().sym_name = attr;
1059 }
1060
1061 void setSymName(::llvm::StringRef attrValue);
1062 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name);
1063 static TemplateOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name);
1064 static TemplateOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::StringAttr sym_name);
1065 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name);
1066 static TemplateOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name);
1067 static TemplateOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name);
1068 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name);
1069 static TemplateOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llvm::StringRef sym_name);
1070 static TemplateOp create(::mlir::ImplicitLocOpBuilder &builder, ::llvm::StringRef sym_name);
1071 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name);
1072 static TemplateOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name);
1073 static TemplateOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name);
1074 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1075 static TemplateOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1076 static TemplateOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1077 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1078 static TemplateOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1079 static TemplateOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1080 ::llvm::LogicalResult verifyInvariantsImpl();
1081 ::llvm::LogicalResult verifyInvariants();
1082 ::llvm::LogicalResult verify();
1083 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1084 void print(::mlir::OpAsmPrinter &_odsPrinter);
1085private:
1086 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
1087 return getAttributeNameForIndex((*this)->getName(), index);
1088 }
1089
1090 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
1091 assert(index < 1 && "invalid attribute index");
1092 assert(name.getStringRef() == getOperationName() && "invalid operation name");
1093 assert(name.isRegistered() && "Operation isn't registered, missing a "
1094 "dependent dialect loading?");
1095 return name.getAttributeNames()[index];
1096 }
1097
1098public:
1101 template <TemplateSymbolBindingOp OpT>
1102 inline ::llvm::iterator_range<::mlir::Region::op_iterator<OpT>> getConstOps() {
1103 return getBodyRegion().getOps<OpT>();
1104 }
1105
1107 template <TemplateSymbolBindingOp OpT>
1108 inline bool hasConstOps() {
1109 return !getConstOps<OpT>().empty();
1110 }
1111
1113 template <TemplateSymbolBindingOp OpT>
1114 inline size_t numConstOps() {
1115 return llvm::range_size(getConstOps<OpT>());
1116 }
1117
1121 template <TemplateSymbolBindingOp OpT>
1122 ::llvm::SmallVector<::mlir::Attribute> getConstNames() {
1123 return ::llvm::to_vector(::llvm::map_range(getConstOps<OpT>(), [](auto p) -> ::mlir::Attribute {
1124 return ::mlir::FlatSymbolRefAttr::get(p.getNameAttr());
1125 }));
1126 }
1127
1129 template <TemplateSymbolBindingOp OpT>
1130 inline bool hasConstNamed(::mlir::StringRef find) {
1131 return ::llvm::any_of(getConstOps<OpT>(), [&](OpT op) {
1132 return op.getName() == find;
1133 });
1134 }
1135
1137 template <TemplateSymbolBindingOp OpT>
1138 inline bool hasConstNamed(::mlir::StringAttr find) {
1139 return hasConstNamed<OpT>(find.strref());
1140 }
1141
1143 template <TemplateSymbolBindingOp OpT>
1144 inline bool hasConstNamed(::mlir::FlatSymbolRefAttr find) {
1145 return hasConstNamed<OpT>(find.getRootReference());
1146 }
1147
1149 template <TemplateSymbolBindingOp OpT>
1150 inline OpT getConstNamed(::mlir::StringRef find) {
1151 auto range = getConstOps<OpT>();
1152 auto it = ::llvm::find_if(range, [&find](OpT op) { return op.getName() == find; });
1153 return it != range.end() ? *it : OpT{};
1154 }
1155
1157 template <TemplateSymbolBindingOp OpT>
1158 inline OpT getConstNamed(::mlir::StringAttr find) {
1159 return getConstNamed<OpT>(find.strref());
1160 }
1161
1163 template <TemplateSymbolBindingOp OpT>
1164 inline OpT getConstNamed(::mlir::FlatSymbolRefAttr find) {
1165 return getConstNamed<OpT>(find.getRootReference());
1166 }
1167};
1168
1169} // namespace llzk::polymorphic
1170MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::polymorphic::TemplateOp)
1172
1173namespace llzk::polymorphic {
1174
1175
1176//===----------------------------------------------------------------------===//
1177// ::llzk::polymorphic::TemplateParamOp declarations
1178//===----------------------------------------------------------------------===//
1179
1180namespace detail {
1181
1183public:
1184 struct Properties {
1185 using sym_nameTy = ::mlir::StringAttr;
1187
1188 auto getSymName() const {
1189 auto &propStorage = this->sym_name;
1190 return ::llvm::cast<::mlir::StringAttr>(propStorage);
1191 }
1192 void setSymName(const ::mlir::StringAttr &propValue) {
1193 this->sym_name = propValue;
1194 }
1195 using type_optTy = ::mlir::TypeAttr;
1197
1198 auto getTypeOpt() const {
1199 auto &propStorage = this->type_opt;
1200 return ::llvm::dyn_cast_or_null<::mlir::TypeAttr>(propStorage);
1201 }
1202 void setTypeOpt(const ::mlir::TypeAttr &propValue) {
1203 this->type_opt = propValue;
1204 }
1205 bool operator==(const Properties &rhs) const {
1206 return
1207 rhs.sym_name == this->sym_name &&
1208 rhs.type_opt == this->type_opt &&
1209 true;
1210 }
1211 bool operator!=(const Properties &rhs) const {
1212 return !(*this == rhs);
1213 }
1214 };
1215protected:
1216 ::mlir::DictionaryAttr odsAttrs;
1217 ::std::optional<::mlir::OperationName> odsOpName;
1219 ::mlir::RegionRange odsRegions;
1220public:
1221 TemplateParamOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1222 odsOpName.emplace("poly.param", odsAttrs.getContext());
1223 }
1224
1226
1227 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1228 return {index, 1};
1229 }
1230
1232 return properties;
1233 }
1234
1235 ::mlir::DictionaryAttr getAttributes() {
1236 return odsAttrs;
1237 }
1238
1239 ::mlir::StringAttr getSymNameAttr() {
1240 auto attr = ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
1241 return attr;
1242 }
1243
1244 ::llvm::StringRef getSymName();
1245 ::mlir::TypeAttr getTypeOptAttr() {
1246 auto attr = ::llvm::dyn_cast_or_null<::mlir::TypeAttr>(getProperties().type_opt);
1247 return attr;
1248 }
1249
1250 ::std::optional<::mlir::Type> getTypeOpt();
1251};
1252
1253} // namespace detail
1254template <typename RangeT>
1256 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1258public:
1259 TemplateParamOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1260
1261 TemplateParamOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : TemplateParamOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
1262
1263 TemplateParamOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : TemplateParamOpGenericAdaptor(values, attrs, Properties{}, {}) {}
1264
1265 TemplateParamOpGenericAdaptor(RangeT values, const TemplateParamOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1266
1267 template <typename LateInst = TemplateParamOp, typename = std::enable_if_t<std::is_same_v<LateInst, TemplateParamOp>>>
1268 TemplateParamOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1269
1270 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1271 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1272 }
1273
1274 RangeT getODSOperands(unsigned index) {
1275 auto valueRange = getODSOperandIndexAndLength(index);
1276 return {std::next(odsOperands.begin(), valueRange.first),
1277 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1278 }
1279
1280 RangeT getOperands() {
1281 return odsOperands;
1282 }
1283
1284private:
1285 RangeT odsOperands;
1286};
1287class TemplateParamOpAdaptor : public TemplateParamOpGenericAdaptor<::mlir::ValueRange> {
1288public:
1291
1292 ::llvm::LogicalResult verify(::mlir::Location loc);
1293};
1294class 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> {
1295public:
1296 using Op::Op;
1297 using Op::print;
1299 template <typename RangeT>
1303 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1304 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("sym_name"), ::llvm::StringRef("type_opt")};
1305 return ::llvm::ArrayRef(attrNames);
1306 }
1307
1308 ::mlir::StringAttr getSymNameAttrName() {
1309 return getAttributeNameForIndex(0);
1310 }
1311
1312 static ::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name) {
1313 return getAttributeNameForIndex(name, 0);
1314 }
1315
1316 ::mlir::StringAttr getTypeOptAttrName() {
1317 return getAttributeNameForIndex(1);
1318 }
1319
1320 static ::mlir::StringAttr getTypeOptAttrName(::mlir::OperationName name) {
1321 return getAttributeNameForIndex(name, 1);
1322 }
1323
1324 static constexpr ::llvm::StringLiteral getOperationName() {
1325 return ::llvm::StringLiteral("poly.param");
1326 }
1327
1328 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1329 return {index, 1};
1330 }
1331
1332 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1333 auto valueRange = getODSOperandIndexAndLength(index);
1334 return {std::next(getOperation()->operand_begin(), valueRange.first),
1335 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1336 }
1337
1338 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1339 return {index, 1};
1340 }
1341
1342 ::mlir::Operation::result_range getODSResults(unsigned index) {
1343 auto valueRange = getODSResultIndexAndLength(index);
1344 return {std::next(getOperation()->result_begin(), valueRange.first),
1345 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1346 }
1347
1348 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1349 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1350 static llvm::hash_code computePropertiesHash(const Properties &prop);
1351 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1352 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1353 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
1354 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1355 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
1356 void writeProperties(::mlir::DialectBytecodeWriter &writer);
1357 ::mlir::StringAttr getSymNameAttr() {
1358 return ::llvm::cast<::mlir::StringAttr>(getProperties().sym_name);
1359 }
1360
1361 ::llvm::StringRef getSymName();
1362 ::mlir::TypeAttr getTypeOptAttr() {
1363 return ::llvm::dyn_cast_or_null<::mlir::TypeAttr>(getProperties().type_opt);
1364 }
1365
1366 ::std::optional<::mlir::Type> getTypeOpt();
1367 void setSymNameAttr(::mlir::StringAttr attr) {
1368 getProperties().sym_name = attr;
1369 }
1370
1371 void setSymName(::llvm::StringRef attrValue);
1372 void setTypeOptAttr(::mlir::TypeAttr attr) {
1373 getProperties().type_opt = attr;
1374 }
1375
1376 void setTypeOpt(::std::optional<::mlir::Type> attrValue);
1377 ::mlir::Attribute removeTypeOptAttr() {
1378 auto attr = getProperties().type_opt;
1379 getProperties().type_opt = {};
1380 return attr;
1381 }
1382
1383 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, /*optional*/::mlir::TypeAttr type_opt);
1384 static TemplateParamOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name, /*optional*/::mlir::TypeAttr type_opt);
1385 static TemplateParamOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::StringAttr sym_name, /*optional*/::mlir::TypeAttr type_opt);
1386 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, /*optional*/::mlir::TypeAttr type_opt);
1387 static TemplateParamOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, /*optional*/::mlir::TypeAttr type_opt);
1388 static TemplateParamOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, /*optional*/::mlir::TypeAttr type_opt);
1389 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, /*optional*/::mlir::TypeAttr type_opt);
1390 static TemplateParamOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llvm::StringRef sym_name, /*optional*/::mlir::TypeAttr type_opt);
1391 static TemplateParamOp create(::mlir::ImplicitLocOpBuilder &builder, ::llvm::StringRef sym_name, /*optional*/::mlir::TypeAttr type_opt);
1392 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, /*optional*/::mlir::TypeAttr type_opt);
1393 static TemplateParamOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, /*optional*/::mlir::TypeAttr type_opt);
1394 static TemplateParamOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, /*optional*/::mlir::TypeAttr type_opt);
1395 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1396 static TemplateParamOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1397 static TemplateParamOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1398 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1399 static TemplateParamOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1400 static TemplateParamOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1401 ::llvm::LogicalResult verifyInvariantsImpl();
1402 ::llvm::LogicalResult verifyInvariants();
1403 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
1404 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1405 void print(::mlir::OpAsmPrinter &_odsPrinter);
1406private:
1407 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
1408 return getAttributeNameForIndex((*this)->getName(), index);
1409 }
1410
1411 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
1412 assert(index < 2 && "invalid attribute index");
1413 assert(name.getStringRef() == getOperationName() && "invalid operation name");
1414 assert(name.isRegistered() && "Operation isn't registered, missing a "
1415 "dependent dialect loading?");
1416 return name.getAttributeNames()[index];
1417 }
1418
1419public:
1420};
1421
1422} // namespace llzk::polymorphic
1423MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::polymorphic::TemplateParamOp)
1425
1426namespace llzk::polymorphic {
1427
1428
1429//===----------------------------------------------------------------------===//
1430// ::llzk::polymorphic::UnifiableCastOp declarations
1431//===----------------------------------------------------------------------===//
1432
1433namespace detail {
1434
1436public:
1437 using Properties = ::mlir::EmptyProperties;
1438protected:
1439 ::mlir::DictionaryAttr odsAttrs;
1440 ::std::optional<::mlir::OperationName> odsOpName;
1442 ::mlir::RegionRange odsRegions;
1443public:
1444 UnifiableCastOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1445 odsOpName.emplace("poly.unifiable_cast", odsAttrs.getContext());
1446 }
1447
1449
1450 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1451 return {index, 1};
1452 }
1453
1455 return properties;
1456 }
1457
1458 ::mlir::DictionaryAttr getAttributes() {
1459 return odsAttrs;
1460 }
1461
1462};
1463
1464} // namespace detail
1465template <typename RangeT>
1467 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1469 static constexpr int odsIndex_input = 0;
1470public:
1471 UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1472
1473 UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UnifiableCastOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
1474
1475 UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : UnifiableCastOpGenericAdaptor(values, attrs, Properties{}, {}) {}
1476
1477 UnifiableCastOpGenericAdaptor(RangeT values, const UnifiableCastOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1478
1479 template <typename LateInst = UnifiableCastOp, typename = std::enable_if_t<std::is_same_v<LateInst, UnifiableCastOp>>>
1480 UnifiableCastOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1481
1482 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1483 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1484 }
1485
1486 RangeT getODSOperands(unsigned index) {
1487 auto valueRange = getODSOperandIndexAndLength(index);
1488 return {std::next(odsOperands.begin(), valueRange.first),
1489 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1490 }
1491
1492 ValueT getInput() {
1493 return (*getODSOperands(0).begin());
1494 }
1495
1496 RangeT getOperands() {
1497 return odsOperands;
1498 }
1499
1500private:
1501 RangeT odsOperands;
1502};
1503class UnifiableCastOpAdaptor : public UnifiableCastOpGenericAdaptor<::mlir::ValueRange> {
1504public:
1507
1508 ::llvm::LogicalResult verify(::mlir::Location loc);
1509};
1510class 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> {
1511public:
1512 using Op::Op;
1513 using Op::print;
1515 template <typename RangeT>
1518 static constexpr int odsIndex_input = 0;
1520 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1521 return {};
1522 }
1523
1524 static constexpr ::llvm::StringLiteral getOperationName() {
1525 return ::llvm::StringLiteral("poly.unifiable_cast");
1526 }
1527
1528 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1529 return {index, 1};
1530 }
1531
1532 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1533 auto valueRange = getODSOperandIndexAndLength(index);
1534 return {std::next(getOperation()->operand_begin(), valueRange.first),
1535 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1536 }
1537
1538 ::mlir::TypedValue<::mlir::Type> getInput() {
1539 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
1540 }
1541
1542 ::mlir::OpOperand &getInputMutable() {
1543 auto range = getODSOperandIndexAndLength(0);
1544 return getOperation()->getOpOperand(range.first);
1545 }
1546
1547 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1548 return {index, 1};
1549 }
1550
1551 ::mlir::Operation::result_range getODSResults(unsigned index) {
1552 auto valueRange = getODSResultIndexAndLength(index);
1553 return {std::next(getOperation()->result_begin(), valueRange.first),
1554 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1555 }
1556
1557 ::mlir::TypedValue<::mlir::Type> getResult() {
1558 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
1559 }
1560
1561 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1562 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1563 static llvm::hash_code computePropertiesHash(const Properties &prop);
1564 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1565 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1566 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
1567 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1568 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input);
1569 static UnifiableCastOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value input);
1570 static UnifiableCastOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value input);
1571 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input);
1572 static UnifiableCastOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value input);
1573 static UnifiableCastOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value input);
1574 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1575 static UnifiableCastOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1576 static UnifiableCastOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1577 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1578 static UnifiableCastOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1579 static UnifiableCastOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1580 ::llvm::LogicalResult verifyInvariantsImpl();
1581 ::llvm::LogicalResult verifyInvariants();
1582 ::llvm::LogicalResult verify();
1583 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1584 void print(::mlir::OpAsmPrinter &_odsPrinter);
1585 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
1586public:
1587};
1588
1589} // namespace llzk::polymorphic
1590MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::polymorphic::UnifiableCastOp)
1591
1592namespace llzk::polymorphic {
1593
1594
1595//===----------------------------------------------------------------------===//
1596// ::llzk::polymorphic::YieldOp declarations
1597//===----------------------------------------------------------------------===//
1598
1599namespace detail {
1600
1602public:
1603 using Properties = ::mlir::EmptyProperties;
1604protected:
1605 ::mlir::DictionaryAttr odsAttrs;
1606 ::std::optional<::mlir::OperationName> odsOpName;
1608 ::mlir::RegionRange odsRegions;
1609public:
1610 YieldOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1611 odsOpName.emplace("poly.yield", odsAttrs.getContext());
1612 }
1613
1615
1616 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
1617 return {index, 1};
1618 }
1619
1621 return properties;
1622 }
1623
1624 ::mlir::DictionaryAttr getAttributes() {
1625 return odsAttrs;
1626 }
1627
1628};
1629
1630} // namespace detail
1631template <typename RangeT>
1633 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1635 static constexpr int odsIndex_val = 0;
1636public:
1637 YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1638
1639 YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : YieldOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
1640
1641 YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : YieldOpGenericAdaptor(values, attrs, Properties{}, {}) {}
1642
1643 YieldOpGenericAdaptor(RangeT values, const YieldOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1644
1645 template <typename LateInst = YieldOp, typename = std::enable_if_t<std::is_same_v<LateInst, YieldOp>>>
1646 YieldOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1647
1648 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1649 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1650 }
1651
1652 RangeT getODSOperands(unsigned index) {
1653 auto valueRange = getODSOperandIndexAndLength(index);
1654 return {std::next(odsOperands.begin(), valueRange.first),
1655 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1656 }
1657
1658 ValueT getVal() {
1659 return (*getODSOperands(0).begin());
1660 }
1661
1662 RangeT getOperands() {
1663 return odsOperands;
1664 }
1665
1666private:
1667 RangeT odsOperands;
1668};
1669class YieldOpAdaptor : public YieldOpGenericAdaptor<::mlir::ValueRange> {
1670public:
1673
1674 ::llvm::LogicalResult verify(::mlir::Location loc);
1675};
1676class 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> {
1677public:
1678 using Op::Op;
1679 using Op::print;
1681 template <typename RangeT>
1684 static constexpr int odsIndex_val = 0;
1686 using ::mlir::RegionBranchTerminatorOpInterface::Trait<YieldOp>::getMutableSuccessorOperands;
1687 using ::mlir::RegionBranchTerminatorOpInterface::Trait<YieldOp>::getSuccessorRegions;
1688 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1689 return {};
1690 }
1691
1692 static constexpr ::llvm::StringLiteral getOperationName() {
1693 return ::llvm::StringLiteral("poly.yield");
1694 }
1695
1696 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1697 return {index, 1};
1698 }
1699
1700 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1701 auto valueRange = getODSOperandIndexAndLength(index);
1702 return {std::next(getOperation()->operand_begin(), valueRange.first),
1703 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1704 }
1705
1706 ::mlir::TypedValue<::mlir::Type> getVal() {
1707 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin());
1708 }
1709
1710 ::mlir::OpOperand &getValMutable() {
1711 auto range = getODSOperandIndexAndLength(0);
1712 return getOperation()->getOpOperand(range.first);
1713 }
1714
1715 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1716 return {index, 1};
1717 }
1718
1719 ::mlir::Operation::result_range getODSResults(unsigned index) {
1720 auto valueRange = getODSResultIndexAndLength(index);
1721 return {std::next(getOperation()->result_begin(), valueRange.first),
1722 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1723 }
1724
1725 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1726 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1727 static llvm::hash_code computePropertiesHash(const Properties &prop);
1728 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1729 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1730 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
1731 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1732 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value val);
1733 static YieldOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value val);
1734 static YieldOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value val);
1735 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val);
1736 static YieldOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val);
1737 static YieldOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val);
1738 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1739 static YieldOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1740 static YieldOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1741 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1742 static YieldOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1743 static YieldOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1744 ::llvm::LogicalResult verifyInvariantsImpl();
1745 ::llvm::LogicalResult verifyInvariants();
1746 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1747 void print(::mlir::OpAsmPrinter &_odsPrinter);
1748public:
1749};
1750
1751} // namespace llzk::polymorphic
1752MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::polymorphic::YieldOp)
1753
1754
1755#endif // GET_OP_CLASSES
1756
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:194
ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:253
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:264
ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:257
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:268
ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:255
ApplyMapOpGenericAdaptor(RangeT values, const ApplyMapOpGenericAdaptorBase &base)
Definition Ops.h.inc:259
ApplyMapOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:262
ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:253
::mlir::ValueRange getSymbolOperands()
Returns all symbol operands.
Definition Ops.h.inc:425
::mlir::AffineMapAttr getMapAttr()
Definition Ops.h.inc:358
::mlir::IntegerAttr getNumDimsAttr()
Definition Ops.h.inc:363
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:208
::mlir::ValueRange getDimOperands()
Returns all dimension operands.
Definition Ops.h.inc:418
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:343
::mlir::affine::AffineValueMap getAffineValueMap()
Returns the affine value map computed from this operation.
Definition Ops.h.inc:413
::mlir::Operation::operand_range getMapOperands()
Definition Ops.h.inc:334
::mlir::StringAttr getNumDimsAttrName(::mlir::OperationName name)
Definition Ops.h.inc:319
::mlir::OpFoldResult fold(FoldAdaptor adaptor)
Definition Ops.cpp:262
::llvm::LogicalResult verify()
Definition Ops.cpp:242
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:511
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:299
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:323
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:478
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:464
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:292
static ApplyMapOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::AffineMapAttr map, ::mlir::ValueRange mapOperands={})
Definition Ops.cpp.inc:385
FoldAdaptor::Properties Properties
Definition Ops.h.inc:301
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:470
::mlir::StringAttr getMapAttrName(::mlir::OperationName name)
Definition Ops.h.inc:311
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:328
ApplyMapOpAdaptor Adaptor
Definition Ops.h.inc:296
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMapAttr map, ::mlir::ValueRange mapOperands={})
Definition Ops.cpp.inc:375
::mlir::StringAttr getMapAttrName()
Definition Ops.h.inc:307
::mlir::AffineMap getMap()
Definition Ops.cpp.inc:357
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:302
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:320
ApplyMapOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:298
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:351
void setMap(::mlir::AffineMap attrValue)
Definition Ops.cpp.inc:367
void setNumDimsAttr(::mlir::IntegerAttr attr)
Definition Ops.h.inc:373
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:269
::mlir::StringAttr getNumDimsAttrName()
Definition Ops.h.inc:315
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:326
::mlir::MutableOperandRange getMapOperandsMutable()
Definition Ops.cpp.inc:226
static constexpr int odsIndex_mapOperands
Definition Ops.h.inc:300
::mlir::AffineMap getAffineMap()
Returns the affine map to be applied by this operation.
Definition Ops.h.inc:410
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:432
void setMapAttr(::mlir::AffineMapAttr attr)
Definition Ops.h.inc:368
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:308
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:341
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:232
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:522
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:299
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:339
void setNumDims(::llvm::APInt attrValue)
Definition Ops.cpp.inc:371
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:550
ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:505
ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:507
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:516
ConstReadOpGenericAdaptor(RangeT values, const ConstReadOpGenericAdaptorBase &base)
Definition Ops.h.inc:511
ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:505
ConstReadOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:514
ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:509
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:637
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:566
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:570
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:794
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:562
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:549
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:825
FoldAdaptor::Properties Properties
Definition Ops.h.inc:548
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:621
::mlir::TypedValue<::mlir::Type > getVal()
Definition Ops.h.inc:586
::mlir::StringAttr getConstNameAttrName()
Definition Ops.h.inc:554
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:582
ConstReadOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:546
::mlir::StringAttr getConstNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:558
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:610
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:580
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:559
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:598
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:576
void setConstName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:647
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:772
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:842
void setConstNameAttr(::mlir::FlatSymbolRefAttr attr)
Definition Ops.h.inc:604
::mlir::FlatSymbolRefAttr getConstNameAttr()
Definition Ops.h.inc:599
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::FlatSymbolRefAttr const_name)
Definition Ops.cpp.inc:651
ConstReadOpAdaptor Adaptor
Definition Ops.h.inc:544
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:604
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:617
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:630
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:790
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:200
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:547
static ConstReadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type val, ::mlir::FlatSymbolRefAttr const_name)
Definition Ops.cpp.inc:656
::llvm::StringRef getConstName()
Definition Ops.cpp.inc:642
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:870
TemplateExprOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:730
TemplateExprOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:739
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:741
TemplateExprOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:732
TemplateExprOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:730
TemplateExprOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:734
TemplateExprOpGenericAdaptor(RangeT values, const TemplateExprOpGenericAdaptorBase &base)
Definition Ops.h.inc:736
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:941
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:930
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:801
::mlir::StringAttr getSymNameAttr()
Definition Ops.h.inc:824
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:924
::llvm::LogicalResult verifyRegions()
Definition Ops.cpp:141
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:902
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:772
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:937
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:795
::mlir::Region & getInitializerRegion()
Definition Ops.h.inc:811
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:104
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:918
TemplateExprOpAdaptor Adaptor
Definition Ops.h.inc:769
::mlir::Type getType()
Returns the type of the poly.yield op in the initializer region.
Definition Ops.cpp:186
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:774
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1118
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1098
::llvm::StringRef getSymName()
Definition Ops.cpp.inc:962
void setSymName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:967
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:783
void setSymNameAttr(::mlir::StringAttr attr)
Definition Ops.h.inc:829
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:957
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:879
TemplateExprOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:771
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:950
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:805
FoldAdaptor::Properties Properties
Definition Ops.h.inc:773
::std::optional<::mlir::Type > getTypeOpt()
Definition Ops.cpp:194
static TemplateExprOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name)
Definition Ops.cpp.inc:976
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name)
Definition Ops.cpp.inc:971
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:791
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:787
::mlir::StringAttr getSymNameAttrName()
Definition Ops.h.inc:779
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1114
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1143
TemplateOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:958
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1178
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:969
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:973
TemplateOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:967
TemplateOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:958
TemplateOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:960
TemplateOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:962
TemplateOpGenericAdaptor(RangeT values, const TemplateOpGenericAdaptorBase &base)
Definition Ops.h.inc:964
::mlir::Region & getBodyRegion()
Definition Ops.h.inc:1039
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1249
::mlir::StringAttr getSymNameAttrName()
Definition Ops.h.inc:1007
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1226
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:1150
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1210
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:1011
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:1265
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1453
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1428
::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:1122
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1245
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name)
Definition Ops.cpp.inc:1279
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:1164
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:1130
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1232
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1001
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:1158
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1019
::mlir::StringAttr getSymNameAttr()
Definition Ops.h.inc:1052
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1000
TemplateOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:999
void setSymNameAttr(::mlir::StringAttr attr)
Definition Ops.h.inc:1057
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1406
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1023
::llvm::LogicalResult verify()
Verify the optional transform-carried name pattern against current parameters.
Definition Ops.cpp:48
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:1144
void setSymName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:1275
bool hasConstOps()
Return true if there are ops of type OpT within the body region.
Definition Ops.h.inc:1108
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:1138
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1238
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:1258
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1033
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1015
::llvm::StringRef getSymName()
Definition Ops.cpp.inc:1270
size_t numConstOps()
Return the number of ops of type OpT within the body region.
Definition Ops.h.inc:1114
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1187
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1029
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1422
static TemplateOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name)
Definition Ops.cpp.inc:1284
TemplateOpAdaptor Adaptor
Definition Ops.h.inc:997
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1002
inline ::llvm::iterator_range<::mlir::Region::op_iterator< OpT > > getConstOps()
Return ops of type OpT within the body region.
Definition Ops.h.inc:1102
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1493
TemplateParamOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1259
TemplateParamOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1261
TemplateParamOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1259
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1270
TemplateParamOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:1263
TemplateParamOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1268
TemplateParamOpGenericAdaptor(RangeT values, const TemplateParamOpGenericAdaptorBase &base)
Definition Ops.h.inc:1265
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1798
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1600
void setSymName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:1642
::mlir::StringAttr getTypeOptAttrName()
Definition Ops.h.inc:1316
void setTypeOpt(::std::optional<::mlir::Type > attrValue)
Definition Ops.cpp.inc:1646
::mlir::Attribute removeTypeOptAttr()
Definition Ops.h.inc:1377
::mlir::TypeAttr getTypeOptAttr()
Definition Ops.h.inc:1362
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::TypeAttr type_opt)
Definition Ops.cpp.inc:1654
TemplateParamOpAdaptor Adaptor
Definition Ops.h.inc:1298
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1303
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1543
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1582
void setSymNameAttr(::mlir::StringAttr attr)
Definition Ops.h.inc:1367
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1328
static TemplateParamOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::StringAttr sym_name, ::mlir::TypeAttr type_opt)
Definition Ops.cpp.inc:1661
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1302
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1342
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1802
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1332
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:1625
TemplateParamOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1300
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:96
::mlir::StringAttr getTypeOptAttrName(::mlir::OperationName name)
Definition Ops.h.inc:1320
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:1615
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1828
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1506
::mlir::StringAttr getSymNameAttrName()
Definition Ops.h.inc:1308
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1338
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1301
::mlir::StringAttr getSymNameAttr()
Definition Ops.h.inc:1357
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1324
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1594
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1785
::std::optional<::mlir::Type > getTypeOpt()
Definition Ops.cpp.inc:1637
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1573
void setTypeOptAttr(::mlir::TypeAttr attr)
Definition Ops.h.inc:1372
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1566
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:1312
UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1471
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1862
UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1471
UnifiableCastOpGenericAdaptor(RangeT values, const UnifiableCastOpGenericAdaptorBase &base)
Definition Ops.h.inc:1477
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1482
UnifiableCastOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1480
UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:1475
UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1473
::llvm::LogicalResult verify()
Definition Ops.cpp:285
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1547
static constexpr int odsIndex_input
Definition Ops.h.inc:1518
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input)
Definition Ops.cpp.inc:1903
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:2050
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1899
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1517
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1532
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1524
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1520
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1528
::mlir::OpOperand & getInputMutable()
Definition Ops.h.inc:1542
UnifiableCastOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1516
::mlir::TypedValue<::mlir::Type > getInput()
Definition Ops.h.inc:1538
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:1557
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1979
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2001
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1519
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1889
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1551
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1866
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1884
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1893
UnifiableCastOpAdaptor Adaptor
Definition Ops.h.inc:1514
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2007
static UnifiableCastOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value input)
Definition Ops.cpp.inc:1908
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1875
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2040
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1896
YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1637
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2072
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1648
YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1637
YieldOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1646
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:1652
YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1639
YieldOpGenericAdaptor(RangeT values, const YieldOpGenericAdaptorBase &base)
Definition Ops.h.inc:1643
YieldOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:1641
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:2076
::mlir::OpOperand & getValMutable()
Definition Ops.h.inc:1710
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2188
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:2094
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2238
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1688
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:2085
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1692
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1696
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:2109
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1683
YieldOpAdaptor Adaptor
Definition Ops.h.inc:1680
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1685
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1719
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:2106
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2205
YieldOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1682
static YieldOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value val)
Definition Ops.cpp.inc:2117
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2201
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:2103
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1700
static constexpr int odsIndex_val
Definition Ops.h.inc:1684
::mlir::TypedValue<::mlir::Type > getVal()
Definition Ops.h.inc:1706
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value val)
Definition Ops.cpp.inc:2113
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1715
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:2099
ApplyMapOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:217
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:162
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:213
ConstReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:473
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:479
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:469
TemplateExprOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:690
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:686
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:696
TemplateOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:918
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:924
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:914
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1217
TemplateParamOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1221
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:1227
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1440
UnifiableCastOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1444
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:1450
YieldOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1610
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1606
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:1616
Common interface for constant parameter-like symbol operations that can be defined within a TemplateO...
void setMap(const ::mlir::AffineMapAttr &propValue)
Definition Ops.h.inc:188
void setNumDims(const ::mlir::IntegerAttr &propValue)
Definition Ops.h.inc:198
void setConstName(const ::mlir::FlatSymbolRefAttr &propValue)
Definition Ops.h.inc:455
void setSymName(const ::mlir::StringAttr &propValue)
Definition Ops.h.inc:900