43 auto &propStorage = this->initializedRecords;
44 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage);
47 this->initializedRecords = propValue;
53 auto &propStorage = this->mapOpGroupSizes;
54 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(propStorage);
57 this->mapOpGroupSizes = propValue;
63 auto &propStorage = this->numDimsPerMap;
64 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(propStorage);
67 this->numDimsPerMap = propValue;
72 auto &propStorage = this->operandSegmentSizes;
76 auto &propStorage = this->operandSegmentSizes;
77 ::llvm::copy(propValue, propStorage.begin());
88 return !(*
this == rhs);
117 auto attr = ::llvm::cast<::mlir::DenseI32ArrayAttr>(
getProperties().mapOpGroupSizes);
124template <
typename RangeT>
126 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
137 template <
typename LateInst = NewPodOp,
typename = std::enable_if_t<std::is_same_v<LateInst, NewPodOp>>>
146 return {std::next(odsOperands.begin(), valueRange.first),
147 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
158 ::llvm::SmallVector<RangeT> tblgenTmpOperandGroups;
159 for (
int i = 0, e = sizes.size(); i < e; ++i) {
160 tblgenTmpOperandGroups.push_back(tblgenTmpOperands.take_front(sizes[i]));
161 tblgenTmpOperands = tblgenTmpOperands.drop_front(sizes[i]);
163 return tblgenTmpOperandGroups;
178 ::llvm::LogicalResult
verify(::mlir::Location loc);
180class 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::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::PromotableAllocationOpInterface::Trait, ::mlir::DestructurableAllocationOpInterface::Trait, ::mlir::OpAsmOpInterface::Trait> {
185 template <
typename RangeT>
190 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"initializedRecords"), ::llvm::StringRef(
"mapOpGroupSizes"), ::llvm::StringRef(
"numDimsPerMap"), ::llvm::StringRef(
"operandSegmentSizes")};
191 return ::llvm::ArrayRef(attrNames);
195 return getAttributeNameForIndex(0);
199 return getAttributeNameForIndex(name, 0);
203 return getAttributeNameForIndex(1);
207 return getAttributeNameForIndex(name, 1);
211 return getAttributeNameForIndex(2);
215 return getAttributeNameForIndex(name, 2);
219 return (*this)->getName().getAttributeNames().back();
223 return name.getAttributeNames().back();
227 return ::llvm::StringLiteral(
"pod.new");
233 return {std::next(getOperation()->operand_begin(), valueRange.first),
234 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
253 return {std::next(getOperation()->result_begin(), valueRange.first),
254 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
258 return ::llvm::cast<::mlir::TypedValue<::llzk::pod::PodType>>(*
getODSResults(0).begin());
261 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
264 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
267 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
268 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
271 return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().initializedRecords);
276 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(getProperties().numDimsPerMap);
281 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
286 getProperties().initializedRecords = attr;
290 getProperties().numDimsPerMap = attr;
295 getProperties().mapOpGroupSizes = attr;
304 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
305 void print(::mlir::OpAsmPrinter &p);
308 ::llvm::LogicalResult
verify();
310 ::mlir::Value
getDefaultValue(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder);
311 void handleBlockArgument(const ::mlir::MemorySlot &slot, ::mlir::BlockArgument argument, ::mlir::OpBuilder &builder);
312 ::std::optional<::mlir::PromotableAllocationOpInterface>
handlePromotionComplete(const ::mlir::MemorySlot &slot, ::mlir::Value defaultValue, ::mlir::OpBuilder &builder);
314 ::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);
315 ::std::optional<::mlir::DestructurableAllocationOpInterface>
handleDestructuringComplete(const ::mlir::DestructurableMemorySlot &slot, ::mlir::OpBuilder &builder);
317 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
319 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
320 return getAttributeNameForIndex((*this)->getName(), index);
323 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
324 assert(index < 3 &&
"invalid attribute index");
325 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
326 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
327 "dependent dialect loading?");
328 return name.getAttributeNames()[index];
353 auto &propStorage = this->record_name;
354 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(propStorage);
357 this->record_name = propValue;
365 return !(*
this == rhs);
393 auto attr = ::llvm::cast<::mlir::FlatSymbolRefAttr>(
getProperties().record_name);
400template <
typename RangeT>
402 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
413 template <
typename LateInst = ReadPodOp,
typename = std::enable_if_t<std::is_same_v<LateInst, ReadPodOp>>>
422 return {std::next(odsOperands.begin(), valueRange.first),
423 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
442 ::llvm::LogicalResult
verify(::mlir::Location loc);
444class 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::pod::PodRefOpInterface::Trait, ::llzk::pod::PodAccessOpInterface::Trait> {
449 template <
typename RangeT>
454 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"record_name")};
455 return ::llvm::ArrayRef(attrNames);
459 return getAttributeNameForIndex(0);
463 return getAttributeNameForIndex(name, 0);
467 return ::llvm::StringLiteral(
"pod.read");
476 return {std::next(getOperation()->operand_begin(), valueRange.first),
477 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
481 return ::llvm::cast<::mlir::TypedValue<::llzk::pod::PodType>>(*
getODSOperands(0).begin());
486 return getOperation()->getOpOperand(range.first);
495 return {std::next(getOperation()->result_begin(), valueRange.first),
496 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
500 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*
getODSResults(0).begin());
503 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
506 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
509 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
510 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
513 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().record_name);
518 getProperties().record_name = attr;
522 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name);
523 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name);
524 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value pod_ref, ::llvm::StringRef record_name);
525 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::llvm::StringRef record_name);
526 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
529 ::llvm::LogicalResult
verify();
530 bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout);
531 ::mlir::DeletionKind
rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout);
532 bool loadsFrom(const ::mlir::MemorySlot &slot);
533 bool storesTo(const ::mlir::MemorySlot &slot);
534 ::mlir::Value
getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout);
535 bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout);
536 ::mlir::DeletionKind
removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<mlir::OpOperand *> &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout);
538 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
539 void print(::mlir::OpAsmPrinter &_odsPrinter);
541 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
542 return getAttributeNameForIndex((*this)->getName(), index);
545 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
546 assert(index < 1 &&
"invalid attribute index");
547 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
548 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
549 "dependent dialect loading?");
550 return name.getAttributeNames()[index];
556 return ::llvm::cast<PodAccessOpInterface>(getOperation()).getPodRefType();
578 auto &propStorage = this->record_name;
579 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(propStorage);
582 this->record_name = propValue;
590 return !(*
this == rhs);
618 auto attr = ::llvm::cast<::mlir::FlatSymbolRefAttr>(
getProperties().record_name);
625template <
typename RangeT>
627 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
638 template <
typename LateInst = WritePodOp,
typename = std::enable_if_t<std::is_same_v<LateInst, WritePodOp>>>
647 return {std::next(odsOperands.begin(), valueRange.first),
648 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
671 ::llvm::LogicalResult
verify(::mlir::Location loc);
673class 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::pod::PodRefOpInterface::Trait, ::llzk::pod::PodAccessOpInterface::Trait> {
678 template <
typename RangeT>
683 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"record_name")};
684 return ::llvm::ArrayRef(attrNames);
688 return getAttributeNameForIndex(0);
692 return getAttributeNameForIndex(name, 0);
696 return ::llvm::StringLiteral(
"pod.write");
705 return {std::next(getOperation()->operand_begin(), valueRange.first),
706 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
710 return ::llvm::cast<::mlir::TypedValue<::llzk::pod::PodType>>(*
getODSOperands(0).begin());
714 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*
getODSOperands(1).begin());
719 return getOperation()->getOpOperand(range.first);
724 return getOperation()->getOpOperand(range.first);
733 return {std::next(getOperation()->result_begin(), valueRange.first),
734 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
737 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
740 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
743 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
744 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
747 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(getProperties().record_name);
752 getProperties().record_name = attr;
756 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name, ::mlir::Value value);
757 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name, ::mlir::Value value);
758 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value pod_ref, ::llvm::StringRef record_name, ::mlir::Value value);
759 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value pod_ref, ::llvm::StringRef record_name, ::mlir::Value value);
760 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
763 ::llvm::LogicalResult
verify();
764 bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout);
765 ::mlir::DeletionKind
rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout);
766 bool loadsFrom(const ::mlir::MemorySlot &slot);
767 bool storesTo(const ::mlir::MemorySlot &slot);
768 ::mlir::Value
getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout);
769 bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout);
770 ::mlir::DeletionKind
removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<mlir::OpOperand *> &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout);
772 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
773 void print(::mlir::OpAsmPrinter &_odsPrinter);
775 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
776 return getAttributeNameForIndex((*this)->getName(), index);
779 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
780 assert(index < 1 &&
"invalid attribute index");
781 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
782 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
783 "dependent dialect loading?");
784 return name.getAttributeNames()[index];
790 return ::llvm::cast<PodAccessOpInterface>(getOperation()).getPodRefType();
::llvm::LogicalResult verify(::mlir::Location loc)
NewPodOpAdaptor(NewPodOp op)
NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
NewPodOpGenericAdaptor(RangeT values, const NewPodOpGenericAdaptorBase &base)
::llvm::SmallVector< RangeT > getMapOperands()
NewPodOpGenericAdaptor(RangeT values, LateInst op)
RangeT getInitialValues()
NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs)
NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
RangeT getODSOperands(unsigned index)
NewPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
void print(::mlir::OpAsmPrinter &p)
::llvm::LogicalResult verifyInvariants()
::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static llvm::hash_code computePropertiesHash(const Properties &prop)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr)
::mlir::ArrayAttr getInitializedRecordsAttr()
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::Operation::operand_range getInitialValues()
::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name)
::mlir::OperandRangeRange getMapOperands()
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::SmallVector<::llzk::pod::RecordValue > getInitializedRecordValues()
NewPodOpGenericAdaptor< RangeT > GenericAdaptor
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::pod::InitializedRecords initialValues={})
::std::optional<::mlir::PromotableAllocationOpInterface > handlePromotionComplete(const ::mlir::MemorySlot &slot, ::mlir::Value defaultValue, ::mlir::OpBuilder &builder)
Required by PromotableAllocationOpInterface / mem2reg pass.
::llvm::SmallVector<::mlir::DestructurableMemorySlot > getDestructurableSlots()
Required by DestructurableAllocationOpInterface / SROA pass.
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
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)
::llvm::SmallVector<::mlir::MemorySlot > getPromotableSlots()
Required by PromotableAllocationOpInterface / mem2reg pass.
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::TypedValue<::llzk::pod::PodType > getResult()
::mlir::StringAttr getInitializedRecordsAttrName()
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
::mlir::Value getDefaultValue(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder)
Required by PromotableAllocationOpInterface / mem2reg pass.
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::StringAttr getMapOpGroupSizesAttrName()
void setInitializedRecordsAttr(::mlir::ArrayAttr attr)
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::MutableOperandRange getInitialValuesMutable()
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn)
::mlir::StringAttr getOperandSegmentSizesAttrName()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
FoldAdaptor::Properties Properties
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::pod::PodType resultType, ::llzk::pod::InitializedRecords initialValues={})
::mlir::MutableOperandRangeRange getMapOperandsMutable()
::llvm::LogicalResult verify()
::mlir::StringAttr getInitializedRecordsAttrName(::mlir::OperationName name)
::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.
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::std::optional<::mlir::DestructurableAllocationOpInterface > handleDestructuringComplete(const ::mlir::DestructurableMemorySlot &slot, ::mlir::OpBuilder &builder)
Required by DestructurableAllocationOpInterface / SROA pass.
::mlir::ArrayAttr getInitializedRecords()
void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::StringAttr getNumDimsPerMapAttrName()
void handleBlockArgument(const ::mlir::MemorySlot &slot, ::mlir::BlockArgument argument, ::mlir::OpBuilder &builder)
Required by PromotableAllocationOpInterface / mem2reg pass.
static constexpr ::llvm::StringLiteral getOperationName()
ReadPodOpAdaptor(ReadPodOp op)
ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
ReadPodOpGenericAdaptor(RangeT values, const ReadPodOpGenericAdaptorBase &base)
RangeT getODSOperands(unsigned index)
ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
ReadPodOpGenericAdaptor(RangeT values, LateInst op)
ReadPodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verifyInvariants()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::llvm::StringRef getRecordName()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::TypedValue<::mlir::Type > getResult()
::mlir::Operation::operand_range getODSOperands(unsigned index)
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.
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::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.
ReadPodOpGenericAdaptor< RangeT > GenericAdaptor
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::FlatSymbolRefAttr getRecordNameAttr()
bool storesTo(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
bool isRead()
Return true if the op is a read, false if it's a write.
::llvm::LogicalResult verifyInvariantsImpl()
inline ::llzk::pod::PodType getPodRefType()
Gets the type of the referenced pod.
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verify()
FoldAdaptor::Properties Properties
::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout)
Required by PromotableAllocationOpInterface / mem2reg pass.
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::TypedValue<::llzk::pod::PodType > getPodRef()
void print(::mlir::OpAsmPrinter &_odsPrinter)
static llvm::hash_code computePropertiesHash(const Properties &prop)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static constexpr ::llvm::StringLiteral getOperationName()
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::Operation::result_range getODSResults(unsigned index)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::mlir::OpOperand & getPodRefMutable()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name)
::mlir::StringAttr getRecordNameAttrName()
bool loadsFrom(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
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.
::mlir::StringAttr getRecordNameAttrName(::mlir::OperationName name)
void setRecordNameAttr(::mlir::FlatSymbolRefAttr attr)
void setRecordName(::llvm::StringRef attrValue)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::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.
WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
WritePodOpAdaptor(WritePodOp op)
WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
RangeT getODSOperands(unsigned index)
WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
WritePodOpGenericAdaptor(RangeT values, const WritePodOpGenericAdaptorBase &base)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
WritePodOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr)
WritePodOpGenericAdaptor(RangeT values, LateInst op)
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.
::mlir::Operation::result_range getODSResults(unsigned index)
inline ::llzk::pod::PodType getPodRefType()
Gets the type of the referenced pod.
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout)
Required by PromotableAllocationOpInterface / mem2reg pass.
::mlir::FlatSymbolRefAttr getRecordNameAttr()
::llvm::LogicalResult verify()
void setRecordNameAttr(::mlir::FlatSymbolRefAttr attr)
static llvm::hash_code computePropertiesHash(const Properties &prop)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::llvm::LogicalResult verifyInvariants()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::TypedValue<::mlir::Type > getValue()
::mlir::StringAttr getRecordNameAttrName(::mlir::OperationName name)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::mlir::OpOperand & getPodRefMutable()
void setRecordName(::llvm::StringRef attrValue)
WritePodOpGenericAdaptor< RangeT > GenericAdaptor
::mlir::TypedValue<::llzk::pod::PodType > getPodRef()
FoldAdaptor::Properties Properties
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::OpOperand & getValueMutable()
::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.
bool isRead()
Return true if the op is a read, false if it's a write.
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.
::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.
::mlir::Operation::operand_range getODSOperands(unsigned index)
::llvm::LogicalResult verifyInvariantsImpl()
void writeProperties(::mlir::DialectBytecodeWriter &writer)
WritePodOpAdaptor Adaptor
bool storesTo(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::llvm::StringRef getRecordName()
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
bool loadsFrom(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::StringAttr getRecordNameAttrName()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value pod_ref, ::mlir::FlatSymbolRefAttr record_name, ::mlir::Value value)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::ArrayAttr getInitializedRecords()
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
NewPodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
::mlir::DictionaryAttr getAttributes()
::mlir::RegionRange odsRegions
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::std::optional<::mlir::OperationName > odsOpName
::mlir::ArrayAttr getInitializedRecordsAttr()
const Properties & getProperties()
::mlir::DictionaryAttr odsAttrs
::mlir::DictionaryAttr getAttributes()
::llvm::StringRef getRecordName()
::mlir::FlatSymbolRefAttr getRecordNameAttr()
const Properties & getProperties()
::mlir::RegionRange odsRegions
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr odsAttrs
ReadPodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::FlatSymbolRefAttr getRecordNameAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::DictionaryAttr odsAttrs
::std::optional<::mlir::OperationName > odsOpName
const Properties & getProperties()
WritePodOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr getAttributes()
::llvm::StringRef getRecordName()
mlir::ArrayRef< RecordValue > InitializedRecords
bool operator!=(const Properties &rhs) const
bool operator==(const Properties &rhs) const
void setOperandSegmentSizes(::llvm::ArrayRef< int32_t > propValue)
mapOpGroupSizesTy mapOpGroupSizes
operandSegmentSizesTy operandSegmentSizes
std::array< int32_t, 2 > operandSegmentSizesTy
::mlir::ArrayAttr initializedRecordsTy
void setInitializedRecords(const ::mlir::ArrayAttr &propValue)
auto getInitializedRecords()
::mlir::DenseI32ArrayAttr mapOpGroupSizesTy
initializedRecordsTy initializedRecords
void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue)
void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue)
::mlir::DenseI32ArrayAttr numDimsPerMapTy
numDimsPerMapTy numDimsPerMap
::llvm::ArrayRef< int32_t > getOperandSegmentSizes() const
auto getMapOpGroupSizes()
bool operator!=(const Properties &rhs) const
void setRecordName(const ::mlir::FlatSymbolRefAttr &propValue)
record_nameTy record_name
bool operator==(const Properties &rhs) const
::mlir::FlatSymbolRefAttr record_nameTy
record_nameTy record_name
void setRecordName(const ::mlir::FlatSymbolRefAttr &propValue)
bool operator==(const Properties &rhs) const
::mlir::FlatSymbolRefAttr record_nameTy
bool operator!=(const Properties &rhs) const