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::array {
11
23class ArrayLengthOp;
24
25} // namespace llzk::array
26namespace llzk::array {
27
90class CreateArrayOp;
91
92} // namespace llzk::array
93namespace llzk::array {
94
115class ExtractArrayOp;
116
117} // namespace llzk::array
118namespace llzk::array {
119
140class InsertArrayOp;
141
142} // namespace llzk::array
143namespace llzk::array {
144
166class ReadArrayOp;
167
168} // namespace llzk::array
169namespace llzk::array {
170
194class WriteArrayOp;
195
196} // namespace llzk::array
197#ifdef GET_OP_CLASSES
198#undef GET_OP_CLASSES
199
200namespace llzk::array {
201
202
203//===----------------------------------------------------------------------===//
204// ::llzk::array::ArrayLengthOp declarations
205//===----------------------------------------------------------------------===//
206
207namespace detail {
208
210public:
211 using Properties = ::mlir::EmptyProperties;
212protected:
213 ::mlir::DictionaryAttr odsAttrs;
214 ::std::optional<::mlir::OperationName> odsOpName;
216 ::mlir::RegionRange odsRegions;
217public:
218 ArrayLengthOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
219 odsOpName.emplace("array.len", odsAttrs.getContext());
220 }
221
223
224 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
225 return {index, 1};
226 }
227
229 return properties;
230 }
231
232 ::mlir::DictionaryAttr getAttributes() {
233 return odsAttrs;
234 }
235
236};
237
238} // namespace detail
239template <typename RangeT>
241 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
243 static constexpr int odsIndex_arr_ref = 0;
244 static constexpr int odsIndex_dim = 1;
245public:
246 ArrayLengthOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
247
248 ArrayLengthOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ArrayLengthOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
249
250 ArrayLengthOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ArrayLengthOpGenericAdaptor(values, attrs, Properties{}, {}) {}
251
252 ArrayLengthOpGenericAdaptor(RangeT values, const ArrayLengthOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
253
254 template <typename LateInst = ArrayLengthOp, typename = std::enable_if_t<std::is_same_v<LateInst, ArrayLengthOp>>>
255 ArrayLengthOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
256
257 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
258 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
259 }
260
261 RangeT getODSOperands(unsigned index) {
262 auto valueRange = getODSOperandIndexAndLength(index);
263 return {std::next(odsOperands.begin(), valueRange.first),
264 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
265 }
266
267 ValueT getArrRef() {
268 return (*getODSOperands(0).begin());
269 }
270
271 ValueT getDim() {
272 return (*getODSOperands(1).begin());
273 }
274
275 RangeT getOperands() {
276 return odsOperands;
277 }
278
279private:
280 RangeT odsOperands;
281};
282class ArrayLengthOpAdaptor : public ArrayLengthOpGenericAdaptor<::mlir::ValueRange> {
283public:
286
287 ::llvm::LogicalResult verify(::mlir::Location loc);
288};
289class ArrayLengthOp : public ::mlir::Op<ArrayLengthOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IndexType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::llzk::array::ArrayRefOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
290public:
291 using Op::Op;
292 using Op::print;
294 template <typename RangeT>
297 static constexpr int odsIndex_arr_ref = 0;
298 static constexpr int odsIndex_dim = 1;
300 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
301 return {};
302 }
303
304 static constexpr ::llvm::StringLiteral getOperationName() {
305 return ::llvm::StringLiteral("array.len");
306 }
307
308 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
309 return {index, 1};
310 }
311
312 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
313 auto valueRange = getODSOperandIndexAndLength(index);
314 return {std::next(getOperation()->operand_begin(), valueRange.first),
315 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
316 }
317
318 ::mlir::TypedValue<::llzk::array::ArrayType> getArrRef() {
319 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*getODSOperands(0).begin());
320 }
321
322 ::mlir::TypedValue<::mlir::IndexType> getDim() {
323 return ::llvm::cast<::mlir::TypedValue<::mlir::IndexType>>(*getODSOperands(1).begin());
324 }
325
326 ::mlir::OpOperand &getArrRefMutable() {
327 auto range = getODSOperandIndexAndLength(0);
328 return getOperation()->getOpOperand(range.first);
329 }
330
331 ::mlir::OpOperand &getDimMutable() {
332 auto range = getODSOperandIndexAndLength(1);
333 return getOperation()->getOpOperand(range.first);
334 }
335
336 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
337 return {index, 1};
338 }
339
340 ::mlir::Operation::result_range getODSResults(unsigned index) {
341 auto valueRange = getODSResultIndexAndLength(index);
342 return {std::next(getOperation()->result_begin(), valueRange.first),
343 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
344 }
345
346 ::mlir::TypedValue<::mlir::IndexType> getLength() {
347 return ::llvm::cast<::mlir::TypedValue<::mlir::IndexType>>(*getODSResults(0).begin());
348 }
349
350 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
351 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
352 static llvm::hash_code computePropertiesHash(const Properties &prop);
353 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
354 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
355 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
356 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
357 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type length, ::mlir::Value arr_ref, ::mlir::Value dim);
358 static ArrayLengthOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type length, ::mlir::Value arr_ref, ::mlir::Value dim);
359 static ArrayLengthOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type length, ::mlir::Value arr_ref, ::mlir::Value dim);
360 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::Value dim);
361 static ArrayLengthOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arr_ref, ::mlir::Value dim);
362 static ArrayLengthOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arr_ref, ::mlir::Value dim);
363 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::Value dim);
364 static ArrayLengthOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::Value dim);
365 static ArrayLengthOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::Value dim);
366 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
367 static ArrayLengthOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
368 static ArrayLengthOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
369 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
370 static ArrayLengthOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
371 static ArrayLengthOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
372 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
373 static ArrayLengthOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
374 static ArrayLengthOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
375 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
376 static ArrayLengthOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
377 static ArrayLengthOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
378 ::llvm::LogicalResult verifyInvariantsImpl();
379 ::llvm::LogicalResult verifyInvariants();
380 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);
381 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
382 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
383 void print(::mlir::OpAsmPrinter &_odsPrinter);
384 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
385public:
387 inline ::llzk::array::ArrayType getArrRefType() {
388 return ::llvm::cast<ArrayRefOpInterface>(getOperation()).getArrRefType();
389 }
390};
391
392} // namespace llzk::array
393MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::array::ArrayLengthOp)
394
395namespace llzk::array {
396
397
398//===----------------------------------------------------------------------===//
399// ::llzk::array::CreateArrayOp declarations
400//===----------------------------------------------------------------------===//
401
402namespace detail {
403
405public:
406 struct Properties {
407 using mapOpGroupSizesTy = ::mlir::DenseI32ArrayAttr;
409
410 auto getMapOpGroupSizes() const {
411 auto &propStorage = this->mapOpGroupSizes;
412 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(propStorage);
413 }
414 void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue) {
415 this->mapOpGroupSizes = propValue;
416 }
417 using numDimsPerMapTy = ::mlir::DenseI32ArrayAttr;
419
420 auto getNumDimsPerMap() const {
421 auto &propStorage = this->numDimsPerMap;
422 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(propStorage);
423 }
424 void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue) {
425 this->numDimsPerMap = propValue;
426 }
427 using operandSegmentSizesTy = std::array<int32_t, 2>;
429 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
430 auto &propStorage = this->operandSegmentSizes;
431 return propStorage;
432 }
433 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
434 auto &propStorage = this->operandSegmentSizes;
435 ::llvm::copy(propValue, propStorage.begin());
436 }
437 bool operator==(const Properties &rhs) const {
438 return
439 rhs.mapOpGroupSizes == this->mapOpGroupSizes &&
440 rhs.numDimsPerMap == this->numDimsPerMap &&
441 rhs.operandSegmentSizes == this->operandSegmentSizes &&
442 true;
443 }
444 bool operator!=(const Properties &rhs) const {
445 return !(*this == rhs);
446 }
447 };
448protected:
449 ::mlir::DictionaryAttr odsAttrs;
450 ::std::optional<::mlir::OperationName> odsOpName;
452 ::mlir::RegionRange odsRegions;
453public:
454 CreateArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
455 odsOpName.emplace("array.new", odsAttrs.getContext());
456 }
457
459
460 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
462 return properties;
463 }
464
465 ::mlir::DictionaryAttr getAttributes() {
466 return odsAttrs;
467 }
468
469 ::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr();
470 ::llvm::ArrayRef<int32_t> getNumDimsPerMap();
471 ::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr() {
472 auto attr = ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
473 return attr;
474 }
475
476 ::llvm::ArrayRef<int32_t> getMapOpGroupSizes();
477};
478
479} // namespace detail
480template <typename RangeT>
482 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
484 static constexpr int odsIndex_elements = 0;
485 static constexpr int odsIndex_mapOperands = 1;
486public:
487 CreateArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
488
489 CreateArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CreateArrayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
490
491 CreateArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : CreateArrayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
492
493 CreateArrayOpGenericAdaptor(RangeT values, const CreateArrayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
494
495 template <typename LateInst = CreateArrayOp, typename = std::enable_if_t<std::is_same_v<LateInst, CreateArrayOp>>>
496 CreateArrayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
497
498 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
499 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
500 }
501
502 RangeT getODSOperands(unsigned index) {
503 auto valueRange = getODSOperandIndexAndLength(index);
504 return {std::next(odsOperands.begin(), valueRange.first),
505 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
506 }
507
508 RangeT getElements() {
509 return getODSOperands(0);
510 }
511
512 ::llvm::SmallVector<RangeT> getMapOperands() {
513 auto tblgenTmpOperands = getODSOperands(1);
514 auto sizes = getMapOpGroupSizes();
515
516 ::llvm::SmallVector<RangeT> tblgenTmpOperandGroups;
517 for (int i = 0, e = sizes.size(); i < e; ++i) {
518 tblgenTmpOperandGroups.push_back(tblgenTmpOperands.take_front(sizes[i]));
519 tblgenTmpOperands = tblgenTmpOperands.drop_front(sizes[i]);
520 }
521 return tblgenTmpOperandGroups;
522 }
523
524 RangeT getOperands() {
525 return odsOperands;
526 }
527
528private:
529 RangeT odsOperands;
530};
531class CreateArrayOpAdaptor : public CreateArrayOpGenericAdaptor<::mlir::ValueRange> {
532public:
535
536 ::llvm::LogicalResult verify(::mlir::Location loc);
537};
538class CreateArrayOp : public ::mlir::Op<CreateArrayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::llzk::array::ArrayType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::AttrSizedOperandSegments, ::llzk::VerifySizesForMultiAffineOps<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::mlir::OpAsmOpInterface::Trait, ::mlir::PromotableAllocationOpInterface::Trait, ::mlir::DestructurableAllocationOpInterface::Trait> {
539public:
540 using Op::Op;
541 using Op::print;
543 template <typename RangeT>
546 static constexpr int odsIndex_elements = 0;
547 static constexpr int odsIndex_mapOperands = 1;
549 using ::mlir::OpAsmOpInterface::Trait<CreateArrayOp>::getAsmBlockArgumentNames;
550 using ::mlir::OpAsmOpInterface::Trait<CreateArrayOp>::getAsmBlockNames;
551 using ::mlir::OpAsmOpInterface::Trait<CreateArrayOp>::getDefaultDialect;
552 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
553 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("mapOpGroupSizes"), ::llvm::StringRef("numDimsPerMap"), ::llvm::StringRef("operandSegmentSizes")};
554 return ::llvm::ArrayRef(attrNames);
555 }
556
557 ::mlir::StringAttr getMapOpGroupSizesAttrName() {
558 return getAttributeNameForIndex(0);
559 }
560
561 static ::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name) {
562 return getAttributeNameForIndex(name, 0);
563 }
564
565 ::mlir::StringAttr getNumDimsPerMapAttrName() {
566 return getAttributeNameForIndex(1);
567 }
568
569 static ::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name) {
570 return getAttributeNameForIndex(name, 1);
571 }
572
573 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
574 return (*this)->getName().getAttributeNames().back();
575 }
576
577 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
578 return name.getAttributeNames().back();
579 }
580
581 static constexpr ::llvm::StringLiteral getOperationName() {
582 return ::llvm::StringLiteral("array.new");
583 }
584
585 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
586 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
587 auto valueRange = getODSOperandIndexAndLength(index);
588 return {std::next(getOperation()->operand_begin(), valueRange.first),
589 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
590 }
591
592 ::mlir::Operation::operand_range getElements() {
593 return getODSOperands(0);
594 }
595
596 ::mlir::OperandRangeRange getMapOperands() {
597 return getODSOperands(1).split(getMapOpGroupSizesAttr());
598 }
599
600 ::mlir::MutableOperandRange getElementsMutable();
601 ::mlir::MutableOperandRangeRange getMapOperandsMutable();
602 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
603 return {index, 1};
604 }
605
606 ::mlir::Operation::result_range getODSResults(unsigned index) {
607 auto valueRange = getODSResultIndexAndLength(index);
608 return {std::next(getOperation()->result_begin(), valueRange.first),
609 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
610 }
611
612 ::mlir::TypedValue<::llzk::array::ArrayType> getResult() {
613 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*getODSResults(0).begin());
614 }
615
616 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
617 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
618 static llvm::hash_code computePropertiesHash(const Properties &prop);
619 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
620 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
621 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
622 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
623 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
624 void writeProperties(::mlir::DialectBytecodeWriter &writer);
625 ::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr() {
626 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(getProperties().numDimsPerMap);
627 }
628
629 ::llvm::ArrayRef<int32_t> getNumDimsPerMap();
630 ::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr() {
631 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
632 }
633
634 ::llvm::ArrayRef<int32_t> getMapOpGroupSizes();
635 void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr) {
636 getProperties().numDimsPerMap = attr;
637 }
638
639 void setNumDimsPerMap(::llvm::ArrayRef<int32_t> attrValue);
640 void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr) {
641 getProperties().mapOpGroupSizes = attr;
642 }
643
644 void setMapOpGroupSizes(::llvm::ArrayRef<int32_t> attrValue);
645 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::array::ArrayType result, ::mlir::ValueRange elements = {});
646 static CreateArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::array::ArrayType result, ::mlir::ValueRange elements = {});
647 static CreateArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::array::ArrayType result, ::mlir::ValueRange elements = {});
648 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::array::ArrayType result, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap);
649 static CreateArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::array::ArrayType result, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap);
650 static CreateArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::array::ArrayType result, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap);
651 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::array::ArrayType result, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap);
652 static CreateArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::array::ArrayType result, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap);
653 static CreateArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::array::ArrayType result, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap);
654 static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
655 ::llvm::LogicalResult verifyInvariantsImpl();
656 ::llvm::LogicalResult verifyInvariants();
657 ::llvm::LogicalResult verify();
658 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
659 void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn);
660 ::llvm::SmallVector<::mlir::MemorySlot> getPromotableSlots();
661 ::mlir::Value getDefaultValue(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder);
662 void handleBlockArgument(const ::mlir::MemorySlot &slot, ::mlir::BlockArgument argument, ::mlir::OpBuilder &builder);
663 ::std::optional<::mlir::PromotableAllocationOpInterface> handlePromotionComplete(const ::mlir::MemorySlot &slot, ::mlir::Value defaultValue, ::mlir::OpBuilder &builder);
664 ::llvm::SmallVector<::mlir::DestructurableMemorySlot> getDestructurableSlots();
665 ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> destructure(const ::mlir::DestructurableMemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::OpBuilder &builder, ::mlir::SmallVectorImpl<::mlir::DestructurableAllocationOpInterface> &newAllocators);
666 ::std::optional<::mlir::DestructurableAllocationOpInterface> handleDestructuringComplete(const ::mlir::DestructurableMemorySlot &slot, ::mlir::OpBuilder &builder);
667 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
668 static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
669 void print(::mlir::OpAsmPrinter &_odsPrinter);
670 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
671private:
672 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
673 return getAttributeNameForIndex((*this)->getName(), index);
674 }
675
676 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
677 assert(index < 2 && "invalid attribute index");
678 assert(name.getStringRef() == getOperationName() && "invalid operation name");
679 assert(name.isRegistered() && "Operation isn't registered, missing a "
680 "dependent dialect loading?");
681 return name.getAttributeNames()[index];
682 }
683
684public:
685 private:
686 static ::mlir::ParseResult parseInferredArrayType(::mlir::OpAsmParser &parser,
687 ::llvm::SmallVector<::mlir::Type,1> &elementsTypes,
688 ::mlir::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> elements,
689 ::mlir::Type resultType
690 );
691
692 static void printInferredArrayType(::mlir::OpAsmPrinter &printer, CreateArrayOp,
693 ::mlir::TypeRange, ::mlir::OperandRange, ::mlir::Type
694 );
695
696 static ::llvm::SmallVector<::mlir::Type> resultTypeToElementsTypes(::mlir::Type resultType);
697};
698
699} // namespace llzk::array
700MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::array::CreateArrayOp)
702
703namespace llzk::array {
704
705
706//===----------------------------------------------------------------------===//
707// ::llzk::array::ExtractArrayOp declarations
708//===----------------------------------------------------------------------===//
709
710namespace detail {
711
713public:
714 using Properties = ::mlir::EmptyProperties;
715protected:
716 ::mlir::DictionaryAttr odsAttrs;
717 ::std::optional<::mlir::OperationName> odsOpName;
719 ::mlir::RegionRange odsRegions;
720public:
721 ExtractArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
722 odsOpName.emplace("array.extract", odsAttrs.getContext());
723 }
724
726
727 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
729 return properties;
730 }
731
732 ::mlir::DictionaryAttr getAttributes() {
733 return odsAttrs;
734 }
735
736};
737
738} // namespace detail
739template <typename RangeT>
741 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
743 static constexpr int odsIndex_arr_ref = 0;
744 static constexpr int odsIndex_indices = 1;
745public:
746 ExtractArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
747
748 ExtractArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ExtractArrayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
749
750 ExtractArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ExtractArrayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
751
752 ExtractArrayOpGenericAdaptor(RangeT values, const ExtractArrayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
753
754 template <typename LateInst = ExtractArrayOp, typename = std::enable_if_t<std::is_same_v<LateInst, ExtractArrayOp>>>
755 ExtractArrayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
756
757 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
758 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
759 }
760
761 RangeT getODSOperands(unsigned index) {
762 auto valueRange = getODSOperandIndexAndLength(index);
763 return {std::next(odsOperands.begin(), valueRange.first),
764 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
765 }
766
767 ValueT getArrRef() {
768 return (*getODSOperands(0).begin());
769 }
770
771 RangeT getIndices() {
772 return getODSOperands(1);
773 }
774
775 RangeT getOperands() {
776 return odsOperands;
777 }
778
779private:
780 RangeT odsOperands;
781};
782class ExtractArrayOpAdaptor : public ExtractArrayOpGenericAdaptor<::mlir::ValueRange> {
783public:
786
787 ::llvm::LogicalResult verify(::mlir::Location loc);
788};
789class ExtractArrayOp : public ::mlir::Op<ExtractArrayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::llzk::array::ArrayType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::SymbolUserOpInterface::Trait, ::llzk::array::ArrayRefOpInterface::Trait, ::llzk::array::ArrayAccessOpInterface::Trait> {
790public:
791 using Op::Op;
792 using Op::print;
794 template <typename RangeT>
797 static constexpr int odsIndex_arr_ref = 0;
798 static constexpr int odsIndex_indices = 1;
800 using ::mlir::InferTypeOpInterface::Trait<ExtractArrayOp>::refineReturnTypes;
801 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
802 return {};
803 }
804
805 static constexpr ::llvm::StringLiteral getOperationName() {
806 return ::llvm::StringLiteral("array.extract");
807 }
808
809 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
810 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
811 auto valueRange = getODSOperandIndexAndLength(index);
812 return {std::next(getOperation()->operand_begin(), valueRange.first),
813 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
814 }
815
816 ::mlir::TypedValue<::llzk::array::ArrayType> getArrRef() {
817 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*getODSOperands(0).begin());
818 }
819
820 ::mlir::Operation::operand_range getIndices() {
821 return getODSOperands(1);
822 }
823
824 ::mlir::OpOperand &getArrRefMutable() {
825 auto range = getODSOperandIndexAndLength(0);
826 return getOperation()->getOpOperand(range.first);
827 }
828
829 ::mlir::MutableOperandRange getIndicesMutable();
830 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
831 return {index, 1};
832 }
833
834 ::mlir::Operation::result_range getODSResults(unsigned index) {
835 auto valueRange = getODSResultIndexAndLength(index);
836 return {std::next(getOperation()->result_begin(), valueRange.first),
837 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
838 }
839
840 ::mlir::TypedValue<::llzk::array::ArrayType> getResult() {
841 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*getODSResults(0).begin());
842 }
843
844 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
845 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
846 static llvm::hash_code computePropertiesHash(const Properties &prop);
847 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
848 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
849 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
850 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
851 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
852 static ExtractArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
853 static ExtractArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
854 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
855 static ExtractArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
856 static ExtractArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
857 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
858 static ExtractArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
859 static ExtractArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
860 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
861 static ExtractArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
862 static ExtractArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
863 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
864 static ExtractArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
865 static ExtractArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
866 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
867 static ExtractArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
868 static ExtractArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
869 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
870 static ExtractArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
871 static ExtractArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
872 ::llvm::LogicalResult verifyInvariantsImpl();
873 ::llvm::LogicalResult verifyInvariants();
874 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);
875 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
876 bool isRead();
877 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
878 void print(::mlir::OpAsmPrinter &_odsPrinter);
879public:
880 static ::llvm::LogicalResult
881 inferReturnTypes(::mlir::MLIRContext *context,
882 std::optional<::mlir::Location> location,
883 Adaptor adaptor,
884 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
885
886 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
887
888
890 inline ::llzk::array::ArrayType getArrRefType() {
891 return ::llvm::cast<ArrayAccessOpInterface>(getOperation()).getArrRefType();
892 }
893};
894
895} // namespace llzk::array
896MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::array::ExtractArrayOp)
897
898namespace llzk::array {
899
900
901//===----------------------------------------------------------------------===//
902// ::llzk::array::InsertArrayOp declarations
903//===----------------------------------------------------------------------===//
904
905namespace detail {
906
908public:
909 using Properties = ::mlir::EmptyProperties;
910protected:
911 ::mlir::DictionaryAttr odsAttrs;
912 ::std::optional<::mlir::OperationName> odsOpName;
914 ::mlir::RegionRange odsRegions;
915public:
916 InsertArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
917 odsOpName.emplace("array.insert", odsAttrs.getContext());
918 }
919
921
922 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
924 return properties;
925 }
926
927 ::mlir::DictionaryAttr getAttributes() {
928 return odsAttrs;
929 }
930
931};
932
933} // namespace detail
934template <typename RangeT>
936 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
938 static constexpr int odsIndex_arr_ref = 0;
939 static constexpr int odsIndex_indices = 1;
940 static constexpr int odsIndex_rvalue = 2;
941public:
942 InsertArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
943
944 InsertArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : InsertArrayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
945
946 InsertArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : InsertArrayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
947
948 InsertArrayOpGenericAdaptor(RangeT values, const InsertArrayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
949
950 template <typename LateInst = InsertArrayOp, typename = std::enable_if_t<std::is_same_v<LateInst, InsertArrayOp>>>
951 InsertArrayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
952
953 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
954 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
955 }
956
957 RangeT getODSOperands(unsigned index) {
958 auto valueRange = getODSOperandIndexAndLength(index);
959 return {std::next(odsOperands.begin(), valueRange.first),
960 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
961 }
962
963 ValueT getArrRef() {
964 return (*getODSOperands(0).begin());
965 }
966
967 RangeT getIndices() {
968 return getODSOperands(1);
969 }
970
971 ValueT getRvalue() {
972 return (*getODSOperands(2).begin());
973 }
974
975 RangeT getOperands() {
976 return odsOperands;
977 }
978
979private:
980 RangeT odsOperands;
981};
982class InsertArrayOpAdaptor : public InsertArrayOpGenericAdaptor<::mlir::ValueRange> {
983public:
986
987 ::llvm::LogicalResult verify(::mlir::Location loc);
988};
989class InsertArrayOp : public ::mlir::Op<InsertArrayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::SymbolUserOpInterface::Trait, ::llzk::array::ArrayRefOpInterface::Trait, ::llzk::array::ArrayAccessOpInterface::Trait> {
990public:
991 using Op::Op;
992 using Op::print;
994 template <typename RangeT>
997 static constexpr int odsIndex_arr_ref = 0;
998 static constexpr int odsIndex_indices = 1;
999 static constexpr int odsIndex_rvalue = 2;
1001 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1002 return {};
1003 }
1004
1005 static constexpr ::llvm::StringLiteral getOperationName() {
1006 return ::llvm::StringLiteral("array.insert");
1007 }
1008
1009 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
1010 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1011 auto valueRange = getODSOperandIndexAndLength(index);
1012 return {std::next(getOperation()->operand_begin(), valueRange.first),
1013 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1014 }
1015
1016 ::mlir::TypedValue<::llzk::array::ArrayType> getArrRef() {
1017 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*getODSOperands(0).begin());
1018 }
1019
1020 ::mlir::Operation::operand_range getIndices() {
1021 return getODSOperands(1);
1022 }
1023
1024 ::mlir::TypedValue<::llzk::array::ArrayType> getRvalue() {
1025 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*getODSOperands(2).begin());
1026 }
1027
1028 ::mlir::OpOperand &getArrRefMutable() {
1029 auto range = getODSOperandIndexAndLength(0);
1030 return getOperation()->getOpOperand(range.first);
1031 }
1032
1033 ::mlir::MutableOperandRange getIndicesMutable();
1034 ::mlir::OpOperand &getRvalueMutable() {
1035 auto range = getODSOperandIndexAndLength(2);
1036 return getOperation()->getOpOperand(range.first);
1037 }
1038
1039 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1040 return {index, 1};
1041 }
1042
1043 ::mlir::Operation::result_range getODSResults(unsigned index) {
1044 auto valueRange = getODSResultIndexAndLength(index);
1045 return {std::next(getOperation()->result_begin(), valueRange.first),
1046 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1047 }
1048
1049 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1050 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1051 static llvm::hash_code computePropertiesHash(const Properties &prop);
1052 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1053 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1054 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
1055 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1056 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
1057 static InsertArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
1058 static InsertArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
1059 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
1060 static InsertArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
1061 static InsertArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
1062 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1063 static InsertArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1064 static InsertArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1065 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1066 static InsertArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1067 static InsertArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1068 ::llvm::LogicalResult verifyInvariantsImpl();
1069 ::llvm::LogicalResult verifyInvariants();
1070 ::llvm::LogicalResult verify();
1071 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
1072 bool isRead();
1073 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1074 void print(::mlir::OpAsmPrinter &_odsPrinter);
1075public:
1077 inline ::llzk::array::ArrayType getArrRefType() {
1078 return ::llvm::cast<ArrayAccessOpInterface>(getOperation()).getArrRefType();
1079 }
1080};
1081
1082} // namespace llzk::array
1083MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::array::InsertArrayOp)
1084
1085namespace llzk::array {
1086
1087
1088//===----------------------------------------------------------------------===//
1089// ::llzk::array::ReadArrayOp declarations
1090//===----------------------------------------------------------------------===//
1091
1092namespace detail {
1093
1095public:
1096 using Properties = ::mlir::EmptyProperties;
1097protected:
1098 ::mlir::DictionaryAttr odsAttrs;
1099 ::std::optional<::mlir::OperationName> odsOpName;
1101 ::mlir::RegionRange odsRegions;
1102public:
1103 ReadArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1104 odsOpName.emplace("array.read", odsAttrs.getContext());
1105 }
1106
1108
1109 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
1111 return properties;
1112 }
1113
1114 ::mlir::DictionaryAttr getAttributes() {
1115 return odsAttrs;
1116 }
1117
1118};
1119
1120} // namespace detail
1121template <typename RangeT>
1123 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1125 static constexpr int odsIndex_arr_ref = 0;
1126 static constexpr int odsIndex_indices = 1;
1127public:
1128 ReadArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1129
1130 ReadArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ReadArrayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
1131
1132 ReadArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ReadArrayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
1133
1134 ReadArrayOpGenericAdaptor(RangeT values, const ReadArrayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1135
1136 template <typename LateInst = ReadArrayOp, typename = std::enable_if_t<std::is_same_v<LateInst, ReadArrayOp>>>
1137 ReadArrayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1138
1139 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1140 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1141 }
1142
1143 RangeT getODSOperands(unsigned index) {
1144 auto valueRange = getODSOperandIndexAndLength(index);
1145 return {std::next(odsOperands.begin(), valueRange.first),
1146 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1147 }
1148
1149 ValueT getArrRef() {
1150 return (*getODSOperands(0).begin());
1151 }
1152
1153 RangeT getIndices() {
1154 return getODSOperands(1);
1155 }
1156
1157 RangeT getOperands() {
1158 return odsOperands;
1159 }
1160
1161private:
1162 RangeT odsOperands;
1163};
1164class ReadArrayOpAdaptor : public ReadArrayOpGenericAdaptor<::mlir::ValueRange> {
1165public:
1168
1169 ::llvm::LogicalResult verify(::mlir::Location loc);
1170};
1171class ReadArrayOp : public ::mlir::Op<ReadArrayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::DestructurableAccessorOpInterface::Trait, ::mlir::PromotableMemOpInterface::Trait, ::llzk::DiscardableAllocationAccessorOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::llzk::array::ArrayRefOpInterface::Trait, ::llzk::array::ArrayAccessOpInterface::Trait> {
1172public:
1173 using Op::Op;
1174 using Op::print;
1176 template <typename RangeT>
1179 static constexpr int odsIndex_arr_ref = 0;
1180 static constexpr int odsIndex_indices = 1;
1182 using ::mlir::InferTypeOpInterface::Trait<ReadArrayOp>::refineReturnTypes;
1183 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1184 return {};
1185 }
1186
1187 static constexpr ::llvm::StringLiteral getOperationName() {
1188 return ::llvm::StringLiteral("array.read");
1189 }
1190
1191 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
1192 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1193 auto valueRange = getODSOperandIndexAndLength(index);
1194 return {std::next(getOperation()->operand_begin(), valueRange.first),
1195 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1196 }
1197
1198 ::mlir::TypedValue<::llzk::array::ArrayType> getArrRef() {
1199 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*getODSOperands(0).begin());
1200 }
1201
1202 ::mlir::Operation::operand_range getIndices() {
1203 return getODSOperands(1);
1204 }
1205
1206 ::mlir::OpOperand &getArrRefMutable() {
1207 auto range = getODSOperandIndexAndLength(0);
1208 return getOperation()->getOpOperand(range.first);
1209 }
1210
1211 ::mlir::MutableOperandRange getIndicesMutable();
1212 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1213 return {index, 1};
1214 }
1215
1216 ::mlir::Operation::result_range getODSResults(unsigned index) {
1217 auto valueRange = getODSResultIndexAndLength(index);
1218 return {std::next(getOperation()->result_begin(), valueRange.first),
1219 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1220 }
1221
1222 ::mlir::TypedValue<::mlir::Type> getResult() {
1223 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
1224 }
1225
1226 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1227 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1228 static llvm::hash_code computePropertiesHash(const Properties &prop);
1229 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1230 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1231 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
1232 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1233 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
1234 static ReadArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
1235 static ReadArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
1236 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
1237 static ReadArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
1238 static ReadArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
1239 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
1240 static ReadArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
1241 static ReadArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
1242 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1243 static ReadArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1244 static ReadArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1245 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1246 static ReadArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1247 static ReadArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1248 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1249 static ReadArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1250 static ReadArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1251 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1252 static ReadArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1253 static ReadArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1254 ::llvm::LogicalResult verifyInvariantsImpl();
1255 ::llvm::LogicalResult verifyInvariants();
1256 ::llvm::LogicalResult verify();
1257 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);
1258 bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout);
1259 ::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout);
1260 bool loadsFrom(const ::mlir::MemorySlot &slot);
1261 bool storesTo(const ::mlir::MemorySlot &slot);
1262 ::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout);
1263 bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout);
1264 ::mlir::DeletionKind removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<mlir::OpOperand *> &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout);
1265 bool loadsFromDiscardableAllocation(::mlir::Value ptr);
1266 bool storesToDiscardableAllocation(::mlir::Value ptr);
1267 bool canEraseAsDeadStoreTo(::mlir::Value ptr, const ::mlir::DataLayout &dataLayout);
1268 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
1269 bool isRead();
1270 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1271 void print(::mlir::OpAsmPrinter &_odsPrinter);
1272public:
1273 static ::llvm::LogicalResult
1274 inferReturnTypes(::mlir::MLIRContext *context,
1275 std::optional<::mlir::Location> location,
1276 Adaptor adaptor,
1277 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
1278
1279 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
1280
1281
1283 inline ::llzk::array::ArrayType getArrRefType() {
1284 return ::llvm::cast<ArrayAccessOpInterface>(getOperation()).getArrRefType();
1285 }
1286};
1287
1288} // namespace llzk::array
1289MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::array::ReadArrayOp)
1290
1291namespace llzk::array {
1292
1293
1294//===----------------------------------------------------------------------===//
1295// ::llzk::array::WriteArrayOp declarations
1296//===----------------------------------------------------------------------===//
1297
1298namespace detail {
1299
1301public:
1302 using Properties = ::mlir::EmptyProperties;
1303protected:
1304 ::mlir::DictionaryAttr odsAttrs;
1305 ::std::optional<::mlir::OperationName> odsOpName;
1307 ::mlir::RegionRange odsRegions;
1308public:
1309 WriteArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
1310 odsOpName.emplace("array.write", odsAttrs.getContext());
1311 }
1312
1314
1315 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
1317 return properties;
1318 }
1319
1320 ::mlir::DictionaryAttr getAttributes() {
1321 return odsAttrs;
1322 }
1323
1324};
1325
1326} // namespace detail
1327template <typename RangeT>
1329 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
1331 static constexpr int odsIndex_arr_ref = 0;
1332 static constexpr int odsIndex_indices = 1;
1333 static constexpr int odsIndex_rvalue = 2;
1334public:
1335 WriteArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1336
1337 WriteArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : WriteArrayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
1338
1339 WriteArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : WriteArrayOpGenericAdaptor(values, attrs, Properties{}, {}) {}
1340
1341 WriteArrayOpGenericAdaptor(RangeT values, const WriteArrayOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
1342
1343 template <typename LateInst = WriteArrayOp, typename = std::enable_if_t<std::is_same_v<LateInst, WriteArrayOp>>>
1344 WriteArrayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
1345
1346 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
1347 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
1348 }
1349
1350 RangeT getODSOperands(unsigned index) {
1351 auto valueRange = getODSOperandIndexAndLength(index);
1352 return {std::next(odsOperands.begin(), valueRange.first),
1353 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1354 }
1355
1356 ValueT getArrRef() {
1357 return (*getODSOperands(0).begin());
1358 }
1359
1360 RangeT getIndices() {
1361 return getODSOperands(1);
1362 }
1363
1364 ValueT getRvalue() {
1365 return (*getODSOperands(2).begin());
1366 }
1367
1368 RangeT getOperands() {
1369 return odsOperands;
1370 }
1371
1372private:
1373 RangeT odsOperands;
1374};
1375class WriteArrayOpAdaptor : public WriteArrayOpGenericAdaptor<::mlir::ValueRange> {
1376public:
1379
1380 ::llvm::LogicalResult verify(::mlir::Location loc);
1381};
1382class WriteArrayOp : public ::mlir::Op<WriteArrayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::DestructurableAccessorOpInterface::Trait, ::mlir::PromotableMemOpInterface::Trait, ::llzk::DiscardableAllocationAccessorOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::llzk::array::ArrayRefOpInterface::Trait, ::llzk::array::ArrayAccessOpInterface::Trait> {
1383public:
1384 using Op::Op;
1385 using Op::print;
1387 template <typename RangeT>
1390 static constexpr int odsIndex_arr_ref = 0;
1391 static constexpr int odsIndex_indices = 1;
1392 static constexpr int odsIndex_rvalue = 2;
1394 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
1395 return {};
1396 }
1397
1398 static constexpr ::llvm::StringLiteral getOperationName() {
1399 return ::llvm::StringLiteral("array.write");
1400 }
1401
1402 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
1403 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
1404 auto valueRange = getODSOperandIndexAndLength(index);
1405 return {std::next(getOperation()->operand_begin(), valueRange.first),
1406 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1407 }
1408
1409 ::mlir::TypedValue<::llzk::array::ArrayType> getArrRef() {
1410 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*getODSOperands(0).begin());
1411 }
1412
1413 ::mlir::Operation::operand_range getIndices() {
1414 return getODSOperands(1);
1415 }
1416
1417 ::mlir::TypedValue<::mlir::Type> getRvalue() {
1418 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(2).begin());
1419 }
1420
1421 ::mlir::OpOperand &getArrRefMutable() {
1422 auto range = getODSOperandIndexAndLength(0);
1423 return getOperation()->getOpOperand(range.first);
1424 }
1425
1426 ::mlir::MutableOperandRange getIndicesMutable();
1427 ::mlir::OpOperand &getRvalueMutable() {
1428 auto range = getODSOperandIndexAndLength(2);
1429 return getOperation()->getOpOperand(range.first);
1430 }
1431
1432 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
1433 return {index, 1};
1434 }
1435
1436 ::mlir::Operation::result_range getODSResults(unsigned index) {
1437 auto valueRange = getODSResultIndexAndLength(index);
1438 return {std::next(getOperation()->result_begin(), valueRange.first),
1439 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1440 }
1441
1442 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1443 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
1444 static llvm::hash_code computePropertiesHash(const Properties &prop);
1445 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
1446 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
1447 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
1448 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
1449 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
1450 static WriteArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
1451 static WriteArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
1452 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
1453 static WriteArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
1454 static WriteArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
1455 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1456 static WriteArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1457 static WriteArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1458 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1459 static WriteArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1460 static WriteArrayOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
1461 ::llvm::LogicalResult verifyInvariantsImpl();
1462 ::llvm::LogicalResult verifyInvariants();
1463 ::llvm::LogicalResult verify();
1464 bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout);
1465 ::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout);
1466 bool loadsFrom(const ::mlir::MemorySlot &slot);
1467 bool storesTo(const ::mlir::MemorySlot &slot);
1468 ::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout);
1469 bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout);
1470 ::mlir::DeletionKind removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<mlir::OpOperand *> &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout);
1471 bool loadsFromDiscardableAllocation(::mlir::Value ptr);
1472 bool storesToDiscardableAllocation(::mlir::Value ptr);
1473 bool canEraseAsDeadStoreTo(::mlir::Value ptr, const ::mlir::DataLayout &dataLayout);
1474 ::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
1475 bool isRead();
1476 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1477 void print(::mlir::OpAsmPrinter &_odsPrinter);
1478public:
1480 inline ::llzk::array::ArrayType getArrRefType() {
1481 return ::llvm::cast<ArrayAccessOpInterface>(getOperation()).getArrRefType();
1482 }
1483};
1484
1485} // namespace llzk::array
1486MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::array::WriteArrayOp)
1487
1488
1489#endif // GET_OP_CLASSES
1490
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:108
ArrayLengthOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:246
ArrayLengthOpAdaptor(ArrayLengthOp op)
Definition Ops.cpp.inc:106
ArrayLengthOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:246
ArrayLengthOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:248
ArrayLengthOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:250
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:261
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:257
ArrayLengthOpGenericAdaptor(RangeT values, const ArrayLengthOpGenericAdaptorBase &base)
Definition Ops.h.inc:252
ArrayLengthOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:255
::mlir::TypedValue<::mlir::IndexType > getLength()
Definition Ops.h.inc:346
inline ::llzk::array::ArrayType getArrRefType()
Gets the type of the referenced base array.
Definition Ops.h.inc:387
::mlir::OpOperand & getArrRefMutable()
Definition Ops.h.inc:326
::mlir::TypedValue<::llzk::array::ArrayType > getArrRef()
Definition Ops.h.inc:318
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:135
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:530
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:112
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:340
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:336
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:304
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:421
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:142
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:139
::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:348
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:402
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:312
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:145
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:121
::mlir::OpOperand & getDimMutable()
Definition Ops.h.inc:331
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type length, ::mlir::Value arr_ref, ::mlir::Value dim)
Definition Ops.cpp.inc:149
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:344
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:356
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:130
ArrayLengthOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:295
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:316
static constexpr int odsIndex_dim
Definition Ops.h.inc:298
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:296
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:300
ArrayLengthOpAdaptor Adaptor
Definition Ops.h.inc:293
FoldAdaptor::Properties Properties
Definition Ops.h.inc:299
static constexpr int odsIndex_arr_ref
Definition Ops.h.inc:297
static ArrayLengthOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type length, ::mlir::Value arr_ref, ::mlir::Value dim)
Definition Ops.cpp.inc:155
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:308
::mlir::TypedValue<::mlir::IndexType > getDim()
Definition Ops.h.inc:322
CreateArrayOpAdaptor(CreateArrayOp op)
Definition Ops.cpp.inc:465
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:467
CreateArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:487
CreateArrayOpGenericAdaptor(RangeT values, const CreateArrayOpGenericAdaptorBase &base)
Definition Ops.h.inc:493
CreateArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:489
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:498
CreateArrayOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:496
CreateArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:487
::llvm::SmallVector< RangeT > getMapOperands()
Definition Ops.h.inc:512
CreateArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs)
Definition Ops.h.inc:491
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:502
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::array::ArrayType result, ::llvm::ArrayRef<::mlir::ValueRange > mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap)
static CreateArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::array::ArrayType result, ::mlir::ValueRange elements={})
Definition Ops.cpp.inc:718
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:680
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:480
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:602
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:624
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:914
CreateArrayOpAdaptor Adaptor
Definition Ops.h.inc:542
void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr)
Definition Ops.h.inc:635
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::array::ArrayType result, ::mlir::ValueRange elements={})
::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name)
Definition Ops.h.inc:577
void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr)
Definition Ops.h.inc:640
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:552
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:937
::mlir::TypedValue<::llzk::array::ArrayType > getResult()
Definition Ops.h.inc:612
::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:873
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:631
::llvm::SmallVector<::mlir::DestructurableMemorySlot > getDestructurableSlots()
Required by DestructurableAllocationOpInterface / SROA pass.
Definition Ops.cpp:124
::mlir::MutableOperandRangeRange getMapOperandsMutable()
Definition Ops.cpp.inc:495
::std::optional<::mlir::PromotableAllocationOpInterface > handlePromotionComplete(const ::mlir::MemorySlot &slot, ::mlir::Value defaultValue, ::mlir::OpBuilder &builder)
Required by PromotableAllocationOpInterface / mem2reg pass.
Definition Ops.cpp:198
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:710
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:594
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:765
static constexpr int odsIndex_elements
Definition Ops.h.inc:546
::mlir::StringAttr getNumDimsPerMapAttrName()
Definition Ops.h.inc:565
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:501
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:606
::std::optional<::mlir::DestructurableAllocationOpInterface > handleDestructuringComplete(const ::mlir::DestructurableMemorySlot &slot, ::mlir::OpBuilder &builder)
Required by DestructurableAllocationOpInterface / SROA pass.
Definition Ops.cpp:167
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:582
::llvm::LogicalResult verify()
Definition Ops.cpp:105
::mlir::StringAttr getOperandSegmentSizesAttrName()
Definition Ops.h.inc:573
::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name)
Definition Ops.h.inc:561
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:545
static constexpr int odsIndex_mapOperands
Definition Ops.h.inc:547
::mlir::Value getDefaultValue(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder)
Required by PromotableAllocationOpInterface / mem2reg pass.
Definition Ops.cpp:190
::llvm::SmallVector<::mlir::MemorySlot > getPromotableSlots()
Required by PromotableAllocationOpInterface / mem2reg pass.
Definition Ops.cpp:176
::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot > destructure(const ::mlir::DestructurableMemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::Attribute > &usedIndices, ::mlir::OpBuilder &builder, ::mlir::SmallVectorImpl<::mlir::DestructurableAllocationOpInterface > &newAllocators)
Required by DestructurableAllocationOpInterface / SROA pass.
Definition Ops.cpp:137
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:586
::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name)
Definition Ops.h.inc:569
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
Definition Ops.h.inc:625
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:646
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
Definition Ops.cpp.inc:700
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:581
void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn)
Definition Ops.cpp:76
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
Definition Ops.cpp.inc:705
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:551
void handleBlockArgument(const ::mlir::MemorySlot &slot, ::mlir::BlockArgument argument, ::mlir::OpBuilder &builder)
Required by PromotableAllocationOpInterface / mem2reg pass.
Definition Ops.cpp:195
::mlir::OperandRangeRange getMapOperands()
Definition Ops.h.inc:596
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:806
FoldAdaptor::Properties Properties
Definition Ops.h.inc:548
::mlir::StringAttr getMapOpGroupSizesAttrName()
Definition Ops.h.inc:557
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
Definition Ops.h.inc:630
::mlir::MutableOperandRange getElementsMutable()
Definition Ops.cpp.inc:489
::mlir::Operation::operand_range getElements()
Definition Ops.h.inc:592
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:71
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:812
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:604
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
Definition Ops.cpp.inc:759
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:714
CreateArrayOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:544
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:979
ExtractArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:746
ExtractArrayOpAdaptor(ExtractArrayOp op)
Definition Ops.cpp.inc:977
ExtractArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:750
ExtractArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:746
ExtractArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:748
ExtractArrayOpGenericAdaptor(RangeT values, const ExtractArrayOpGenericAdaptorBase &base)
Definition Ops.h.inc:752
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:757
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:761
ExtractArrayOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:755
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:834
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices)
Definition Ops.cpp.inc:1044
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:830
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp:480
static constexpr int odsIndex_indices
Definition Ops.h.inc:798
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1243
static ExtractArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices)
Definition Ops.cpp.inc:1050
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1040
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:445
::mlir::MutableOperandRange getIndicesMutable()
Definition Ops.cpp.inc:1001
bool isRead()
Return true if the op is a read, false if it's a write.
Definition Ops.cpp.inc:1331
ExtractArrayOpAdaptor Adaptor
Definition Ops.h.inc:793
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:801
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1030
ExtractArrayOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:795
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1211
::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:1319
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:796
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1016
FoldAdaptor::Properties Properties
Definition Ops.h.inc:799
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1239
inline ::llzk::array::ArrayType getArrRefType()
Gets the type of the referenced base array.
Definition Ops.h.inc:890
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1299
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:983
::mlir::Operation::operand_range getIndices()
Definition Ops.h.inc:820
::mlir::TypedValue<::llzk::array::ArrayType > getResult()
Definition Ops.h.inc:840
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1037
::mlir::TypedValue<::llzk::array::ArrayType > getArrRef()
Definition Ops.h.inc:816
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1007
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:810
::mlir::OpOperand & getArrRefMutable()
Definition Ops.h.inc:824
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:805
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1034
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1025
static constexpr int odsIndex_arr_ref
Definition Ops.h.inc:797
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1371
InsertArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:942
InsertArrayOpAdaptor(InsertArrayOp op)
Definition Ops.cpp.inc:1369
InsertArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:942
InsertArrayOpGenericAdaptor(RangeT values, const InsertArrayOpGenericAdaptorBase &base)
Definition Ops.h.inc:948
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:953
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:957
InsertArrayOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:951
InsertArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:946
InsertArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:944
inline ::llzk::array::ArrayType getArrRefType()
Gets the type of the referenced base array.
Definition Ops.h.inc:1077
::mlir::Operation::operand_range getIndices()
Definition Ops.h.inc:1020
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1399
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1426
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1515
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1432
bool isRead()
Return true if the op is a read, false if it's a write.
Definition Ops.cpp.inc:1647
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1408
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1422
static constexpr int odsIndex_arr_ref
Definition Ops.h.inc:997
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1540
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1417
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1005
::llvm::LogicalResult verify()
Definition Ops.cpp:495
::mlir::TypedValue<::llzk::array::ArrayType > getRvalue()
Definition Ops.h.inc:1024
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1010
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1546
::mlir::OpOperand & getArrRefMutable()
Definition Ops.h.inc:1028
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1000
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1615
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:996
::mlir::TypedValue<::llzk::array::ArrayType > getArrRef()
Definition Ops.h.inc:1016
::mlir::OpOperand & getRvalueMutable()
Definition Ops.h.inc:1034
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1001
static InsertArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue)
Definition Ops.cpp.inc:1442
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:1375
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1039
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue)
Definition Ops.cpp.inc:1436
InsertArrayOpAdaptor Adaptor
Definition Ops.h.inc:993
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1043
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:488
InsertArrayOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:995
static constexpr int odsIndex_rvalue
Definition Ops.h.inc:999
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1429
static constexpr int odsIndex_indices
Definition Ops.h.inc:998
::mlir::MutableOperandRange getIndicesMutable()
Definition Ops.cpp.inc:1393
ReadArrayOpAdaptor(ReadArrayOp op)
Definition Ops.cpp.inc:1685
ReadArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1128
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1687
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:1143
ReadArrayOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1137
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1139
ReadArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1128
ReadArrayOpGenericAdaptor(RangeT values, const ReadArrayOpGenericAdaptorBase &base)
Definition Ops.h.inc:1134
ReadArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:1132
ReadArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1130
::mlir::OpOperand & getArrRefMutable()
Definition Ops.h.inc:1206
::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout)
Required by PromotableAllocationOpInterface / mem2reg pass.
Definition Ops.cpp.inc:2082
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1748
bool storesToDiscardableAllocation(::mlir::Value ptr)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
Definition Ops.cpp.inc:2098
::mlir::DeletionKind removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl< mlir::OpOperand * > &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp:397
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1919
::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot > &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout)
Required by DestructurableAllocationOpInterface / SROA pass.
Definition Ops.cpp.inc:2064
inline ::llzk::array::ArrayType getArrRefType()
Gets the type of the referenced base array.
Definition Ops.h.inc:1283
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1738
static constexpr int odsIndex_arr_ref
Definition Ops.h.inc:1179
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:1222
::mlir::TypedValue<::llzk::array::ArrayType > getArrRef()
Definition Ops.h.inc:1198
bool storesTo(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp.inc:2077
::mlir::Operation::operand_range getIndices()
Definition Ops.h.inc:1202
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1181
bool loadsFrom(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp.inc:2072
bool canEraseAsDeadStoreTo(::mlir::Value ptr, const ::mlir::DataLayout &dataLayout)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
Definition Ops.cpp.inc:2103
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1955
bool isRead()
Return true if the op is a read, false if it's a write.
Definition Ops.cpp.inc:2088
bool loadsFromDiscardableAllocation(::mlir::Value ptr)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
Definition Ops.cpp.inc:2093
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1724
::llvm::LogicalResult verify()
Definition Ops.cpp:379
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1183
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:359
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices)
Definition Ops.cpp.inc:1752
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1178
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1733
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1212
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2014
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1216
::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:2043
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1192
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1742
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1715
bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute > &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot > &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout)
Required by DestructurableAllocationOpInterface / SROA pass.
Definition Ops.cpp.inc:2055
static ReadArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices)
Definition Ops.cpp.inc:1758
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1187
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp:375
ReadArrayOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1177
bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand * > &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand * > &newBlockingUses, const ::mlir::DataLayout &datalayout)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp:384
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1745
ReadArrayOpAdaptor Adaptor
Definition Ops.h.inc:1175
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:1691
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1949
static constexpr int odsIndex_indices
Definition Ops.h.inc:1180
::mlir::MutableOperandRange getIndicesMutable()
Definition Ops.cpp.inc:1709
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:2143
WriteArrayOpAdaptor(WriteArrayOp op)
Definition Ops.cpp.inc:2141
WriteArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1335
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:1350
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:1346
WriteArrayOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:1344
WriteArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:1339
WriteArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1337
WriteArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1335
WriteArrayOpGenericAdaptor(RangeT values, const WriteArrayOpGenericAdaptorBase &base)
Definition Ops.h.inc:1341
static constexpr int odsIndex_indices
Definition Ops.h.inc:1391
::mlir::OpOperand & getRvalueMutable()
Definition Ops.h.inc:1427
::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot > &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout)
Required by DestructurableAllocationOpInterface / SROA pass.
Definition Ops.cpp.inc:2430
bool isRead()
Return true if the op is a read, false if it's a write.
Definition Ops.cpp.inc:2454
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:2194
bool loadsFrom(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp.inc:2438
WriteArrayOpAdaptor Adaptor
Definition Ops.h.inc:1386
static constexpr int odsIndex_arr_ref
Definition Ops.h.inc:1390
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:2189
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:2314
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:1436
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:2180
::llvm::LogicalResult verify()
Definition Ops.cpp:417
::mlir::Operation::operand_range getIndices()
Definition Ops.h.inc:1413
::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout)
Required by PromotableAllocationOpInterface / mem2reg pass.
Definition Ops.cpp.inc:2448
static WriteArrayOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue)
Definition Ops.cpp.inc:2214
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:2171
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:2198
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:2389
bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute > &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot > &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout)
Required by DestructurableAllocationOpInterface / SROA pass.
Definition Ops.cpp.inc:2421
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:2287
WriteArrayOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:1388
bool canEraseAsDeadStoreTo(::mlir::Value ptr, const ::mlir::DataLayout &dataLayout)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
Definition Ops.cpp.inc:2469
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:2320
bool loadsFromDiscardableAllocation(::mlir::Value ptr)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
Definition Ops.cpp.inc:2459
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:2201
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:1398
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:1394
inline ::llzk::array::ArrayType getArrRefType()
Gets the type of the referenced base array.
Definition Ops.h.inc:1480
static constexpr int odsIndex_rvalue
Definition Ops.h.inc:1392
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:1389
bool storesTo(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp.inc:2443
bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand * > &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand * > &newBlockingUses, const ::mlir::DataLayout &datalayout)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp:422
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue)
Definition Ops.cpp.inc:2208
::mlir::DeletionKind removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl< mlir::OpOperand * > &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp:435
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:1432
bool storesToDiscardableAllocation(::mlir::Value ptr)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
Definition Ops.cpp.inc:2464
::mlir::MutableOperandRange getIndicesMutable()
Definition Ops.cpp.inc:2165
FoldAdaptor::Properties Properties
Definition Ops.h.inc:1393
::mlir::OpOperand & getArrRefMutable()
Definition Ops.h.inc:1421
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:1403
::mlir::TypedValue<::llzk::array::ArrayType > getArrRef()
Definition Ops.h.inc:1409
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:410
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:2204
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:2147
::mlir::TypedValue<::mlir::Type > getRvalue()
Definition Ops.h.inc:1417
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:224
ArrayLengthOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:218
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:214
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
Definition Ops.h.inc:471
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
Definition Ops.cpp.inc:458
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
Definition Ops.cpp.inc:453
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:439
CreateArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:454
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:450
ExtractArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:721
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:717
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:957
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:1349
InsertArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:916
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:912
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1099
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:1665
ReadArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1103
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:2121
WriteArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:1309
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:1305
Common interface for operations that reference an array value.
llvm::StringLiteral getOperationName()
Get the operation name, like "constrain.eq" for the given OpClass.
Definition OpHelpers.h:34
void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue)
Definition Ops.h.inc:414
::llvm::ArrayRef< int32_t > getOperandSegmentSizes() const
Definition Ops.h.inc:429
void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue)
Definition Ops.h.inc:424
void setOperandSegmentSizes(::llvm::ArrayRef< int32_t > propValue)
Definition Ops.h.inc:433