LLZK 0.1.0
Veridise's ZK Language IR
Loading...
Searching...
No Matches
Ops.h.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op Declarations *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: Ops.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10#if defined(GET_OP_CLASSES) || defined(GET_OP_FWD_DEFINES)
11#undef GET_OP_FWD_DEFINES
12namespace llzk {
13namespace array {
14class ArrayLengthOp;
15} // namespace array
16} // namespace llzk
17namespace llzk {
18namespace array {
19class CreateArrayOp;
20} // namespace array
21} // namespace llzk
22namespace llzk {
23namespace array {
24class ExtractArrayOp;
25} // namespace array
26} // namespace llzk
27namespace llzk {
28namespace array {
29class InsertArrayOp;
30} // namespace array
31} // namespace llzk
32namespace llzk {
33namespace array {
34class ReadArrayOp;
35} // namespace array
36} // namespace llzk
37namespace llzk {
38namespace array {
39class WriteArrayOp;
40} // namespace array
41} // namespace llzk
42#endif
43
44#ifdef GET_OP_CLASSES
45#undef GET_OP_CLASSES
46
47
48//===----------------------------------------------------------------------===//
49// Local Utility Method Definitions
50//===----------------------------------------------------------------------===//
51
52namespace llzk {
53namespace array {
54
55//===----------------------------------------------------------------------===//
56// ::llzk::array::ArrayLengthOp declarations
57//===----------------------------------------------------------------------===//
58
59namespace detail {
61public:
62protected:
63 ::mlir::DictionaryAttr odsAttrs;
64 ::std::optional<::mlir::OperationName> odsOpName;
65 ::mlir::RegionRange odsRegions;
66public:
67 ArrayLengthOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = nullptr, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {});
68
70
71 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
72 ::mlir::DictionaryAttr getAttributes();
73};
74} // namespace detail
75template <typename RangeT>
77 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
79public:
80 ArrayLengthOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
81
82 ArrayLengthOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : ArrayLengthOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
83
84 template <typename LateInst = ArrayLengthOp, typename = std::enable_if_t<std::is_same_v<LateInst, ArrayLengthOp>>>
85 ArrayLengthOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
86
87 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
88 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
89 }
90
91 RangeT getODSOperands(unsigned index) {
92 auto valueRange = getODSOperandIndexAndLength(index);
93 return {std::next(odsOperands.begin(), valueRange.first),
94 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
95 }
96
97 ValueT getArrRef() {
98 return (*getODSOperands(0).begin());
99 }
100
101 ValueT getDim() {
102 return (*getODSOperands(1).begin());
103 }
104
105 RangeT getOperands() {
106 return odsOperands;
107 }
108
109private:
110 RangeT odsOperands;
111};
112class ArrayLengthOpAdaptor : public ArrayLengthOpGenericAdaptor<::mlir::ValueRange> {
113public:
116
117 ::mlir::LogicalResult verify(::mlir::Location loc);
118};
119class 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> {
120public:
121 using Op::Op;
122 using Op::print;
124 template <typename RangeT>
127 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
128 return {};
129 }
130
131 static constexpr ::llvm::StringLiteral getOperationName() {
132 return ::llvm::StringLiteral("array.len");
133 }
134
135 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
136 ::mlir::Operation::operand_range getODSOperands(unsigned index);
137 ::mlir::TypedValue<::llzk::array::ArrayType> getArrRef();
138 ::mlir::TypedValue<::mlir::IndexType> getDim();
139 ::mlir::OpOperand &getArrRefMutable();
140 ::mlir::OpOperand &getDimMutable();
141 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index);
142 ::mlir::Operation::result_range getODSResults(unsigned index);
143 ::mlir::TypedValue<::mlir::IndexType> getLength();
144 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type length, ::mlir::Value arr_ref, ::mlir::Value dim);
145 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::Value dim);
146 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::Value dim);
147 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
148 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
149 ::mlir::LogicalResult verifyInvariantsImpl();
150 ::mlir::LogicalResult verifyInvariants();
151 static ::mlir::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
152 ::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
153 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
154 void print(::mlir::OpAsmPrinter &_odsPrinter);
155 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
156public:
158 inline ::llzk::array::ArrayType getArrRefType() {
159 return ::llvm::cast<ArrayRefOpInterface>(getOperation()).getArrRefType();
160 }
161};
162} // namespace array
163} // namespace llzk
164MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::array::ArrayLengthOp)
165
166namespace llzk {
167namespace array {
168
169//===----------------------------------------------------------------------===//
170// ::llzk::array::CreateArrayOp declarations
171//===----------------------------------------------------------------------===//
172
173namespace detail {
175public:
176 struct Properties {
177 using mapOpGroupSizesTy = ::mlir::DenseI32ArrayAttr;
179
181 auto &propStorage = this->mapOpGroupSizes;
182 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(propStorage);
183 }
184 void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue) {
185 this->mapOpGroupSizes = propValue;
186 }
187 using numDimsPerMapTy = ::mlir::DenseI32ArrayAttr;
189
191 auto &propStorage = this->numDimsPerMap;
192 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(propStorage);
193 }
194 void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue) {
195 this->numDimsPerMap = propValue;
196 }
197 using operandSegmentSizesTy = std::array<int32_t, 2>;
199 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() {
200 auto &propStorage = this->operandSegmentSizes;
201 return propStorage;
202 }
203 void setOperandSegmentSizes(const ::llvm::ArrayRef<int32_t> &propValue) {
204 auto &propStorage = this->operandSegmentSizes;
205 ::llvm::copy(propValue, propStorage.begin());
206 }
207 bool operator==(const Properties &rhs) const {
208 return
209 rhs.mapOpGroupSizes == this->mapOpGroupSizes &&
210 rhs.numDimsPerMap == this->numDimsPerMap &&
211 rhs.operandSegmentSizes == this->operandSegmentSizes &&
212 true;
213 }
214 bool operator!=(const Properties &rhs) const {
215 return !(*this == rhs);
216 }
217 };
218protected:
219 ::mlir::DictionaryAttr odsAttrs;
220 ::std::optional<::mlir::OperationName> odsOpName;
222 ::mlir::RegionRange odsRegions;
223public:
224 CreateArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties = {}, ::mlir::RegionRange regions = {});
225
227
228 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
230 return properties;
231 }
232
233 ::mlir::DictionaryAttr getAttributes();
234 ::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr();
235 ::llvm::ArrayRef<int32_t> getNumDimsPerMap();
236 ::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr();
237 ::llvm::ArrayRef<int32_t> getMapOpGroupSizes();
238};
239} // namespace detail
240template <typename RangeT>
242 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
244public:
245 CreateArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
246
247 CreateArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : CreateArrayOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
248
249 template <typename LateInst = CreateArrayOp, typename = std::enable_if_t<std::is_same_v<LateInst, CreateArrayOp>>>
250 CreateArrayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
251
252 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
253 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
254 }
255
256 RangeT getODSOperands(unsigned index) {
257 auto valueRange = getODSOperandIndexAndLength(index);
258 return {std::next(odsOperands.begin(), valueRange.first),
259 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
260 }
261
262 RangeT getElements() {
263 return getODSOperands(0);
264 }
265
266 ::llvm::SmallVector<RangeT> getMapOperands() {
267 auto tblgenTmpOperands = getODSOperands(1);
268 auto sizes = getMapOpGroupSizes();
269
270 ::llvm::SmallVector<RangeT> tblgenTmpOperandGroups;
271 for (int i = 0, e = sizes.size(); i < e; ++i) {
272 tblgenTmpOperandGroups.push_back(tblgenTmpOperands.take_front(sizes[i]));
273 tblgenTmpOperands = tblgenTmpOperands.drop_front(sizes[i]);
274 }
275 return tblgenTmpOperandGroups;
276 }
277
278 RangeT getOperands() {
279 return odsOperands;
280 }
281
282private:
283 RangeT odsOperands;
284};
285class CreateArrayOpAdaptor : public CreateArrayOpGenericAdaptor<::mlir::ValueRange> {
286public:
289
290 ::mlir::LogicalResult verify(::mlir::Location loc);
291};
292class 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::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::mlir::OpAsmOpInterface::Trait, ::mlir::PromotableAllocationOpInterface::Trait, ::mlir::DestructurableAllocationOpInterface::Trait> {
293public:
294 using Op::Op;
295 using Op::print;
297 template <typename RangeT>
301 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
302 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("mapOpGroupSizes"), ::llvm::StringRef("numDimsPerMap"), ::llvm::StringRef("operandSegmentSizes")};
303 return ::llvm::ArrayRef(attrNames);
304 }
305
306 ::mlir::StringAttr getMapOpGroupSizesAttrName() {
307 return getAttributeNameForIndex(0);
308 }
309
310 static ::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name) {
311 return getAttributeNameForIndex(name, 0);
312 }
313
314 ::mlir::StringAttr getNumDimsPerMapAttrName() {
315 return getAttributeNameForIndex(1);
316 }
317
318 static ::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name) {
319 return getAttributeNameForIndex(name, 1);
320 }
321
322 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
323 return (*this)->getName().getAttributeNames().back();
324 }
325
326 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
327 return name.getAttributeNames().back();
328 }
329
330 static constexpr ::llvm::StringLiteral getOperationName() {
331 return ::llvm::StringLiteral("array.new");
332 }
333
334 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
335 ::mlir::Operation::operand_range getODSOperands(unsigned index);
336 ::mlir::Operation::operand_range getElements();
337 ::mlir::OperandRangeRange getMapOperands();
338 ::mlir::MutableOperandRange getElementsMutable();
339 ::mlir::MutableOperandRangeRange getMapOperandsMutable();
340 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index);
341 ::mlir::Operation::result_range getODSResults(unsigned index);
342 ::mlir::TypedValue<::llzk::array::ArrayType> getResult();
343 static ::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
344 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
345 static llvm::hash_code computePropertiesHash(const Properties &prop);
346 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
347 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
348 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
349 static ::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
350 static ::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
351 void writeProperties(::mlir::DialectBytecodeWriter &writer);
352 ::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr();
353 ::llvm::ArrayRef<int32_t> getNumDimsPerMap();
354 ::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr();
355 ::llvm::ArrayRef<int32_t> getMapOpGroupSizes();
356 void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr);
357 void setNumDimsPerMap(::llvm::ArrayRef<int32_t> attrValue);
358 void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr);
359 void setMapOpGroupSizes(::llvm::ArrayRef<int32_t> attrValue);
360 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::array::ArrayType result, ::mlir::ValueRange elements = {});
361 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::array::ArrayType result, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap);
362 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::array::ArrayType result, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap);
363 static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
364 ::mlir::LogicalResult verifyInvariantsImpl();
365 ::mlir::LogicalResult verifyInvariants();
366 ::mlir::LogicalResult verify();
367 ::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
368 void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn);
369 ::llvm::SmallVector<::mlir::MemorySlot> getPromotableSlots();
370 ::mlir::Value getDefaultValue(const ::mlir::MemorySlot &slot, ::mlir::RewriterBase &rewriter);
371 void handleBlockArgument(const ::mlir::MemorySlot &slot, ::mlir::BlockArgument argument, ::mlir::RewriterBase &rewriter);
372 void handlePromotionComplete(const ::mlir::MemorySlot &slot, ::mlir::Value defaultValue, ::mlir::RewriterBase &rewriter);
373 ::llvm::SmallVector<::mlir::DestructurableMemorySlot> getDestructurableSlots();
374 ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> destructure(const ::mlir::DestructurableMemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::RewriterBase &rewriter);
375 void handleDestructuringComplete(const ::mlir::DestructurableMemorySlot &slot, ::mlir::RewriterBase &rewriter);
376 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
377 void print(::mlir::OpAsmPrinter &_odsPrinter);
378 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
379private:
380 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
381 return getAttributeNameForIndex((*this)->getName(), index);
382 }
383
384 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
385 assert(index < 2 && "invalid attribute index");
386 assert(name.getStringRef() == getOperationName() && "invalid operation name");
387 assert(name.isRegistered() && "Operation isn't registered, missing a "
388 "dependent dialect loading?");
389 return name.getAttributeNames()[index];
390 }
391
392public:
393 static ::mlir::ParseResult parseInferredArrayType(::mlir::OpAsmParser &parser,
394 ::llvm::SmallVector<::mlir::Type,1> &elementsTypes,
395 ::mlir::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> elements,
396 ::mlir::Type resultType
397 );
398 static void printInferredArrayType(::mlir::OpAsmPrinter &printer, CreateArrayOp,
399 ::mlir::TypeRange, ::mlir::OperandRange, ::mlir::Type
400 );
401 private:
402 static ::llvm::SmallVector<::mlir::Type> resultTypeToElementsTypes(::mlir::Type resultType);
403};
404} // namespace array
405} // namespace llzk
406MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::array::CreateArrayOp)
407
408namespace llzk {
409namespace array {
410
411//===----------------------------------------------------------------------===//
412// ::llzk::array::ExtractArrayOp declarations
413//===----------------------------------------------------------------------===//
414
415namespace detail {
417public:
418protected:
419 ::mlir::DictionaryAttr odsAttrs;
420 ::std::optional<::mlir::OperationName> odsOpName;
421 ::mlir::RegionRange odsRegions;
422public:
423 ExtractArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = nullptr, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {});
424
426
427 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
428 ::mlir::DictionaryAttr getAttributes();
429};
430} // namespace detail
431template <typename RangeT>
433 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
435public:
436 ExtractArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
437
438 ExtractArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : ExtractArrayOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
439
440 template <typename LateInst = ExtractArrayOp, typename = std::enable_if_t<std::is_same_v<LateInst, ExtractArrayOp>>>
441 ExtractArrayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
442
443 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
444 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
445 }
446
447 RangeT getODSOperands(unsigned index) {
448 auto valueRange = getODSOperandIndexAndLength(index);
449 return {std::next(odsOperands.begin(), valueRange.first),
450 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
451 }
452
453 ValueT getArrRef() {
454 return (*getODSOperands(0).begin());
455 }
456
457 RangeT getIndices() {
458 return getODSOperands(1);
459 }
460
461 RangeT getOperands() {
462 return odsOperands;
463 }
464
465private:
466 RangeT odsOperands;
467};
468class ExtractArrayOpAdaptor : public ExtractArrayOpGenericAdaptor<::mlir::ValueRange> {
469public:
472
473 ::mlir::LogicalResult verify(::mlir::Location loc);
474};
475class 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> {
476public:
477 using Op::Op;
478 using Op::print;
480 template <typename RangeT>
483 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
484 return {};
485 }
486
487 static constexpr ::llvm::StringLiteral getOperationName() {
488 return ::llvm::StringLiteral("array.extract");
489 }
490
491 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
492 ::mlir::Operation::operand_range getODSOperands(unsigned index);
493 ::mlir::TypedValue<::llzk::array::ArrayType> getArrRef();
494 ::mlir::Operation::operand_range getIndices();
495 ::mlir::OpOperand &getArrRefMutable();
496 ::mlir::MutableOperandRange getIndicesMutable();
497 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index);
498 ::mlir::Operation::result_range getODSResults(unsigned index);
499 ::mlir::TypedValue<::llzk::array::ArrayType> getResult();
500 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
501 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
502 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
503 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
504 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
505 ::mlir::LogicalResult verifyInvariantsImpl();
506 ::mlir::LogicalResult verifyInvariants();
507 static ::mlir::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
508 ::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
509 bool isRead();
510 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
511 void print(::mlir::OpAsmPrinter &_odsPrinter);
512public:
513 static ::mlir::LogicalResult
514 inferReturnTypes(::mlir::MLIRContext *context,
515 std::optional<::mlir::Location> location,
516 Adaptor adaptor,
517 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
518
519 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
520
521
523 inline ::llzk::array::ArrayType getArrRefType() {
524 return ::llvm::cast<ArrayAccessOpInterface>(getOperation()).getArrRefType();
525 }
526};
527} // namespace array
528} // namespace llzk
529MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::array::ExtractArrayOp)
530
531namespace llzk {
532namespace array {
533
534//===----------------------------------------------------------------------===//
535// ::llzk::array::InsertArrayOp declarations
536//===----------------------------------------------------------------------===//
537
538namespace detail {
540public:
541protected:
542 ::mlir::DictionaryAttr odsAttrs;
543 ::std::optional<::mlir::OperationName> odsOpName;
544 ::mlir::RegionRange odsRegions;
545public:
546 InsertArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = nullptr, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {});
547
549
550 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
551 ::mlir::DictionaryAttr getAttributes();
552};
553} // namespace detail
554template <typename RangeT>
556 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
558public:
559 InsertArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
560
561 InsertArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : InsertArrayOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
562
563 template <typename LateInst = InsertArrayOp, typename = std::enable_if_t<std::is_same_v<LateInst, InsertArrayOp>>>
564 InsertArrayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
565
566 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
567 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
568 }
569
570 RangeT getODSOperands(unsigned index) {
571 auto valueRange = getODSOperandIndexAndLength(index);
572 return {std::next(odsOperands.begin(), valueRange.first),
573 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
574 }
575
576 ValueT getArrRef() {
577 return (*getODSOperands(0).begin());
578 }
579
580 RangeT getIndices() {
581 return getODSOperands(1);
582 }
583
584 ValueT getRvalue() {
585 return (*getODSOperands(2).begin());
586 }
587
588 RangeT getOperands() {
589 return odsOperands;
590 }
591
592private:
593 RangeT odsOperands;
594};
595class InsertArrayOpAdaptor : public InsertArrayOpGenericAdaptor<::mlir::ValueRange> {
596public:
599
600 ::mlir::LogicalResult verify(::mlir::Location loc);
601};
602class 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> {
603public:
604 using Op::Op;
605 using Op::print;
607 template <typename RangeT>
610 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
611 return {};
612 }
613
614 static constexpr ::llvm::StringLiteral getOperationName() {
615 return ::llvm::StringLiteral("array.insert");
616 }
617
618 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
619 ::mlir::Operation::operand_range getODSOperands(unsigned index);
620 ::mlir::TypedValue<::llzk::array::ArrayType> getArrRef();
621 ::mlir::Operation::operand_range getIndices();
622 ::mlir::TypedValue<::llzk::array::ArrayType> getRvalue();
623 ::mlir::OpOperand &getArrRefMutable();
624 ::mlir::MutableOperandRange getIndicesMutable();
625 ::mlir::OpOperand &getRvalueMutable();
626 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index);
627 ::mlir::Operation::result_range getODSResults(unsigned index);
628 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
629 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
630 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
631 ::mlir::LogicalResult verifyInvariantsImpl();
632 ::mlir::LogicalResult verifyInvariants();
633 ::mlir::LogicalResult verify();
634 ::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
635 bool isRead();
636 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
637 void print(::mlir::OpAsmPrinter &_odsPrinter);
638public:
640 inline ::llzk::array::ArrayType getArrRefType() {
641 return ::llvm::cast<ArrayAccessOpInterface>(getOperation()).getArrRefType();
642 }
643};
644} // namespace array
645} // namespace llzk
646MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::array::InsertArrayOp)
647
648namespace llzk {
649namespace array {
650
651//===----------------------------------------------------------------------===//
652// ::llzk::array::ReadArrayOp declarations
653//===----------------------------------------------------------------------===//
654
655namespace detail {
657public:
658protected:
659 ::mlir::DictionaryAttr odsAttrs;
660 ::std::optional<::mlir::OperationName> odsOpName;
661 ::mlir::RegionRange odsRegions;
662public:
663 ReadArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = nullptr, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {});
664
666
667 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
668 ::mlir::DictionaryAttr getAttributes();
669};
670} // namespace detail
671template <typename RangeT>
673 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
675public:
676 ReadArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
677
678 ReadArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : ReadArrayOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
679
680 template <typename LateInst = ReadArrayOp, typename = std::enable_if_t<std::is_same_v<LateInst, ReadArrayOp>>>
681 ReadArrayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
682
683 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
684 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
685 }
686
687 RangeT getODSOperands(unsigned index) {
688 auto valueRange = getODSOperandIndexAndLength(index);
689 return {std::next(odsOperands.begin(), valueRange.first),
690 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
691 }
692
693 ValueT getArrRef() {
694 return (*getODSOperands(0).begin());
695 }
696
697 RangeT getIndices() {
698 return getODSOperands(1);
699 }
700
701 RangeT getOperands() {
702 return odsOperands;
703 }
704
705private:
706 RangeT odsOperands;
707};
708class ReadArrayOpAdaptor : public ReadArrayOpGenericAdaptor<::mlir::ValueRange> {
709public:
712
713 ::mlir::LogicalResult verify(::mlir::Location loc);
714};
715class 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, ::mlir::SymbolUserOpInterface::Trait, ::llzk::array::ArrayRefOpInterface::Trait, ::llzk::array::ArrayAccessOpInterface::Trait> {
716public:
717 using Op::Op;
718 using Op::print;
720 template <typename RangeT>
723 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
724 return {};
725 }
726
727 static constexpr ::llvm::StringLiteral getOperationName() {
728 return ::llvm::StringLiteral("array.read");
729 }
730
731 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
732 ::mlir::Operation::operand_range getODSOperands(unsigned index);
733 ::mlir::TypedValue<::llzk::array::ArrayType> getArrRef();
734 ::mlir::Operation::operand_range getIndices();
735 ::mlir::OpOperand &getArrRefMutable();
736 ::mlir::MutableOperandRange getIndicesMutable();
737 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index);
738 ::mlir::Operation::result_range getODSResults(unsigned index);
739 ::mlir::Value getResult();
740 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
741 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
742 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
743 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
744 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
745 ::mlir::LogicalResult verifyInvariantsImpl();
746 ::mlir::LogicalResult verifyInvariants();
747 ::mlir::LogicalResult verify();
748 static ::mlir::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
749 bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed);
750 ::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots, ::mlir::RewriterBase &rewriter);
751 bool loadsFrom(const ::mlir::MemorySlot &slot);
752 bool storesTo(const ::mlir::MemorySlot &slot);
753 ::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::RewriterBase &rewriter);
754 bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses);
755 ::mlir::DeletionKind removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<mlir::OpOperand *> &blockingUses, ::mlir::RewriterBase &rewriter, ::mlir::Value reachingDefinition);
756 ::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
757 bool isRead();
758 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
759 void print(::mlir::OpAsmPrinter &_odsPrinter);
760public:
761 static ::mlir::LogicalResult
762 inferReturnTypes(::mlir::MLIRContext *context,
763 std::optional<::mlir::Location> location,
764 Adaptor adaptor,
765 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
766
767 static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r);
768
769
771 inline ::llzk::array::ArrayType getArrRefType() {
772 return ::llvm::cast<ArrayAccessOpInterface>(getOperation()).getArrRefType();
773 }
774};
775} // namespace array
776} // namespace llzk
777MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::array::ReadArrayOp)
778
779namespace llzk {
780namespace array {
781
782//===----------------------------------------------------------------------===//
783// ::llzk::array::WriteArrayOp declarations
784//===----------------------------------------------------------------------===//
785
786namespace detail {
788public:
789protected:
790 ::mlir::DictionaryAttr odsAttrs;
791 ::std::optional<::mlir::OperationName> odsOpName;
792 ::mlir::RegionRange odsRegions;
793public:
794 WriteArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs = nullptr, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {});
795
797
798 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
799 ::mlir::DictionaryAttr getAttributes();
800};
801} // namespace detail
802template <typename RangeT>
804 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
806public:
807 WriteArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
808
809 WriteArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions = {}) : WriteArrayOpGenericAdaptor(values, attrs, (properties ? *properties.as<::mlir::EmptyProperties *>() : ::mlir::EmptyProperties{}), regions) {}
810
811 template <typename LateInst = WriteArrayOp, typename = std::enable_if_t<std::is_same_v<LateInst, WriteArrayOp>>>
812 WriteArrayOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
813
814 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
815 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
816 }
817
818 RangeT getODSOperands(unsigned index) {
819 auto valueRange = getODSOperandIndexAndLength(index);
820 return {std::next(odsOperands.begin(), valueRange.first),
821 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
822 }
823
824 ValueT getArrRef() {
825 return (*getODSOperands(0).begin());
826 }
827
828 RangeT getIndices() {
829 return getODSOperands(1);
830 }
831
832 ValueT getRvalue() {
833 return (*getODSOperands(2).begin());
834 }
835
836 RangeT getOperands() {
837 return odsOperands;
838 }
839
840private:
841 RangeT odsOperands;
842};
843class WriteArrayOpAdaptor : public WriteArrayOpGenericAdaptor<::mlir::ValueRange> {
844public:
847
848 ::mlir::LogicalResult verify(::mlir::Location loc);
849};
850class 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, ::mlir::SymbolUserOpInterface::Trait, ::llzk::array::ArrayRefOpInterface::Trait, ::llzk::array::ArrayAccessOpInterface::Trait> {
851public:
852 using Op::Op;
853 using Op::print;
855 template <typename RangeT>
858 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
859 return {};
860 }
861
862 static constexpr ::llvm::StringLiteral getOperationName() {
863 return ::llvm::StringLiteral("array.write");
864 }
865
866 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
867 ::mlir::Operation::operand_range getODSOperands(unsigned index);
868 ::mlir::TypedValue<::llzk::array::ArrayType> getArrRef();
869 ::mlir::Operation::operand_range getIndices();
870 ::mlir::Value getRvalue();
871 ::mlir::OpOperand &getArrRefMutable();
872 ::mlir::MutableOperandRange getIndicesMutable();
873 ::mlir::OpOperand &getRvalueMutable();
874 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index);
875 ::mlir::Operation::result_range getODSResults(unsigned index);
876 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
877 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
878 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
879 ::mlir::LogicalResult verifyInvariantsImpl();
880 ::mlir::LogicalResult verifyInvariants();
881 ::mlir::LogicalResult verify();
882 bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed);
883 ::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots, ::mlir::RewriterBase &rewriter);
884 bool loadsFrom(const ::mlir::MemorySlot &slot);
885 bool storesTo(const ::mlir::MemorySlot &slot);
886 ::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::RewriterBase &rewriter);
887 bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses);
888 ::mlir::DeletionKind removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<mlir::OpOperand *> &blockingUses, ::mlir::RewriterBase &rewriter, ::mlir::Value reachingDefinition);
889 ::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
890 bool isRead();
891 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
892 void print(::mlir::OpAsmPrinter &_odsPrinter);
893public:
895 inline ::llzk::array::ArrayType getArrRefType() {
896 return ::llvm::cast<ArrayAccessOpInterface>(getOperation()).getArrRefType();
897 }
898};
899} // namespace array
900} // namespace llzk
901MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::array::WriteArrayOp)
902
903
904#endif // GET_OP_CLASSES
905
::mlir::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:122
ArrayLengthOpAdaptor(ArrayLengthOp op)
Definition Ops.cpp.inc:120
ArrayLengthOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:80
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:91
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:87
ArrayLengthOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:80
ArrayLengthOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:85
ArrayLengthOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:82
::mlir::TypedValue<::mlir::IndexType > getDim()
Definition Ops.cpp.inc:140
inline ::llzk::array::ArrayType getArrRefType()
Gets the type of the referenced base array.
Definition Ops.h.inc:158
::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:482
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.cpp.inc:154
::mlir::OpOperand & getDimMutable()
Definition Ops.cpp.inc:149
::mlir::OpOperand & getArrRefMutable()
Definition Ops.cpp.inc:144
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:131
::mlir::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:222
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:323
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.cpp.inc:158
::mlir::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
Definition Ops.cpp.inc:254
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:304
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type length, ::mlir::Value arr_ref, ::mlir::Value dim)
Definition Ops.cpp.inc:168
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:262
ArrayLengthOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:125
::mlir::TypedValue<::llzk::array::ArrayType > getArrRef()
Definition Ops.cpp.inc:136
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.cpp.inc:130
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:126
::mlir::TypedValue<::mlir::IndexType > getLength()
Definition Ops.cpp.inc:164
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:127
ArrayLengthOpAdaptor Adaptor
Definition Ops.h.inc:123
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:126
::mlir::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:250
CreateArrayOpAdaptor(CreateArrayOp op)
Definition Ops.cpp.inc:378
::mlir::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:380
CreateArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:245
CreateArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:245
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:252
CreateArrayOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:250
::llvm::SmallVector< RangeT > getMapOperands()
Definition Ops.h.inc:266
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:256
CreateArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:247
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.cpp.inc:432
static void printInferredArrayType(::mlir::OpAsmPrinter &printer, CreateArrayOp, ::mlir::TypeRange, ::mlir::OperandRange, ::mlir::Type)
Definition Ops.cpp:94
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::array::ArrayType result, ::llvm::ArrayRef<::mlir::ValueRange > mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:629
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:393
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.cpp.inc:428
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:573
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:802
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:442
CreateArrayOpAdaptor Adaptor
Definition Ops.h.inc:296
void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr)
Definition Ops.cpp.inc:667
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:326
void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr)
Definition Ops.cpp.inc:675
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:301
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:825
void handlePromotionComplete(const ::mlir::MemorySlot &slot, ::mlir::Value defaultValue, ::mlir::RewriterBase &rewriter)
Required by PromotableAllocationOpInterface / mem2reg pass.
Definition Ops.cpp:191
::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot > destructure(const ::mlir::DestructurableMemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::Attribute > &usedIndices, ::mlir::RewriterBase &rewriter)
Required by DestructurableAllocationOpInterface / SROA pass.
Definition Ops.cpp:132
::mlir::ParseResult parseInferredArrayType(::mlir::OpAsmParser &parser, ::llvm::SmallVector<::mlir::Type, 1 > &elementsTypes, ::mlir::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand > elements, ::mlir::Type resultType)
Definition Ops.cpp:81
::llvm::SmallVector<::mlir::DestructurableMemorySlot > getDestructurableSlots()
Required by DestructurableAllocationOpInterface / SROA pass.
Definition Ops.cpp:119
::mlir::MutableOperandRangeRange getMapOperandsMutable()
Definition Ops.cpp.inc:422
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:595
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:671
::mlir::Value getDefaultValue(const ::mlir::MemorySlot &slot, ::mlir::RewriterBase &rewriter)
Required by PromotableAllocationOpInterface / mem2reg pass.
Definition Ops.cpp:183
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:543
::mlir::StringAttr getNumDimsPerMapAttrName()
Definition Ops.h.inc:314
::mlir::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:735
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:533
::mlir::LogicalResult verify()
Definition Ops.cpp:100
::mlir::StringAttr getOperandSegmentSizesAttrName()
Definition Ops.h.inc:322
::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name)
Definition Ops.h.inc:310
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:299
void handleDestructuringComplete(const ::mlir::DestructurableMemorySlot &slot, ::mlir::RewriterBase &rewriter)
Required by DestructurableAllocationOpInterface / SROA pass.
Definition Ops.cpp:161
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
Definition Ops.cpp.inc:649
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.cpp.inc:402
::llvm::SmallVector<::mlir::MemorySlot > getPromotableSlots()
Required by PromotableAllocationOpInterface / mem2reg pass.
Definition Ops.cpp:169
void handleBlockArgument(const ::mlir::MemorySlot &slot, ::mlir::BlockArgument argument, ::mlir::RewriterBase &rewriter)
Required by PromotableAllocationOpInterface / mem2reg pass.
Definition Ops.cpp:188
::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name)
Definition Ops.h.inc:318
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:580
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
Definition Ops.cpp.inc:653
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:330
::mlir::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:694
void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn)
Definition Ops.cpp:71
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
Definition Ops.cpp.inc:662
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:504
FoldAdaptor::Properties Properties
Definition Ops.h.inc:300
::mlir::StringAttr getMapOpGroupSizesAttrName()
Definition Ops.h.inc:306
::mlir::MutableOperandRange getElementsMutable()
Definition Ops.cpp.inc:416
::mlir::OperandRangeRange getMapOperands()
Definition Ops.cpp.inc:412
::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:66
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:741
::mlir::Operation::operand_range getElements()
Definition Ops.cpp.inc:408
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:553
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
Definition Ops.cpp.inc:688
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:679
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
Definition Ops.cpp.inc:658
::mlir::TypedValue<::llzk::array::ArrayType > getResult()
Definition Ops.cpp.inc:438
CreateArrayOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:298
ExtractArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:436
::mlir::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:871
ExtractArrayOpAdaptor(ExtractArrayOp op)
Definition Ops.cpp.inc:869
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:443
ExtractArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:436
ExtractArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:438
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:447
ExtractArrayOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:441
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices)
Definition Ops.cpp.inc:932
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.cpp.inc:918
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp:413
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1018
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.cpp.inc:893
::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:376
::mlir::MutableOperandRange getIndicesMutable()
Definition Ops.cpp.inc:912
::mlir::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1014
::mlir::TypedValue<::llzk::array::ArrayType > getResult()
Definition Ops.cpp.inc:928
bool isRead()
Return true if the op is a read, false if it's a write.
Definition Ops.cpp.inc:1102
::mlir::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:986
ExtractArrayOpAdaptor Adaptor
Definition Ops.h.inc:479
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:483
ExtractArrayOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:481
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.cpp.inc:922
::mlir::Operation::operand_range getIndices()
Definition Ops.cpp.inc:903
::mlir::TypedValue<::llzk::array::ArrayType > getArrRef()
Definition Ops.cpp.inc:899
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:482
inline ::llzk::array::ArrayType getArrRefType()
Gets the type of the referenced base array.
Definition Ops.h.inc:523
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1070
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:875
::mlir::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::OpOperand & getArrRefMutable()
Definition Ops.cpp.inc:907
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:487
::mlir::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1148
InsertArrayOpAdaptor(InsertArrayOp op)
Definition Ops.cpp.inc:1146
InsertArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:559
InsertArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:561
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:566
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:570
InsertArrayOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:564
InsertArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:559
inline ::llzk::array::ArrayType getArrRefType()
Gets the type of the referenced base array.
Definition Ops.h.inc:640
::mlir::TypedValue<::llzk::array::ArrayType > getRvalue()
Definition Ops.cpp.inc:1184
::mlir::Operation::operand_range getIndices()
Definition Ops.cpp.inc:1180
bool isRead()
Return true if the op is a read, false if it's a write.
Definition Ops.cpp.inc:1364
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.cpp.inc:1170
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:614
::mlir::LogicalResult verify()
Definition Ops.cpp:428
::mlir::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1261
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1267
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.cpp.inc:1208
::mlir::OpOperand & getRvalueMutable()
Definition Ops.cpp.inc:1199
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1332
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:609
::mlir::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1236
::mlir::TypedValue<::llzk::array::ArrayType > getArrRef()
Definition Ops.cpp.inc:1176
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:610
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:1152
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.cpp.inc:1204
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue)
Definition Ops.cpp.inc:1214
InsertArrayOpAdaptor Adaptor
Definition Ops.h.inc:606
::mlir::OpOperand & getArrRefMutable()
Definition Ops.cpp.inc:1188
::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:421
InsertArrayOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:608
::mlir::MutableOperandRange getIndicesMutable()
Definition Ops.cpp.inc:1193
ReadArrayOpAdaptor(ReadArrayOp op)
Definition Ops.cpp.inc:1408
::mlir::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1410
ReadArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:676
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:687
ReadArrayOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:681
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:683
ReadArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:676
ReadArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:678
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.cpp.inc:1432
inline ::llzk::array::ArrayType getArrRefType()
Gets the type of the referenced base array.
Definition Ops.h.inc:771
::mlir::Operation::operand_range getIndices()
Definition Ops.cpp.inc:1442
::mlir::OpOperand & getArrRefMutable()
Definition Ops.cpp.inc:1446
bool storesTo(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp.inc:1680
bool loadsFrom(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp.inc:1675
::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot > &subslots, ::mlir::RewriterBase &rewriter)
Required by DestructurableAllocationOpInterface / SROA pass.
Definition Ops.cpp.inc:1666
::mlir::TypedValue<::llzk::array::ArrayType > getArrRef()
Definition Ops.cpp.inc:1438
::mlir::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1561
bool isRead()
Return true if the op is a read, false if it's a write.
Definition Ops.cpp.inc:1690
::mlir::LogicalResult verify()
Definition Ops.cpp:307
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:723
::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:287
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices)
Definition Ops.cpp.inc:1471
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:722
bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand * > &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand * > &newBlockingUses)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp:313
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.cpp.inc:1457
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1616
::mlir::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1555
::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::RewriterBase &rewriter)
Required by PromotableAllocationOpInterface / mem2reg pass.
Definition Ops.cpp.inc:1685
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.cpp.inc:1461
::mlir::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1525
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:727
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
Definition Ops.cpp:303
ReadArrayOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:721
bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute > &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot > &mustBeSafelyUsed)
Required by DestructurableAllocationOpInterface / SROA pass.
Definition Ops.cpp.inc:1657
ReadArrayOpAdaptor Adaptor
Definition Ops.h.inc:719
::mlir::DeletionKind removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl< mlir::OpOperand * > &blockingUses, ::mlir::RewriterBase &rewriter, ::mlir::Value reachingDefinition)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp:326
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:1414
::mlir::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::Value getResult()
Definition Ops.cpp.inc:1467
::mlir::MutableOperandRange getIndicesMutable()
Definition Ops.cpp.inc:1451
WriteArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:807
::mlir::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1736
WriteArrayOpAdaptor(WriteArrayOp op)
Definition Ops.cpp.inc:1734
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:818
WriteArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.h.inc:807
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:814
WriteArrayOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:812
WriteArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:809
bool isRead()
Return true if the op is a read, false if it's a write.
Definition Ops.cpp.inc:1987
bool loadsFrom(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp.inc:1972
WriteArrayOpAdaptor Adaptor
Definition Ops.h.inc:854
::mlir::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1824
::mlir::OpOperand & getRvalueMutable()
Definition Ops.cpp.inc:1787
::mlir::OpOperand & getArrRefMutable()
Definition Ops.cpp.inc:1776
bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand * > &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand * > &newBlockingUses)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp:352
::mlir::Operation::operand_range getIndices()
Definition Ops.cpp.inc:1768
::mlir::LogicalResult verify()
Definition Ops.cpp:346
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1922
WriteArrayOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:856
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1857
::mlir::DeletionKind removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl< mlir::OpOperand * > &blockingUses, ::mlir::RewriterBase &rewriter, ::mlir::Value reachingDefinition)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp:365
::mlir::Value getRvalue()
Definition Ops.cpp.inc:1772
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:862
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:858
inline ::llzk::array::ArrayType getArrRefType()
Gets the type of the referenced base array.
Definition Ops.h.inc:895
::mlir::TypedValue<::llzk::array::ArrayType > getArrRef()
Definition Ops.cpp.inc:1764
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:857
bool storesTo(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp.inc:1977
::mlir::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1851
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue)
Definition Ops.cpp.inc:1802
::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot > &subslots, ::mlir::RewriterBase &rewriter)
Required by DestructurableAllocationOpInterface / SROA pass.
Definition Ops.cpp.inc:1963
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.cpp.inc:1792
::mlir::MutableOperandRange getIndicesMutable()
Definition Ops.cpp.inc:1781
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.cpp.inc:1758
bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute > &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot > &mustBeSafelyUsed)
Required by DestructurableAllocationOpInterface / SROA pass.
Definition Ops.cpp.inc:1954
::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::RewriterBase &rewriter)
Required by PromotableAllocationOpInterface / mem2reg pass.
Definition Ops.cpp.inc:1982
::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
Definition Ops.cpp:339
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.cpp.inc:1796
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:1740
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:111
ArrayLengthOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.cpp.inc:105
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:64
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
Definition Ops.cpp.inc:372
CreateArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.cpp.inc:338
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
Definition Ops.cpp.inc:362
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:344
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:220
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
Definition Ops.cpp.inc:367
ExtractArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.cpp.inc:840
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:420
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:846
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:1123
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:543
InsertArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.cpp.inc:1117
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:660
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:1385
ReadArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.cpp.inc:1379
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:1711
WriteArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
Definition Ops.cpp.inc:1705
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:791
llvm::StringLiteral getOperationName()
Get the operation name, like "constrain.eq" for the given OpClass.
Definition OpHelpers.h:27
void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue)
Definition Ops.h.inc:184
void setOperandSegmentSizes(const ::llvm::ArrayRef< int32_t > &propValue)
Definition Ops.h.inc:203
void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue)
Definition Ops.h.inc:194