74template <
typename RangeT>
76 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
79 ArrayLengthOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
85 template <
typename LateInst = ArrayLengthOp,
typename = std::enable_if_t<std::is_same_v<LateInst, ArrayLengthOp>>>
94 return {std::next(odsOperands.begin(), valueRange.first),
95 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
118 ::llvm::LogicalResult
verify(::mlir::Location loc);
120class ArrayLengthOp :
public ::mlir::Op<ArrayLengthOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IndexType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::llzk::array::ArrayRefOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> {
125 template <
typename RangeT>
133 return ::llvm::StringLiteral(
"array.len");
142 return {std::next(getOperation()->operand_begin(), valueRange.first),
143 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
146 ::mlir::TypedValue<::llzk::array::ArrayType>
getArrRef() {
147 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*
getODSOperands(0).begin());
150 ::mlir::TypedValue<::mlir::IndexType>
getDim() {
151 return ::llvm::cast<::mlir::TypedValue<::mlir::IndexType>>(*
getODSOperands(1).begin());
156 return getOperation()->getOpOperand(range.first);
161 return getOperation()->getOpOperand(range.first);
170 return {std::next(getOperation()->result_begin(), valueRange.first),
171 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
175 return ::llvm::cast<::mlir::TypedValue<::mlir::IndexType>>(*
getODSResults(0).begin());
178 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type length, ::mlir::Value arr_ref, ::mlir::Value dim);
179 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::Value dim);
180 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::Value dim);
181 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
182 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
185 static ::llvm::LogicalResult
inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
186 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
187 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
188 void print(::mlir::OpAsmPrinter &_odsPrinter);
189 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
193 return ::llvm::cast<ArrayRefOpInterface>(getOperation()).getArrRefType();
215 auto &propStorage = this->mapOpGroupSizes;
216 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(propStorage);
219 this->mapOpGroupSizes = propValue;
225 auto &propStorage = this->numDimsPerMap;
226 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(propStorage);
229 this->numDimsPerMap = propValue;
234 auto &propStorage = this->operandSegmentSizes;
238 auto &propStorage = this->operandSegmentSizes;
239 ::llvm::copy(propValue, propStorage.begin());
249 return !(*
this == rhs);
276 auto attr = ::llvm::cast<::mlir::DenseI32ArrayAttr>(
getProperties().mapOpGroupSizes);
283template <
typename RangeT>
285 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
296 template <
typename LateInst = CreateArrayOp,
typename = std::enable_if_t<std::is_same_v<LateInst, CreateArrayOp>>>
305 return {std::next(odsOperands.begin(), valueRange.first),
306 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
317 ::llvm::SmallVector<RangeT> tblgenTmpOperandGroups;
318 for (
int i = 0, e = sizes.size(); i < e; ++i) {
319 tblgenTmpOperandGroups.push_back(tblgenTmpOperands.take_front(sizes[i]));
320 tblgenTmpOperands = tblgenTmpOperands.drop_front(sizes[i]);
322 return tblgenTmpOperandGroups;
337 ::llvm::LogicalResult
verify(::mlir::Location loc);
339class CreateArrayOp :
public ::mlir::Op<CreateArrayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::llzk::array::ArrayType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::AttrSizedOperandSegments, ::llzk::VerifySizesForMultiAffineOps<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::mlir::OpAsmOpInterface::Trait, ::mlir::PromotableAllocationOpInterface::Trait, ::mlir::DestructurableAllocationOpInterface::Trait> {
344 template <
typename RangeT>
349 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"mapOpGroupSizes"), ::llvm::StringRef(
"numDimsPerMap"), ::llvm::StringRef(
"operandSegmentSizes")};
350 return ::llvm::ArrayRef(attrNames);
354 return getAttributeNameForIndex(0);
358 return getAttributeNameForIndex(
name, 0);
362 return getAttributeNameForIndex(1);
366 return getAttributeNameForIndex(
name, 1);
370 return (*this)->getName().getAttributeNames().back();
374 return name.getAttributeNames().back();
378 return ::llvm::StringLiteral(
"array.new");
384 return {std::next(getOperation()->operand_begin(), valueRange.first),
385 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
404 return {std::next(getOperation()->result_begin(), valueRange.first),
405 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
408 ::mlir::TypedValue<::llzk::array::ArrayType>
getResult() {
409 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*
getODSResults(0).begin());
412 static ::llvm::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
418 static ::llvm::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
419 static ::llvm::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
422 return ::llvm::dyn_cast_or_null<::mlir::DenseI32ArrayAttr>(getProperties().numDimsPerMap);
427 return ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().mapOpGroupSizes);
432 getProperties().numDimsPerMap = attr;
437 getProperties().mapOpGroupSizes = attr;
442 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState,
::llzk::array::ArrayType result, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap);
443 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState,
::llzk::array::ArrayType result, ::llvm::ArrayRef<::mlir::ValueRange> mapOperands, ::llvm::ArrayRef<int32_t> numDimsPerMap);
447 ::llvm::LogicalResult
verify();
448 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
451 ::mlir::Value
getDefaultValue(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder);
452 void handleBlockArgument(const ::mlir::MemorySlot &slot, ::mlir::BlockArgument argument, ::mlir::OpBuilder &builder);
453 ::std::optional<::mlir::PromotableAllocationOpInterface>
handlePromotionComplete(const ::mlir::MemorySlot &slot, ::mlir::Value defaultValue, ::mlir::OpBuilder &builder);
455 ::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);
456 ::std::optional<::mlir::DestructurableAllocationOpInterface>
handleDestructuringComplete(const ::mlir::DestructurableMemorySlot &slot, ::mlir::OpBuilder &builder);
457 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
459 void print(::mlir::OpAsmPrinter &_odsPrinter);
460 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
462 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
463 return getAttributeNameForIndex((*this)->getName(), index);
466 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName
name,
unsigned index) {
467 assert(index < 2 &&
"invalid attribute index");
469 assert(
name.isRegistered() &&
"Operation isn't registered, missing a "
470 "dependent dialect loading?");
471 return name.getAttributeNames()[index];
476 ::llvm::SmallVector<::mlir::Type,1> &elementsTypes,
477 ::mlir::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> elements,
478 ::mlir::Type resultType
481 ::mlir::TypeRange, ::mlir::OperandRange, ::mlir::Type
484 static ::llvm::SmallVector<::mlir::Type> resultTypeToElementsTypes(::mlir::Type resultType);
518template <
typename RangeT>
520 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
523 ExtractArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
529 template <
typename LateInst = ExtractArrayOp,
typename = std::enable_if_t<std::is_same_v<LateInst, ExtractArrayOp>>>
538 return {std::next(odsOperands.begin(), valueRange.first),
539 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
562 ::llvm::LogicalResult
verify(::mlir::Location loc);
564class ExtractArrayOp :
public ::mlir::Op<ExtractArrayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::llzk::array::ArrayType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::SymbolUserOpInterface::Trait, ::llzk::array::ArrayRefOpInterface::Trait, ::llzk::array::ArrayAccessOpInterface::Trait> {
569 template <
typename RangeT>
577 return ::llvm::StringLiteral(
"array.extract");
583 return {std::next(getOperation()->operand_begin(), valueRange.first),
584 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
587 ::mlir::TypedValue<::llzk::array::ArrayType>
getArrRef() {
588 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*
getODSOperands(0).begin());
597 return getOperation()->getOpOperand(range.first);
607 return {std::next(getOperation()->result_begin(), valueRange.first),
608 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
611 ::mlir::TypedValue<::llzk::array::ArrayType>
getResult() {
612 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*
getODSResults(0).begin());
615 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
616 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
617 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
618 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
619 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
622 static ::llvm::LogicalResult
inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
623 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
625 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
626 void print(::mlir::OpAsmPrinter &_odsPrinter);
628 static ::llvm::LogicalResult
630 std::optional<::mlir::Location> location,
632 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
639 return ::llvm::cast<ArrayAccessOpInterface>(getOperation()).getArrRefType();
674template <
typename RangeT>
676 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
679 InsertArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
685 template <
typename LateInst = InsertArrayOp,
typename = std::enable_if_t<std::is_same_v<LateInst, InsertArrayOp>>>
694 return {std::next(odsOperands.begin(), valueRange.first),
695 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
722 ::llvm::LogicalResult
verify(::mlir::Location loc);
724class InsertArrayOp :
public ::mlir::Op<InsertArrayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::SymbolUserOpInterface::Trait, ::llzk::array::ArrayRefOpInterface::Trait, ::llzk::array::ArrayAccessOpInterface::Trait> {
729 template <
typename RangeT>
737 return ::llvm::StringLiteral(
"array.insert");
743 return {std::next(getOperation()->operand_begin(), valueRange.first),
744 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
747 ::mlir::TypedValue<::llzk::array::ArrayType>
getArrRef() {
748 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*
getODSOperands(0).begin());
755 ::mlir::TypedValue<::llzk::array::ArrayType>
getRvalue() {
756 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*
getODSOperands(2).begin());
761 return getOperation()->getOpOperand(range.first);
767 return getOperation()->getOpOperand(range.first);
776 return {std::next(getOperation()->result_begin(), valueRange.first),
777 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
780 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
781 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
782 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
785 ::llvm::LogicalResult
verify();
786 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
788 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
789 void print(::mlir::OpAsmPrinter &_odsPrinter);
793 return ::llvm::cast<ArrayAccessOpInterface>(getOperation()).getArrRefType();
828template <
typename RangeT>
830 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
833 ReadArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
839 template <
typename LateInst = ReadArrayOp,
typename = std::enable_if_t<std::is_same_v<LateInst, ReadArrayOp>>>
848 return {std::next(odsOperands.begin(), valueRange.first),
849 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
872 ::llvm::LogicalResult
verify(::mlir::Location loc);
874class ReadArrayOp :
public ::mlir::Op<ReadArrayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait, ::mlir::OpTrait::InferTypeOpAdaptor, ::mlir::DestructurableAccessorOpInterface::Trait, ::mlir::PromotableMemOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::llzk::array::ArrayRefOpInterface::Trait, ::llzk::array::ArrayAccessOpInterface::Trait> {
879 template <
typename RangeT>
887 return ::llvm::StringLiteral(
"array.read");
893 return {std::next(getOperation()->operand_begin(), valueRange.first),
894 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
897 ::mlir::TypedValue<::llzk::array::ArrayType>
getArrRef() {
898 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*
getODSOperands(0).begin());
907 return getOperation()->getOpOperand(range.first);
917 return {std::next(getOperation()->result_begin(), valueRange.first),
918 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
922 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*
getODSResults(0).begin());
925 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
926 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
927 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
928 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
929 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
932 ::llvm::LogicalResult
verify();
933 static ::llvm::LogicalResult
inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes);
934 bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout);
935 ::mlir::DeletionKind
rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout);
936 bool loadsFrom(const ::mlir::MemorySlot &slot);
937 bool storesTo(const ::mlir::MemorySlot &slot);
938 ::mlir::Value
getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout);
939 bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout);
940 ::mlir::DeletionKind
removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<mlir::OpOperand *> &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout);
941 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
943 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
944 void print(::mlir::OpAsmPrinter &_odsPrinter);
946 static ::llvm::LogicalResult
948 std::optional<::mlir::Location> location,
950 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
957 return ::llvm::cast<ArrayAccessOpInterface>(getOperation()).getArrRefType();
992template <
typename RangeT>
994 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
997 WriteArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1003 template <
typename LateInst = WriteArrayOp,
typename = std::enable_if_t<std::is_same_v<LateInst, WriteArrayOp>>>
1012 return {std::next(odsOperands.begin(), valueRange.first),
1013 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1040 ::llvm::LogicalResult
verify(::mlir::Location loc);
1042class WriteArrayOp :
public ::mlir::Op<WriteArrayOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::DestructurableAccessorOpInterface::Trait, ::mlir::PromotableMemOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait, ::llzk::array::ArrayRefOpInterface::Trait, ::llzk::array::ArrayAccessOpInterface::Trait> {
1047 template <
typename RangeT>
1055 return ::llvm::StringLiteral(
"array.write");
1061 return {std::next(getOperation()->operand_begin(), valueRange.first),
1062 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1066 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*
getODSOperands(0).begin());
1074 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*
getODSOperands(2).begin());
1079 return getOperation()->getOpOperand(range.first);
1085 return getOperation()->getOpOperand(range.first);
1094 return {std::next(getOperation()->result_begin(), valueRange.first),
1095 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1098 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
1099 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
1100 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1103 ::llvm::LogicalResult
verify();
1104 bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout);
1105 ::mlir::DeletionKind
rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout);
1106 bool loadsFrom(const ::mlir::MemorySlot &slot);
1107 bool storesTo(const ::mlir::MemorySlot &slot);
1108 ::mlir::Value
getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout);
1109 bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout);
1110 ::mlir::DeletionKind
removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<mlir::OpOperand *> &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout);
1111 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
1113 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1114 void print(::mlir::OpAsmPrinter &_odsPrinter);
1118 return ::llvm::cast<ArrayAccessOpInterface>(getOperation()).getArrRefType();
::llvm::LogicalResult verify(::mlir::Location loc)
ArrayLengthOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
ArrayLengthOpAdaptor(ArrayLengthOp op)
ArrayLengthOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
RangeT getODSOperands(unsigned index)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
ArrayLengthOpGenericAdaptor(RangeT values, const ArrayLengthOpGenericAdaptorBase &base)
ArrayLengthOpGenericAdaptor(RangeT values, LateInst op)
ArrayLengthOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
::mlir::TypedValue<::mlir::IndexType > getLength()
inline ::llzk::array::ArrayType getArrRefType()
Gets the type of the referenced base array.
::mlir::OpOperand & getArrRefMutable()
::mlir::TypedValue<::llzk::array::ArrayType > getArrRef()
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
::mlir::Operation::result_range getODSResults(unsigned index)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
static constexpr ::llvm::StringLiteral getOperationName()
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::OpOperand & getDimMutable()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type length, ::mlir::Value arr_ref, ::mlir::Value dim)
::llvm::LogicalResult verifyInvariants()
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
ArrayLengthOpGenericAdaptor< RangeT > GenericAdaptor
::llvm::LogicalResult verifyInvariantsImpl()
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
ArrayLengthOpAdaptor Adaptor
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::TypedValue<::mlir::IndexType > getDim()
CreateArrayOpAdaptor(CreateArrayOp op)
::llvm::LogicalResult verify(::mlir::Location loc)
CreateArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
CreateArrayOpGenericAdaptor(RangeT values, const CreateArrayOpGenericAdaptorBase &base)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
CreateArrayOpGenericAdaptor(RangeT values, LateInst op)
CreateArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::llvm::SmallVector< RangeT > getMapOperands()
CreateArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs)
RangeT getODSOperands(unsigned index)
CreateArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
static void printInferredArrayType(::mlir::OpAsmPrinter &printer, CreateArrayOp, ::mlir::TypeRange, ::mlir::OperandRange, ::mlir::Type)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::array::ArrayType result, ::llvm::ArrayRef<::mlir::ValueRange > mapOperands, ::mlir::DenseI32ArrayAttr numDimsPerMap)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
void print(::mlir::OpAsmPrinter &_odsPrinter)
CreateArrayOpAdaptor Adaptor
void setNumDimsPerMapAttr(::mlir::DenseI32ArrayAttr attr)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llzk::array::ArrayType result, ::mlir::ValueRange elements={})
::mlir::StringAttr getOperandSegmentSizesAttrName(::mlir::OperationName name)
void setMapOpGroupSizesAttr(::mlir::DenseI32ArrayAttr attr)
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::TypedValue<::llzk::array::ArrayType > getResult()
::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::ParseResult parseInferredArrayType(::mlir::OpAsmParser &parser, ::llvm::SmallVector<::mlir::Type, 1 > &elementsTypes, ::mlir::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand > elements, ::mlir::Type resultType)
::llvm::SmallVector<::mlir::DestructurableMemorySlot > getDestructurableSlots()
Required by DestructurableAllocationOpInterface / SROA pass.
::mlir::MutableOperandRangeRange getMapOperandsMutable()
::std::optional<::mlir::PromotableAllocationOpInterface > handlePromotionComplete(const ::mlir::MemorySlot &slot, ::mlir::Value defaultValue, ::mlir::OpBuilder &builder)
Required by PromotableAllocationOpInterface / mem2reg pass.
void setNumDimsPerMap(::llvm::ArrayRef< int32_t > attrValue)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::llvm::LogicalResult verifyInvariantsImpl()
::mlir::StringAttr getNumDimsPerMapAttrName()
::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Operation::result_range getODSResults(unsigned index)
::std::optional<::mlir::DestructurableAllocationOpInterface > handleDestructuringComplete(const ::mlir::DestructurableMemorySlot &slot, ::mlir::OpBuilder &builder)
Required by DestructurableAllocationOpInterface / SROA pass.
static llvm::hash_code computePropertiesHash(const Properties &prop)
::llvm::LogicalResult verify()
::mlir::StringAttr getOperandSegmentSizesAttrName()
::mlir::StringAttr getMapOpGroupSizesAttrName(::mlir::OperationName name)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::mlir::Value getDefaultValue(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder)
Required by PromotableAllocationOpInterface / mem2reg pass.
::llvm::SmallVector<::mlir::MemorySlot > getPromotableSlots()
Required by PromotableAllocationOpInterface / mem2reg pass.
::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.
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::StringAttr getNumDimsPerMapAttrName(::mlir::OperationName name)
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
static constexpr ::llvm::StringLiteral getOperationName()
void getAsmResultNames(::mlir::OpAsmSetValueNameFn setNameFn)
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
void handleBlockArgument(const ::mlir::MemorySlot &slot, ::mlir::BlockArgument argument, ::mlir::OpBuilder &builder)
Required by PromotableAllocationOpInterface / mem2reg pass.
::mlir::OperandRangeRange getMapOperands()
::llvm::LogicalResult verifyInvariants()
FoldAdaptor::Properties Properties
::mlir::StringAttr getMapOpGroupSizesAttrName()
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::MutableOperandRange getElementsMutable()
::mlir::Operation::operand_range getElements()
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties)
void setMapOpGroupSizes(::llvm::ArrayRef< int32_t > attrValue)
CreateArrayOpGenericAdaptor< RangeT > GenericAdaptor
::llvm::LogicalResult verify(::mlir::Location loc)
InsertArrayOpAdaptor(InsertArrayOp op)
InsertArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
InsertArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
InsertArrayOpGenericAdaptor(RangeT values, const InsertArrayOpGenericAdaptorBase &base)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
RangeT getODSOperands(unsigned index)
InsertArrayOpGenericAdaptor(RangeT values, LateInst op)
InsertArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
inline ::llzk::array::ArrayType getArrRefType()
Gets the type of the referenced base array.
::mlir::Operation::operand_range getIndices()
::llvm::LogicalResult verifyInvariantsImpl()
bool isRead()
Return true if the op is a read, false if it's a write.
::llvm::LogicalResult verifyInvariants()
static constexpr ::llvm::StringLiteral getOperationName()
::llvm::LogicalResult verify()
::mlir::TypedValue<::llzk::array::ArrayType > getRvalue()
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::OpOperand & getArrRefMutable()
void print(::mlir::OpAsmPrinter &_odsPrinter)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::mlir::TypedValue<::llzk::array::ArrayType > getArrRef()
::mlir::OpOperand & getRvalueMutable()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue)
InsertArrayOpAdaptor Adaptor
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
InsertArrayOpGenericAdaptor< RangeT > GenericAdaptor
::mlir::MutableOperandRange getIndicesMutable()
ReadArrayOpAdaptor(ReadArrayOp op)
ReadArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::llvm::LogicalResult verify(::mlir::Location loc)
RangeT getODSOperands(unsigned index)
ReadArrayOpGenericAdaptor(RangeT values, LateInst op)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
ReadArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
ReadArrayOpGenericAdaptor(RangeT values, const ReadArrayOpGenericAdaptorBase &base)
ReadArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
::mlir::OpOperand & getArrRefMutable()
::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout)
Required by PromotableAllocationOpInterface / mem2reg 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.
::llvm::LogicalResult verifyInvariantsImpl()
::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.
inline ::llzk::array::ArrayType getArrRefType()
Gets the type of the referenced base array.
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, std::optional<::mlir::Location > location, Adaptor adaptor, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
::mlir::TypedValue<::mlir::Type > getResult()
::mlir::TypedValue<::llzk::array::ArrayType > getArrRef()
bool storesTo(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
::mlir::Operation::operand_range getIndices()
::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location > location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type > &inferredReturnTypes)
bool loadsFrom(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
bool isRead()
Return true if the op is a read, false if it's a write.
::llvm::LogicalResult verify()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::Operation::operand_range getODSOperands(unsigned index)
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.
static constexpr ::llvm::StringLiteral getOperationName()
static bool isCompatibleReturnTypes(::mlir::TypeRange l, ::mlir::TypeRange r)
ReadArrayOpGenericAdaptor< RangeT > GenericAdaptor
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.
ReadArrayOpAdaptor Adaptor
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::llvm::LogicalResult verifyInvariants()
::mlir::MutableOperandRange getIndicesMutable()
::llvm::LogicalResult verify(::mlir::Location loc)
WriteArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
WriteArrayOpAdaptor(WriteArrayOp op)
RangeT getODSOperands(unsigned index)
WriteArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
WriteArrayOpGenericAdaptor(RangeT values, LateInst op)
WriteArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
WriteArrayOpGenericAdaptor(RangeT values, const WriteArrayOpGenericAdaptorBase &base)
::mlir::OpOperand & getRvalueMutable()
::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 loadsFrom(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
WriteArrayOpAdaptor Adaptor
::llvm::LogicalResult verifyInvariants()
::mlir::Operation::result_range getODSResults(unsigned index)
::llvm::LogicalResult verify()
::mlir::Operation::operand_range getIndices()
::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout)
Required by PromotableAllocationOpInterface / mem2reg pass.
void print(::mlir::OpAsmPrinter &_odsPrinter)
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.
::llvm::LogicalResult verifyInvariantsImpl()
WriteArrayOpGenericAdaptor< RangeT > GenericAdaptor
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static constexpr ::llvm::StringLiteral getOperationName()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
inline ::llzk::array::ArrayType getArrRefType()
Gets the type of the referenced base array.
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
bool storesTo(const ::mlir::MemorySlot &slot)
Required by PromotableMemOpInterface / mem2reg pass.
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.
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue)
::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.
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::MutableOperandRange getIndicesMutable()
::mlir::OpOperand & getArrRefMutable()
::mlir::Operation::operand_range getODSOperands(unsigned index)
::mlir::TypedValue<::llzk::array::ArrayType > getArrRef()
::llvm::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::TypedValue<::mlir::Type > getRvalue()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr getAttributes()
ArrayLengthOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
ArrayLengthOpGenericAdaptorBase(::mlir::Operation *op)
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr odsAttrs
::mlir::DenseI32ArrayAttr getMapOpGroupSizesAttr()
::mlir::DictionaryAttr getAttributes()
::llvm::ArrayRef< int32_t > getMapOpGroupSizes()
::mlir::DictionaryAttr odsAttrs
::llvm::ArrayRef< int32_t > getNumDimsPerMap()
const Properties & getProperties()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::RegionRange odsRegions
CreateArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions={})
::mlir::DenseI32ArrayAttr getNumDimsPerMapAttr()
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::RegionRange odsRegions
::mlir::DictionaryAttr getAttributes()
::std::optional<::mlir::OperationName > odsOpName
InsertArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr odsAttrs
InsertArrayOpGenericAdaptorBase(::mlir::Operation *op)
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr odsAttrs
::mlir::DictionaryAttr getAttributes()
ReadArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::RegionRange odsRegions
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
ReadArrayOpGenericAdaptorBase(::mlir::Operation *op)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
WriteArrayOpGenericAdaptorBase(::mlir::Operation *op)
::mlir::DictionaryAttr odsAttrs
WriteArrayOpGenericAdaptorBase(::mlir::DictionaryAttr attrs={}, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr getAttributes()
::mlir::RegionRange odsRegions
::std::optional<::mlir::OperationName > odsOpName
llvm::StringLiteral getOperationName()
Get the operation name, like "constrain.eq" for the given OpClass.
mapOpGroupSizesTy mapOpGroupSizes
void setMapOpGroupSizes(const ::mlir::DenseI32ArrayAttr &propValue)
auto getMapOpGroupSizes()
::llvm::ArrayRef< int32_t > getOperandSegmentSizes() const
::mlir::DenseI32ArrayAttr mapOpGroupSizesTy
::mlir::DenseI32ArrayAttr numDimsPerMapTy
bool operator!=(const Properties &rhs) const
numDimsPerMapTy numDimsPerMap
bool operator==(const Properties &rhs) const
operandSegmentSizesTy operandSegmentSizes
std::array< int32_t, 2 > operandSegmentSizesTy
void setNumDimsPerMap(const ::mlir::DenseI32ArrayAttr &propValue)
void setOperandSegmentSizes(::llvm::ArrayRef< int32_t > propValue)