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::pod {
11
55class NewPodOp;
56
57} // namespace llzk::pod
58namespace llzk::pod {
59
77class ReadPodOp;
78
79} // namespace llzk::pod
80namespace llzk::pod {
81
101class WritePodOp;
102
103} // namespace llzk::pod
104#ifdef GET_OP_CLASSES
105#undef GET_OP_CLASSES
106
107namespace llzk::pod {
108
109
110//===----------------------------------------------------------------------===//
111// ::llzk::pod::NewPodOp declarations
112//===----------------------------------------------------------------------===//
113
114namespace detail {
115
117public:
118 struct Properties {
119 using initializedRecordsTy = ::mlir::ArrayAttr;
121
123 auto &propStorage = this->initializedRecords;
124 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
125 }
126 void setInitializedRecords(const ::mlir::ArrayAttr &propValue) {
127 this->initializedRecords = propValue;
128 }
129 using mapOpGroupSizesTy = ::mlir::DenseI32ArrayAttr;
131
132 auto getMapOpGroupSizes() const {
133 auto &propStorage = this->mapOpGroupSizes;
134 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(propStorage);
135 }
136 void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue) {
137 this->mapOpGroupSizes = propValue;
138 }
139 using numDimsPerMapTy = ::mlir::DenseI32ArrayAttr;
141
142 auto getNumDimsPerMap() const {
143 auto &propStorage = this->numDimsPerMap;
144 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(propStorage);
145 }
146 void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue) {
147 this->numDimsPerMap = propValue;
148 }
149 using operandSegmentSizesTy = std::array<int32_t, 2>;
151 ::llvm::ArrayRef<int32_t> getOperandSegmentSizes() const {
152 auto &propStorage = this->operandSegmentSizes;
153 return propStorage;
154 }
155 void setOperandSegmentSizes(::llvm::ArrayRef<int32_t> propValue) {
156 auto &propStorage = this->operandSegmentSizes;
157 ::llvm::copy(propValue, propStorage.begin());
158 }
159 bool operator==(const Properties &rhs) const {
160 return
161 rhs.initializedRecords == this->initializedRecords &&
162 rhs.mapOpGroupSizes == this->mapOpGroupSizes &&
163 rhs.numDimsPerMap == this->numDimsPerMap &&
164 rhs.operandSegmentSizes == this->operandSegmentSizes &&
165 true;
166 }
167 bool operator!=(const Properties &rhs) const {
168 return !(*this == rhs);
169 }
170 };
171protected:
172 ::mlir::DictionaryAttr odsAttrs;
173 ::std::optional<::mlir::OperationName> odsOpName;
175 ::mlir::RegionRange odsRegions;
176public:
177 NewPodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
178 odsOpName.emplace("pod.new", odsAttrs.getContext());
179 }
180
182
183 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
185 return properties;
186 }
187
188 ::mlir::DictionaryAttr getAttributes() {
189 return odsAttrs;
190 }
191
192 ::mlir::ArrayAttr getInitializedRecordsAttr();
193 ::mlir::ArrayAttr getInitializedRecords();
194 ::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr();
195 ::llvm::ArrayRef<int32_t> getNumDimsPerMap();
196 ::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr() {
197 auto attr = ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
198 return attr;
199 }
200
201 ::llvm::ArrayRef<int32_t> getMapOpGroupSizes();
202};
203
204} // namespace detail
205template <typename RangeT>
207 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
209 static constexpr int odsIndex_initialValues = 0;
210 static constexpr int odsIndex_mapOperands = 1;
211public:
212 NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
213
214 NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : NewPodOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
215
216 NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs) : NewPodOpGenericAdaptor(values, attrs, Properties{}, {}) {}
217
218 NewPodOpGenericAdaptor(RangeT values, const NewPodOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
219
220 template <typename LateInst = NewPodOp, typename = std::enable_if_t<std::is_same_v<LateInst, NewPodOp>>>
221 NewPodOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
222
223 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
224 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
225 }
226
227 RangeT getODSOperands(unsigned index) {
228 auto valueRange = getODSOperandIndexAndLength(index);
229 return {std::next(odsOperands.begin(), valueRange.first),
230 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
231 }
232
234 return getODSOperands(0);
235 }
236
237 ::llvm::SmallVector<RangeT> getMapOperands() {
238 auto tblgenTmpOperands = getODSOperands(1);
239 auto sizes = getMapOpGroupSizes();
240
241 ::llvm::SmallVector<RangeT> tblgenTmpOperandGroups;
242 for (int i = 0, e = sizes.size(); i < e; ++i) {
243 tblgenTmpOperandGroups.push_back(tblgenTmpOperands.take_front(sizes[i]));
244 tblgenTmpOperands = tblgenTmpOperands.drop_front(sizes[i]);
245 }
246 return tblgenTmpOperandGroups;
247 }
248
249 RangeT getOperands() {
250 return odsOperands;
251 }
252
253private:
254 RangeT odsOperands;
255};
256class NewPodOpAdaptor : public NewPodOpGenericAdaptor<::mlir::ValueRange> {
257public:
260
261 ::llvm::LogicalResult verify(::mlir::Location loc);
262};
263class NewPodOp : public ::mlir::Op<NewPodOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::llzk::pod::PodType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::AttrSizedOperandSegments, ::llzk::VerifySizesForMultiAffineOps<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::PromotableAllocationOpInterface::Trait, ::mlir::DestructurableAllocationOpInterface::Trait, ::mlir::OpAsmOpInterface::Trait> {
264public:
265 using Op::Op;
266 using Op::print;
268 template <typename RangeT>
271 static constexpr int odsIndex_initialValues = 0;
272 static constexpr int odsIndex_mapOperands = 1;
274 using ::mlir::OpAsmOpInterface::Trait<NewPodOp>::getAsmBlockArgumentNames;
275 using ::mlir::OpAsmOpInterface::Trait<NewPodOp>::getAsmBlockNames;
276 using ::mlir::OpAsmOpInterface::Trait<NewPodOp>::getDefaultDialect;
277 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
278 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("initializedRecords"), ::llvm::StringRef("mapOpGroupSizes"), ::llvm::StringRef("numDimsPerMap"), ::llvm::StringRef("operandSegmentSizes")};
279 return ::llvm::ArrayRef(attrNames);
280 }
281
282 ::mlir::StringAttr getInitializedRecordsAttrName() {
283 return getAttributeNameForIndex(0);
284 }
285
286 static ::mlir::StringAttr getInitializedRecordsAttrName(::mlir::OperationName name) {
287 return getAttributeNameForIndex(name, 0);
288 }
289
290 ::mlir::StringAttr getMapOpGroupSizesAttrName() {
291 return getAttributeNameForIndex(1);
292 }
293
294 static ::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name) {
295 return getAttributeNameForIndex(name, 1);
296 }
297
298 ::mlir::StringAttr getNumDimsPerMapAttrName() {
299 return getAttributeNameForIndex(2);
300 }
301
302 static ::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name) {
303 return getAttributeNameForIndex(name, 2);
304 }
305
306 ::mlir::StringAttr getOperandSegmentSizesAttrName() {
307 return (*this)->getName().getAttributeNames().back();
308 }
309
310 static ::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name) {
311 return name.getAttributeNames().back();
312 }
313
314 static constexpr ::llvm::StringLiteral getOperationName() {
315 return ::llvm::StringLiteral("pod.new");
316 }
317
318 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
319 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
320 auto valueRange = getODSOperandIndexAndLength(index);
321 return {std::next(getOperation()->operand_begin(), valueRange.first),
322 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
323 }
324
325 ::mlir::Operation::operand_range getInitialValues() {
326 return getODSOperands(0);
327 }
328
329 ::mlir::OperandRangeRange getMapOperands() {
330 return getODSOperands(1).split(getMapOpGroupSizesAttr());
331 }
332
333 ::mlir::MutableOperandRange getInitialValuesMutable();
334 ::mlir::MutableOperandRangeRange getMapOperandsMutable();
335 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
336 return {index, 1};
337 }
338
339 ::mlir::Operation::result_range getODSResults(unsigned index) {
340 auto valueRange = getODSResultIndexAndLength(index);
341 return {std::next(getOperation()->result_begin(), valueRange.first),
342 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
343 }
344
345 ::mlir::TypedValue<::llzk::pod::PodType> getResult() {
346 return ::llvm::cast<::mlir::TypedValue<::llzk::pod::PodType>>(*getODSResults(0).begin());
347 }
348
349 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
350 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
351 static llvm::hash_code computePropertiesHash(const Properties &prop);
352 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
353 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
354 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
355 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
356 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
357 void writeProperties(::mlir::DialectBytecodeWriter &writer);
358 ::mlir::ArrayAttr getInitializedRecordsAttr() {
359 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().initializedRecords);
360 }
361
362 ::mlir::ArrayAttr getInitializedRecords();
363 ::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr() {
364 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(getProperties().numDimsPerMap);
365 }
366
367 ::llvm::ArrayRef<int32_t> getNumDimsPerMap();
368 ::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr() {
369 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
370 }
371
372 ::llvm::ArrayRef<int32_t> getMapOpGroupSizes();
373 void setInitializedRecordsAttr(::mlir::ArrayAttr attr) {
374 getProperties().initializedRecords = attr;
375 }
376
377 void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr) {
378 getProperties().numDimsPerMap = attr;
379 }
380
381 void setNumDimsPerMap(::llvm::ArrayRef<int32_t> attrValue);
382 void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr) {
383 getProperties().mapOpGroupSizes = attr;
384 }
385
386 void setMapOpGroupSizes(::llvm::ArrayRef<int32_t> attrValue);
387 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::pod::InitializedRecords initialValues = {});
388 static NewPodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::pod::InitializedRecords initialValues = {});
389 static NewPodOp create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::pod::InitializedRecords initialValues = {});
390 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::pod::PodType resultType, ::llzk::pod::InitializedRecords initialValues = {});
391 static NewPodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::pod::PodType resultType, ::llzk::pod::InitializedRecords initialValues = {});
392 static NewPodOp create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::pod::PodType resultType, ::llzk::pod::InitializedRecords initialValues = {});
393 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::pod::PodType resultType, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::llzk::pod::InitializedRecords initialValues = {});
394 static NewPodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::pod::PodType resultType, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::llzk::pod::InitializedRecords initialValues = {});
395 static NewPodOp create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::pod::PodType resultType, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::llzk::pod::InitializedRecords initialValues = {});
396 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::pod::PodType resultType, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::llzk::pod::InitializedRecords initialValues = {});
397 static NewPodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::pod::PodType resultType, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::llzk::pod::InitializedRecords initialValues = {});
398 static NewPodOp create(::mlir::ImplicitLocOpBuilder &builder, ::llzk::pod::PodType resultType, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap, ::llzk::pod::InitializedRecords initialValues = {});
399 static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties);
400 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
401 void print(::mlir::OpAsmPrinter &p);
402 ::llvm::LogicalResult verifyInvariantsImpl();
403 ::llvm::LogicalResult verifyInvariants();
404 ::llvm::LogicalResult verify();
405 ::llvm::SmallVector<::mlir::MemorySlot> getPromotableSlots();
406 ::mlir::Value getDefaultValue(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder);
407 void handleBlockArgument(const ::mlir::MemorySlot &slot, ::mlir::BlockArgument argument, ::mlir::OpBuilder &builder);
408 ::std::optional<::mlir::PromotableAllocationOpInterface> handlePromotionComplete(const ::mlir::MemorySlot &slot, ::mlir::Value defaultValue, ::mlir::OpBuilder &builder);
409 ::llvm::SmallVector<::mlir::DestructurableMemorySlot> getDestructurableSlots();
410 ::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);
411 ::std::optional<::mlir::DestructurableAllocationOpInterface> handleDestructuringComplete(const ::mlir::DestructurableMemorySlot &slot, ::mlir::OpBuilder &builder);
412 void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn);
413 static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
414 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
415private:
416 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
417 return getAttributeNameForIndex((*this)->getName(), index);
418 }
419
420 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
421 assert(index < 3 && "invalid attribute index");
422 assert(name.getStringRef() == getOperationName() && "invalid operation name");
423 assert(name.isRegistered() && "Operation isn't registered, missing a "
424 "dependent dialect loading?");
425 return name.getAttributeNames()[index];
426 }
427
428public:
429 ::mlir::SmallVector<::llzk::pod::RecordValue> getInitializedRecordValues();
430};
431
432} // namespace llzk::pod
433MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::pod::NewPodOp)
435
436namespace llzk::pod {
437
438
439//===----------------------------------------------------------------------===//
440// ::llzk::pod::ReadPodOp declarations
441//===----------------------------------------------------------------------===//
442
443namespace detail {
444
446public:
447 struct Properties {
448 using record_nameTy = ::mlir::StringAttr;
450
451 auto getRecordName() const {
452 auto &propStorage = this->record_name;
453 return ::llvm::cast<::mlir::StringAttr>(propStorage);
454 }
455 void setRecordName(const ::mlir::StringAttr &propValue) {
456 this->record_name = propValue;
457 }
458 bool operator==(const Properties &rhs) const {
459 return
460 rhs.record_name == this->record_name &&
461 true;
462 }
463 bool operator!=(const Properties &rhs) const {
464 return !(*this == rhs);
465 }
466 };
467protected:
468 ::mlir::DictionaryAttr odsAttrs;
469 ::std::optional<::mlir::OperationName> odsOpName;
471 ::mlir::RegionRange odsRegions;
472public:
473 ReadPodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
474 odsOpName.emplace("pod.read", odsAttrs.getContext());
475 }
476
478
479 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
480 return {index, 1};
481 }
482
484 return properties;
485 }
486
487 ::mlir::DictionaryAttr getAttributes() {
488 return odsAttrs;
489 }
490
491 ::mlir::StringAttr getRecordNameAttr() {
492 auto attr = ::llvm::cast<::mlir::StringAttr>(getProperties().record_name);
493 return attr;
494 }
495
496 ::llvm::StringRef getRecordName();
497};
498
499} // namespace detail
500template <typename RangeT>
502 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
504 static constexpr int odsIndex_pod_ref = 0;
505public:
506 ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
507
508 ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ReadPodOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
509
510 ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ReadPodOpGenericAdaptor(values, attrs, Properties{}, {}) {}
511
512 ReadPodOpGenericAdaptor(RangeT values, const ReadPodOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
513
514 template <typename LateInst = ReadPodOp, typename = std::enable_if_t<std::is_same_v<LateInst, ReadPodOp>>>
515 ReadPodOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
516
517 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
518 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
519 }
520
521 RangeT getODSOperands(unsigned index) {
522 auto valueRange = getODSOperandIndexAndLength(index);
523 return {std::next(odsOperands.begin(), valueRange.first),
524 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
525 }
526
527 ValueT getPodRef() {
528 return (*getODSOperands(0).begin());
529 }
530
531 RangeT getOperands() {
532 return odsOperands;
533 }
534
535private:
536 RangeT odsOperands;
537};
538class ReadPodOpAdaptor : public ReadPodOpGenericAdaptor<::mlir::ValueRange> {
539public:
542
543 ::llvm::LogicalResult verify(::mlir::Location loc);
544};
545class ReadPodOp : public ::mlir::Op<ReadPodOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::DestructurableAccessorOpInterface::Trait, ::mlir::PromotableMemOpInterface::Trait, ::llzk::DiscardableAllocationAccessorOpInterface::Trait, ::llzk::pod::PodRefOpInterface::Trait, ::llzk::pod::PodAccessOpInterface::Trait> {
546public:
547 using Op::Op;
548 using Op::print;
550 template <typename RangeT>
553 static constexpr int odsIndex_pod_ref = 0;
555 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
556 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("record_name")};
557 return ::llvm::ArrayRef(attrNames);
558 }
559
560 ::mlir::StringAttr getRecordNameAttrName() {
561 return getAttributeNameForIndex(0);
562 }
563
564 static ::mlir::StringAttr getRecordNameAttrName(::mlir::OperationName name) {
565 return getAttributeNameForIndex(name, 0);
566 }
567
568 static constexpr ::llvm::StringLiteral getOperationName() {
569 return ::llvm::StringLiteral("pod.read");
570 }
571
572 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
573 return {index, 1};
574 }
575
576 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
577 auto valueRange = getODSOperandIndexAndLength(index);
578 return {std::next(getOperation()->operand_begin(), valueRange.first),
579 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
580 }
581
582 ::mlir::TypedValue<::llzk::pod::PodType> getPodRef() {
583 return ::llvm::cast<::mlir::TypedValue<::llzk::pod::PodType>>(*getODSOperands(0).begin());
584 }
585
586 ::mlir::OpOperand &getPodRefMutable() {
587 auto range = getODSOperandIndexAndLength(0);
588 return getOperation()->getOpOperand(range.first);
589 }
590
591 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
592 return {index, 1};
593 }
594
595 ::mlir::Operation::result_range getODSResults(unsigned index) {
596 auto valueRange = getODSResultIndexAndLength(index);
597 return {std::next(getOperation()->result_begin(), valueRange.first),
598 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
599 }
600
601 ::mlir::TypedValue<::mlir::Type> getResult() {
602 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSResults(0).begin());
603 }
604
605 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
606 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
607 static llvm::hash_code computePropertiesHash(const Properties &prop);
608 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
609 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
610 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
611 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
612 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
613 void writeProperties(::mlir::DialectBytecodeWriter &writer);
614 ::mlir::StringAttr getRecordNameAttr() {
615 return ::llvm::cast<::mlir::StringAttr>(getProperties().record_name);
616 }
617
618 ::llvm::StringRef getRecordName();
619 void setRecordNameAttr(::mlir::StringAttr attr) {
620 getProperties().record_name = attr;
621 }
622
623 void setRecordName(::llvm::StringRef attrValue);
624 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value pod_ref, ::mlir::StringAttr record_name);
625 static ReadPodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value pod_ref, ::mlir::StringAttr record_name);
626 static ReadPodOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value pod_ref, ::mlir::StringAttr record_name);
627 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::mlir::StringAttr record_name);
628 static ReadPodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::mlir::StringAttr record_name);
629 static ReadPodOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::mlir::StringAttr record_name);
630 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value pod_ref, ::llvm::StringRef record_name);
631 static ReadPodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value pod_ref, ::llvm::StringRef record_name);
632 static ReadPodOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type result, ::mlir::Value pod_ref, ::llvm::StringRef record_name);
633 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::llvm::StringRef record_name);
634 static ReadPodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::llvm::StringRef record_name);
635 static ReadPodOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::llvm::StringRef record_name);
636 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
637 static ReadPodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
638 static ReadPodOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
639 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
640 static ReadPodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
641 static ReadPodOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
642 ::llvm::LogicalResult verifyInvariantsImpl();
643 ::llvm::LogicalResult verifyInvariants();
644 ::llvm::LogicalResult verify();
645 bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout);
646 ::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout);
647 bool loadsFrom(const ::mlir::MemorySlot &slot);
648 bool storesTo(const ::mlir::MemorySlot &slot);
649 ::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout);
650 bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout);
651 ::mlir::DeletionKind removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<mlir::OpOperand *> &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout);
652 bool loadsFromDiscardableAllocation(::mlir::Value ptr);
653 bool storesToDiscardableAllocation(::mlir::Value ptr);
654 bool canEraseAsDeadStoreTo(::mlir::Value ptr, const ::mlir::DataLayout &dataLayout);
655 bool isRead();
656 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
657 void print(::mlir::OpAsmPrinter &_odsPrinter);
658private:
659 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
660 return getAttributeNameForIndex((*this)->getName(), index);
661 }
662
663 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
664 assert(index < 1 && "invalid attribute index");
665 assert(name.getStringRef() == getOperationName() && "invalid operation name");
666 assert(name.isRegistered() && "Operation isn't registered, missing a "
667 "dependent dialect loading?");
668 return name.getAttributeNames()[index];
669 }
670
671public:
673 inline ::llzk::pod::PodType getPodRefType() {
674 return ::llvm::cast<PodAccessOpInterface>(getOperation()).getPodRefType();
675 }
676};
677
678} // namespace llzk::pod
679MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::pod::ReadPodOp)
681
682namespace llzk::pod {
683
684
685//===----------------------------------------------------------------------===//
686// ::llzk::pod::WritePodOp declarations
687//===----------------------------------------------------------------------===//
688
689namespace detail {
690
692public:
693 struct Properties {
694 using record_nameTy = ::mlir::StringAttr;
696
697 auto getRecordName() const {
698 auto &propStorage = this->record_name;
699 return ::llvm::cast<::mlir::StringAttr>(propStorage);
700 }
701 void setRecordName(const ::mlir::StringAttr &propValue) {
702 this->record_name = propValue;
703 }
704 bool operator==(const Properties &rhs) const {
705 return
706 rhs.record_name == this->record_name &&
707 true;
708 }
709 bool operator!=(const Properties &rhs) const {
710 return !(*this == rhs);
711 }
712 };
713protected:
714 ::mlir::DictionaryAttr odsAttrs;
715 ::std::optional<::mlir::OperationName> odsOpName;
717 ::mlir::RegionRange odsRegions;
718public:
719 WritePodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
720 odsOpName.emplace("pod.write", odsAttrs.getContext());
721 }
722
724
725 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
726 return {index, 1};
727 }
728
730 return properties;
731 }
732
733 ::mlir::DictionaryAttr getAttributes() {
734 return odsAttrs;
735 }
736
737 ::mlir::StringAttr getRecordNameAttr() {
738 auto attr = ::llvm::cast<::mlir::StringAttr>(getProperties().record_name);
739 return attr;
740 }
741
742 ::llvm::StringRef getRecordName();
743};
744
745} // namespace detail
746template <typename RangeT>
748 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
750 static constexpr int odsIndex_pod_ref = 0;
751 static constexpr int odsIndex_value = 1;
752public:
753 WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
754
755 WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : WritePodOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
756
757 WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : WritePodOpGenericAdaptor(values, attrs, Properties{}, {}) {}
758
759 WritePodOpGenericAdaptor(RangeT values, const WritePodOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
760
761 template <typename LateInst = WritePodOp, typename = std::enable_if_t<std::is_same_v<LateInst, WritePodOp>>>
762 WritePodOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
763
764 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
765 return Base::getODSOperandIndexAndLength(index, odsOperands.size());
766 }
767
768 RangeT getODSOperands(unsigned index) {
769 auto valueRange = getODSOperandIndexAndLength(index);
770 return {std::next(odsOperands.begin(), valueRange.first),
771 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
772 }
773
774 ValueT getPodRef() {
775 return (*getODSOperands(0).begin());
776 }
777
778 ValueT getValue() {
779 return (*getODSOperands(1).begin());
780 }
781
782 RangeT getOperands() {
783 return odsOperands;
784 }
785
786private:
787 RangeT odsOperands;
788};
789class WritePodOpAdaptor : public WritePodOpGenericAdaptor<::mlir::ValueRange> {
790public:
793
794 ::llvm::LogicalResult verify(::mlir::Location loc);
795};
796class WritePodOp : public ::mlir::Op<WritePodOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::DestructurableAccessorOpInterface::Trait, ::mlir::PromotableMemOpInterface::Trait, ::llzk::DiscardableAllocationAccessorOpInterface::Trait, ::llzk::pod::PodRefOpInterface::Trait, ::llzk::pod::PodAccessOpInterface::Trait> {
797public:
798 using Op::Op;
799 using Op::print;
801 template <typename RangeT>
804 static constexpr int odsIndex_pod_ref = 0;
805 static constexpr int odsIndex_value = 1;
807 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
808 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("record_name")};
809 return ::llvm::ArrayRef(attrNames);
810 }
811
812 ::mlir::StringAttr getRecordNameAttrName() {
813 return getAttributeNameForIndex(0);
814 }
815
816 static ::mlir::StringAttr getRecordNameAttrName(::mlir::OperationName name) {
817 return getAttributeNameForIndex(name, 0);
818 }
819
820 static constexpr ::llvm::StringLiteral getOperationName() {
821 return ::llvm::StringLiteral("pod.write");
822 }
823
824 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
825 return {index, 1};
826 }
827
828 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
829 auto valueRange = getODSOperandIndexAndLength(index);
830 return {std::next(getOperation()->operand_begin(), valueRange.first),
831 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
832 }
833
834 ::mlir::TypedValue<::llzk::pod::PodType> getPodRef() {
835 return ::llvm::cast<::mlir::TypedValue<::llzk::pod::PodType>>(*getODSOperands(0).begin());
836 }
837
838 ::mlir::TypedValue<::mlir::Type> getValue() {
839 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin());
840 }
841
842 ::mlir::OpOperand &getPodRefMutable() {
843 auto range = getODSOperandIndexAndLength(0);
844 return getOperation()->getOpOperand(range.first);
845 }
846
847 ::mlir::OpOperand &getValueMutable() {
848 auto range = getODSOperandIndexAndLength(1);
849 return getOperation()->getOpOperand(range.first);
850 }
851
852 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
853 return {index, 1};
854 }
855
856 ::mlir::Operation::result_range getODSResults(unsigned index) {
857 auto valueRange = getODSResultIndexAndLength(index);
858 return {std::next(getOperation()->result_begin(), valueRange.first),
859 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
860 }
861
862 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
863 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
864 static llvm::hash_code computePropertiesHash(const Properties &prop);
865 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
866 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
867 static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
868 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
869 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
870 void writeProperties(::mlir::DialectBytecodeWriter &writer);
871 ::mlir::StringAttr getRecordNameAttr() {
872 return ::llvm::cast<::mlir::StringAttr>(getProperties().record_name);
873 }
874
875 ::llvm::StringRef getRecordName();
876 void setRecordNameAttr(::mlir::StringAttr attr) {
877 getProperties().record_name = attr;
878 }
879
880 void setRecordName(::llvm::StringRef attrValue);
881 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value pod_ref, ::mlir::StringAttr record_name, ::mlir::Value value);
882 static WritePodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value pod_ref, ::mlir::StringAttr record_name, ::mlir::Value value);
883 static WritePodOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value pod_ref, ::mlir::StringAttr record_name, ::mlir::Value value);
884 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::mlir::StringAttr record_name, ::mlir::Value value);
885 static WritePodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::mlir::StringAttr record_name, ::mlir::Value value);
886 static WritePodOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::mlir::StringAttr record_name, ::mlir::Value value);
887 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value pod_ref, ::llvm::StringRef record_name, ::mlir::Value value);
888 static WritePodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value pod_ref, ::llvm::StringRef record_name, ::mlir::Value value);
889 static WritePodOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value pod_ref, ::llvm::StringRef record_name, ::mlir::Value value);
890 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::llvm::StringRef record_name, ::mlir::Value value);
891 static WritePodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::llvm::StringRef record_name, ::mlir::Value value);
892 static WritePodOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::llvm::StringRef record_name, ::mlir::Value value);
893 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
894 static WritePodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
895 static WritePodOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
896 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
897 static WritePodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
898 static WritePodOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
899 ::llvm::LogicalResult verifyInvariantsImpl();
900 ::llvm::LogicalResult verifyInvariants();
901 ::llvm::LogicalResult verify();
902 bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout);
903 ::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout);
904 bool loadsFrom(const ::mlir::MemorySlot &slot);
905 bool storesTo(const ::mlir::MemorySlot &slot);
906 ::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout);
907 bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout);
908 ::mlir::DeletionKind removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<mlir::OpOperand *> &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout);
909 bool loadsFromDiscardableAllocation(::mlir::Value ptr);
910 bool storesToDiscardableAllocation(::mlir::Value ptr);
911 bool canEraseAsDeadStoreTo(::mlir::Value ptr, const ::mlir::DataLayout &dataLayout);
912 bool isRead();
913 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
914 void print(::mlir::OpAsmPrinter &_odsPrinter);
915private:
916 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
917 return getAttributeNameForIndex((*this)->getName(), index);
918 }
919
920 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
921 assert(index < 1 && "invalid attribute index");
922 assert(name.getStringRef() == getOperationName() && "invalid operation name");
923 assert(name.isRegistered() && "Operation isn't registered, missing a "
924 "dependent dialect loading?");
925 return name.getAttributeNames()[index];
926 }
927
928public:
930 inline ::llzk::pod::PodType getPodRefType() {
931 return ::llvm::cast<PodAccessOpInterface>(getOperation()).getPodRefType();
932 }
933};
934
935} // namespace llzk::pod
936MLIR_DECLARE_EXPLICIT_TYPE_ID(::llzk::pod::WritePodOp)
938
939
940#endif // GET_OP_CLASSES
941
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:157
NewPodOpAdaptor(NewPodOp op)
Definition Ops.cpp.inc:155
NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:212
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:223
NewPodOpGenericAdaptor(RangeT values, const NewPodOpGenericAdaptorBase &base)
Definition Ops.h.inc:218
NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:214
::llvm::SmallVector< RangeT > getMapOperands()
Definition Ops.h.inc:237
NewPodOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:221
NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs)
Definition Ops.h.inc:216
NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:212
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:227
void print(::mlir::OpAsmPrinter &p)
Definition Ops.cpp:503
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:571
::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name)
Definition Ops.h.inc:294
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:195
::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:577
static NewPodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::llzk::pod::InitializedRecords initialValues={})
Definition Ops.cpp.inc:466
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:297
NewPodOpAdaptor Adaptor
Definition Ops.h.inc:267
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Definition Ops.cpp.inc:660
void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr)
Definition Ops.h.inc:382
::mlir::ArrayAttr getInitializedRecordsAttr()
Definition Ops.h.inc:358
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp.inc:378
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:528
::mlir::Operation::operand_range getInitialValues()
Definition Ops.h.inc:325
::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name)
Definition Ops.h.inc:302
::mlir::OperandRangeRange getMapOperands()
Definition Ops.h.inc:329
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:310
::mlir::SmallVector<::llzk::pod::RecordValue > getInitializedRecordValues()
Definition Ops.cpp:540
NewPodOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:269
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:259
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
Definition Ops.cpp.inc:520
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:323
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:456
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::pod::InitializedRecords initialValues={})
Definition Ops.cpp.inc:460
::std::optional<::mlir::PromotableAllocationOpInterface > handlePromotionComplete(const ::mlir::MemorySlot &slot, ::mlir::Value defaultValue, ::mlir::OpBuilder &builder)
Required by PromotableAllocationOpInterface / mem2reg pass.
Definition Ops.cpp:264
::llvm::SmallVector<::mlir::DestructurableMemorySlot > getDestructurableSlots()
Required by DestructurableAllocationOpInterface / SROA pass.
Definition Ops.cpp:95
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:335
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::pod::PodType resultType, ::llvm::ArrayRef<::mlir::ValueRange > mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap, ::llzk::pod::InitializedRecords initialValues={})
::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name)
Definition Ops.h.inc:310
::llvm::SmallVector<::mlir::MemorySlot > getPromotableSlots()
Required by PromotableAllocationOpInterface / mem2reg pass.
Definition Ops.cpp:226
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
Definition Ops.cpp.inc:442
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:348
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:270
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.cpp.inc:174
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
Definition Ops.h.inc:363
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:339
::mlir::TypedValue<::llzk::pod::PodType > getResult()
Definition Ops.h.inc:345
static constexpr int odsIndex_initialValues
Definition Ops.h.inc:271
::mlir::StringAttr getInitializedRecordsAttrName()
Definition Ops.h.inc:282
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
Definition Ops.cpp.inc:447
::mlir::Value getDefaultValue(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder)
Required by PromotableAllocationOpInterface / mem2reg pass.
Definition Ops.cpp:235
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:319
::mlir::StringAttr getMapOpGroupSizesAttrName()
Definition Ops.h.inc:290
void setInitializedRecordsAttr(::mlir::ArrayAttr attr)
Definition Ops.h.inc:373
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
Definition Ops.h.inc:368
::mlir::MutableOperandRange getInitialValuesMutable()
Definition Ops.cpp.inc:183
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
Definition Ops.cpp.inc:452
void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn)
Definition Ops.cpp:90
::mlir::StringAttr getOperandSegmentSizesAttrName()
Definition Ops.h.inc:306
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:277
FoldAdaptor::Properties Properties
Definition Ops.h.inc:273
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:357
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::pod::PodType resultType, ::llzk::pod::InitializedRecords initialValues={})
::mlir::MutableOperandRangeRange getMapOperandsMutable()
Definition Ops.cpp.inc:189
::llvm::LogicalResult verify()
Definition Ops.cpp:374
::mlir::StringAttr getInitializedRecordsAttrName(::mlir::OperationName name)
Definition Ops.h.inc:286
::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:107
static constexpr int odsIndex_mapOperands
Definition Ops.h.inc:272
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp.inc:415
::std::optional<::mlir::DestructurableAllocationOpInterface > handleDestructuringComplete(const ::mlir::DestructurableMemorySlot &slot, ::mlir::OpBuilder &builder)
Required by DestructurableAllocationOpInterface / SROA pass.
Definition Ops.cpp:145
::mlir::ArrayAttr getInitializedRecords()
Definition Ops.cpp.inc:437
void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr)
Definition Ops.h.inc:377
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp:405
::mlir::StringAttr getNumDimsPerMapAttrName()
Definition Ops.h.inc:298
void handleBlockArgument(const ::mlir::MemorySlot &slot, ::mlir::BlockArgument argument, ::mlir::OpBuilder &builder)
Required by PromotableAllocationOpInterface / mem2reg pass.
Definition Ops.cpp:261
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:314
ReadPodOpAdaptor(ReadPodOp op)
Definition Ops.cpp.inc:687
ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:506
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:689
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:517
ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:506
ReadPodOpGenericAdaptor(RangeT values, const ReadPodOpGenericAdaptorBase &base)
Definition Ops.h.inc:512
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:521
ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:508
ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:510
ReadPodOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:515
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:930
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:721
::llvm::StringRef getRecordName()
Definition Ops.cpp.inc:769
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:756
::mlir::TypedValue<::mlir::Type > getResult()
Definition Ops.h.inc:601
void setRecordNameAttr(::mlir::StringAttr attr)
Definition Ops.h.inc:619
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:576
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:188
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:591
ReadPodOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:551
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:572
bool storesTo(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp.inc:1043
bool isRead()
Return true if the op is a read, false if it's a write.
Definition Ops.cpp.inc:1048
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:903
inline ::llzk::pod::PodType getPodRefType()
Gets the type of the referenced pod.
Definition Ops.h.inc:673
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp:617
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp:612
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:936
::llvm::LogicalResult verify()
Definition Ops.cpp:621
FoldAdaptor::Properties Properties
Definition Ops.h.inc:554
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:698
::mlir::TypedValue<::llzk::pod::PodType > getPodRef()
Definition Ops.h.inc:582
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:991
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:737
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value pod_ref, ::mlir::StringAttr record_name)
Definition Ops.cpp.inc:778
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:552
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:749
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:568
bool canEraseAsDeadStoreTo(::mlir::Value ptr, const ::mlir::DataLayout &dataLayout)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
Definition Ops.cpp.inc:1063
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:743
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:595
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:555
static constexpr int odsIndex_pod_ref
Definition Ops.h.inc:553
::mlir::OpOperand & getPodRefMutable()
Definition Ops.h.inc:586
::mlir::StringAttr getRecordNameAttr()
Definition Ops.h.inc:614
::mlir::StringAttr getRecordNameAttrName()
Definition Ops.h.inc:560
bool loadsFrom(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp.inc:1038
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:1021
bool storesToDiscardableAllocation(::mlir::Value ptr)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
Definition Ops.cpp.inc:1058
::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:196
::mlir::StringAttr getRecordNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:564
void setRecordName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:774
ReadPodOpAdaptor Adaptor
Definition Ops.h.inc:549
bool loadsFromDiscardableAllocation(::mlir::Value ptr)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
Definition Ops.cpp.inc:1053
::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp:183
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:760
static ReadPodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type result, ::mlir::Value pod_ref, ::mlir::StringAttr record_name)
Definition Ops.cpp.inc:784
::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:1030
WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:753
::llvm::LogicalResult verify(::mlir::Location loc)
Definition Ops.cpp.inc:1091
WritePodOpAdaptor(WritePodOp op)
Definition Ops.cpp.inc:1089
WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:753
WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:755
RangeT getODSOperands(unsigned index)
Definition Ops.h.inc:768
WritePodOpGenericAdaptor(RangeT values, const WritePodOpGenericAdaptorBase &base)
Definition Ops.h.inc:759
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:764
WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
Definition Ops.h.inc:757
WritePodOpGenericAdaptor(RangeT values, LateInst op)
Definition Ops.h.inc:762
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:210
::mlir::Operation::result_range getODSResults(unsigned index)
Definition Ops.h.inc:856
inline ::llzk::pod::PodType getPodRefType()
Gets the type of the referenced pod.
Definition Ops.h.inc:930
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
Definition Ops.h.inc:807
::llvm::LogicalResult verify()
Definition Ops.cpp:654
static llvm::hash_code computePropertiesHash(const Properties &prop)
Definition Ops.cpp.inc:1139
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value pod_ref, ::mlir::StringAttr record_name, ::mlir::Value value)
Definition Ops.cpp.inc:1180
void print(::mlir::OpAsmPrinter &_odsPrinter)
Definition Ops.cpp.inc:1402
::llvm::LogicalResult verifyInvariants()
Definition Ops.cpp.inc:1331
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
Definition Ops.h.inc:852
static constexpr ::llvm::StringLiteral getOperationName()
Definition Ops.h.inc:820
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
Definition Ops.cpp.inc:1337
bool loadsFromDiscardableAllocation(::mlir::Value ptr)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
Definition Ops.cpp.inc:1467
::mlir::StringAttr getRecordNameAttr()
Definition Ops.h.inc:871
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1162
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
Definition Ops.cpp:645
::mlir::TypedValue<::mlir::Type > getValue()
Definition Ops.h.inc:838
::mlir::StringAttr getRecordNameAttrName(::mlir::OperationName name)
Definition Ops.h.inc:816
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
Definition Ops.h.inc:803
::mlir::OpOperand & getPodRefMutable()
Definition Ops.h.inc:842
void setRecordName(::llvm::StringRef attrValue)
Definition Ops.cpp.inc:1176
WritePodOpGenericAdaptor< RangeT > GenericAdaptor
Definition Ops.h.inc:802
::mlir::TypedValue<::llzk::pod::PodType > getPodRef()
Definition Ops.h.inc:834
FoldAdaptor::Properties Properties
Definition Ops.h.inc:806
static constexpr int odsIndex_pod_ref
Definition Ops.h.inc:804
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
Definition Ops.cpp.inc:1145
::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:219
::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp:205
::mlir::OpOperand & getValueMutable()
Definition Ops.h.inc:847
::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:1444
bool isRead()
Return true if the op is a read, false if it's a write.
Definition Ops.cpp.inc:1462
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:1435
static constexpr int odsIndex_value
Definition Ops.h.inc:805
::mlir::Operation::operand_range getODSOperands(unsigned index)
Definition Ops.h.inc:828
::llvm::LogicalResult verifyInvariantsImpl()
Definition Ops.cpp.inc:1307
void writeProperties(::mlir::DialectBytecodeWriter &writer)
Definition Ops.cpp:650
WritePodOpAdaptor Adaptor
Definition Ops.h.inc:800
bool storesTo(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp.inc:1457
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
Definition Ops.h.inc:824
::llvm::StringRef getRecordName()
Definition Ops.cpp.inc:1171
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
Definition Ops.cpp.inc:1158
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
Definition Ops.cpp.inc:1100
void setRecordNameAttr(::mlir::StringAttr attr)
Definition Ops.h.inc:876
bool canEraseAsDeadStoreTo(::mlir::Value ptr, const ::mlir::DataLayout &dataLayout)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
Definition Ops.cpp.inc:1477
bool storesToDiscardableAllocation(::mlir::Value ptr)
Required by DiscardableAllocationAccessorOpInterface / unused allocation cleanup.
Definition Ops.cpp.inc:1472
bool loadsFrom(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
Definition Ops.cpp.inc:1452
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
Definition Ops.cpp.inc:1151
static WritePodOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value pod_ref, ::mlir::StringAttr record_name, ::mlir::Value value)
Definition Ops.cpp.inc:1186
::mlir::StringAttr getRecordNameAttrName()
Definition Ops.h.inc:812
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
Definition Ops.cpp.inc:1123
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
Definition Ops.h.inc:196
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.cpp.inc:119
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
Definition Ops.cpp.inc:148
NewPodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:177
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
Definition Ops.cpp.inc:143
::mlir::DictionaryAttr getAttributes()
Definition Ops.h.inc:188
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
Definition Ops.cpp.inc:138
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:173
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:479
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:469
ReadPodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:473
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
Definition Ops.h.inc:725
::std::optional<::mlir::OperationName > odsOpName
Definition Ops.h.inc:715
WritePodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
Definition Ops.h.inc:719
Common interface for operations that reference a plain-old-data struct value.
mlir::ArrayRef< RecordValue > InitializedRecords
Definition Types.h:25
bool operator!=(const Properties &rhs) const
Definition Ops.h.inc:167
bool operator==(const Properties &rhs) const
Definition Ops.h.inc:159
void setOperandSegmentSizes(::llvm::ArrayRef< int32_t > propValue)
Definition Ops.h.inc:155
void setInitializedRecords(const ::mlir::ArrayAttr &propValue)
Definition Ops.h.inc:126
void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue)
Definition Ops.h.inc:146
void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue)
Definition Ops.h.inc:136
::llvm::ArrayRef< int32_t > getOperandSegmentSizes() const
Definition Ops.h.inc:151
void setRecordName(const ::mlir::StringAttr &propValue)
Definition Ops.h.inc:455
void setRecordName(const ::mlir::StringAttr &propValue)
Definition Ops.h.inc:701