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);
415 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
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");
468 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
469 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
470 "dependent dialect loading?");
471 return name.getAttributeNames()[index];
476 static ::mlir::ParseResult parseInferredArrayType(::mlir::OpAsmParser &parser,
477 ::llvm::SmallVector<::mlir::Type,1> &elementsTypes,
478 ::mlir::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> elements,
479 ::mlir::Type resultType
482 static void printInferredArrayType(::mlir::OpAsmPrinter &printer,
CreateArrayOp,
483 ::mlir::TypeRange, ::mlir::OperandRange, ::mlir::Type
486 static ::llvm::SmallVector<::mlir::Type> resultTypeToElementsTypes(::mlir::Type resultType);
520template <
typename RangeT>
522 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
525 ExtractArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
531 template <
typename LateInst = ExtractArrayOp,
typename = std::enable_if_t<std::is_same_v<LateInst, ExtractArrayOp>>>
540 return {std::next(odsOperands.begin(), valueRange.first),
541 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
564 ::llvm::LogicalResult
verify(::mlir::Location loc);
566class 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> {
571 template <
typename RangeT>
579 return ::llvm::StringLiteral(
"array.extract");
585 return {std::next(getOperation()->operand_begin(), valueRange.first),
586 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
589 ::mlir::TypedValue<::llzk::array::ArrayType>
getArrRef() {
590 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*
getODSOperands(0).begin());
599 return getOperation()->getOpOperand(range.first);
609 return {std::next(getOperation()->result_begin(), valueRange.first),
610 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
613 ::mlir::TypedValue<::llzk::array::ArrayType>
getResult() {
614 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*
getODSResults(0).begin());
617 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
618 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
619 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
620 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
621 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
624 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);
625 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
627 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
628 void print(::mlir::OpAsmPrinter &_odsPrinter);
630 static ::llvm::LogicalResult
632 std::optional<::mlir::Location> location,
634 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
641 return ::llvm::cast<ArrayAccessOpInterface>(getOperation()).getArrRefType();
676template <
typename RangeT>
678 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
681 InsertArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
687 template <
typename LateInst = InsertArrayOp,
typename = std::enable_if_t<std::is_same_v<LateInst, InsertArrayOp>>>
696 return {std::next(odsOperands.begin(), valueRange.first),
697 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
724 ::llvm::LogicalResult
verify(::mlir::Location loc);
726class 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> {
731 template <
typename RangeT>
739 return ::llvm::StringLiteral(
"array.insert");
745 return {std::next(getOperation()->operand_begin(), valueRange.first),
746 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
749 ::mlir::TypedValue<::llzk::array::ArrayType>
getArrRef() {
750 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*
getODSOperands(0).begin());
757 ::mlir::TypedValue<::llzk::array::ArrayType>
getRvalue() {
758 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*
getODSOperands(2).begin());
763 return getOperation()->getOpOperand(range.first);
769 return getOperation()->getOpOperand(range.first);
778 return {std::next(getOperation()->result_begin(), valueRange.first),
779 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
782 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
783 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
784 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
787 ::llvm::LogicalResult
verify();
788 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
790 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
791 void print(::mlir::OpAsmPrinter &_odsPrinter);
795 return ::llvm::cast<ArrayAccessOpInterface>(getOperation()).getArrRefType();
830template <
typename RangeT>
832 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
835 ReadArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
841 template <
typename LateInst = ReadArrayOp,
typename = std::enable_if_t<std::is_same_v<LateInst, ReadArrayOp>>>
850 return {std::next(odsOperands.begin(), valueRange.first),
851 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
874 ::llvm::LogicalResult
verify(::mlir::Location loc);
876class 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> {
881 template <
typename RangeT>
889 return ::llvm::StringLiteral(
"array.read");
895 return {std::next(getOperation()->operand_begin(), valueRange.first),
896 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
899 ::mlir::TypedValue<::llzk::array::ArrayType>
getArrRef() {
900 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*
getODSOperands(0).begin());
909 return getOperation()->getOpOperand(range.first);
919 return {std::next(getOperation()->result_begin(), valueRange.first),
920 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
924 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*
getODSResults(0).begin());
927 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
928 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
929 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices);
930 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
931 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
934 ::llvm::LogicalResult
verify();
935 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);
936 bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout);
937 ::mlir::DeletionKind
rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout);
938 bool loadsFrom(const ::mlir::MemorySlot &slot);
939 bool storesTo(const ::mlir::MemorySlot &slot);
940 ::mlir::Value
getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout);
941 bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout);
942 ::mlir::DeletionKind
removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<mlir::OpOperand *> &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout);
943 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
945 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
946 void print(::mlir::OpAsmPrinter &_odsPrinter);
948 static ::llvm::LogicalResult
950 std::optional<::mlir::Location> location,
952 ::llvm::SmallVectorImpl<::mlir::Type> &inferredReturnTypes);
959 return ::llvm::cast<ArrayAccessOpInterface>(getOperation()).getArrRefType();
994template <
typename RangeT>
996 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
999 WriteArrayOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = {}, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
1005 template <
typename LateInst = WriteArrayOp,
typename = std::enable_if_t<std::is_same_v<LateInst, WriteArrayOp>>>
1014 return {std::next(odsOperands.begin(), valueRange.first),
1015 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
1042 ::llvm::LogicalResult
verify(::mlir::Location loc);
1044class 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> {
1049 template <
typename RangeT>
1057 return ::llvm::StringLiteral(
"array.write");
1063 return {std::next(getOperation()->operand_begin(), valueRange.first),
1064 std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
1068 return ::llvm::cast<::mlir::TypedValue<::llzk::array::ArrayType>>(*
getODSOperands(0).begin());
1076 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*
getODSOperands(2).begin());
1081 return getOperation()->getOpOperand(range.first);
1087 return getOperation()->getOpOperand(range.first);
1096 return {std::next(getOperation()->result_begin(), valueRange.first),
1097 std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
1100 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
1101 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arr_ref, ::mlir::ValueRange indices, ::mlir::Value rvalue);
1102 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
1105 ::llvm::LogicalResult
verify();
1106 bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout);
1107 ::mlir::DeletionKind
rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout);
1108 bool loadsFrom(const ::mlir::MemorySlot &slot);
1109 bool storesTo(const ::mlir::MemorySlot &slot);
1110 ::mlir::Value
getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout);
1111 bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout);
1112 ::mlir::DeletionKind
removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<mlir::OpOperand *> &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout);
1113 ::llvm::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
1115 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
1116 void print(::mlir::OpAsmPrinter &_odsPrinter);
1120 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 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)
::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)