Files
gps/tools/local/circt/include/mlir/Dialect/ArmNeon/ArmNeon.h.inc
T
2026-07-12 11:01:51 +03:00

1475 lines
70 KiB
C++

/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|* *|
|* Op Declarations *|
|* *|
|* Automatically generated file, do not edit! *|
|* From: ArmNeon.td *|
|* *|
\*===----------------------------------------------------------------------===*/
namespace mlir::arm_neon {
/// BFloat16 matrix multiply-accumulate to single-precision
/// BFMMLA: BFloat16 matrix multiply-accumulate to single-precision.
///
/// The operation multiplies the 2x4 BFloat16 matrix in the first source vector
/// with the 4x2 BFloat16 matrix in the second source vector, then accumulates
/// this intermediate result with the 2x2 Float32 matrix in the accumulator
/// vector, yielding the final 2x2 Float32 result.
///
/// Source:
/// https://developer.arm.com/architectures/instruction-sets/intrinsics/vbfmmlaq_f32
class BfmmlaOp;
} // namespace mlir::arm_neon
namespace mlir::arm_neon {
/// smull roundscale op
/// Signed Multiply Long (vector). This instruction multiplies corresponding
/// signed integer values in the lower or upper half of the vectors of the two
/// source SIMD&FP registers, places the results in a vector, and writes the
/// vector to the destination SIMD&FP register.
///
/// Source:
/// https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics
class SMullOp;
} // namespace mlir::arm_neon
namespace mlir::arm_neon {
/// sdot op
/// The two input vectors `b` and `c` have a 2D shape, consisting of either 2
/// or 4 rows, each row having length 4. This operation computes the pair-wise
/// dot-products of the rows of `b` and `c` and accumulates them with the
/// corresponding entry of `a`:
///
/// ```
/// res[i] := a[i] + dot_product(b[i, ...], c[i, ...])
/// ```
class Sdot2dOp;
} // namespace mlir::arm_neon
namespace mlir::arm_neon {
/// sdot op
/// Signed integer addition of dot product (vector). This instruction performs
/// the following operation on signed integer vectors: res = dot(b, c) + a,
/// where vector operands are partitioned into groups of four elements.
///
/// Source:
/// https://developer.arm.com/architectures/instruction-sets/simd-isas/neon/intrinsics
class SdotOp;
} // namespace mlir::arm_neon
namespace mlir::arm_neon {
/// Matrix-matrix multiply and accumulate op
/// SMMLA: Signed integer matrix multiply-accumulate.
///
/// Signed 8-bit integer matrix multiply-accumulate. This instruction multiplies
/// the 2x8 matrix of signed 8-bit integer values in the first source vector by
/// the 8x2 matrix of signed 8-bit integer values in the second source vector.
/// The resulting 2x2 32-bit integer matrix product is destructively added to
/// the 32-bit integer matrix accumulator in the destination vector. This is
/// equivalent to performing an 8-way dot product per destination element.
///
/// Source:
/// https://developer.arm.com/architectures/instruction-sets/intrinsics/#f:@navigationhierarchiessimdisa=[Neon]&q=smmla
class SmmlaOp;
} // namespace mlir::arm_neon
namespace mlir::arm_neon {
/// Unsinged matrix-matrix multiply and accumulate op
/// UMMLA: Signed integer matrix multiply-accumulate.
///
/// Unsigned 8-bit integer matrix multiply-accumulate. This instruction
/// multiplies the 2x8 matrix of unsigned 8-bit integer values in the first
/// source vector by the 8x2 matrix of unsigned 8-bit integer values in the
/// second source vector. The resulting 2x2 32-bit integer matrix product is
/// destructively added to the 32-bit integer matrix accumulator in the
/// destination vector. This is equivalent to performing an 8-way dot product
/// per destination element.
///
/// Source:
/// https://developer.arm.com/architectures/instruction-sets/intrinsics/#f:@navigationhierarchiessimdisa=[Neon]&q=ummla
class UmmlaOp;
} // namespace mlir::arm_neon
namespace mlir::arm_neon {
/// Unsignged and signed matrix-matrix multiply and accumulate op
/// USMMLA: Signed integer matrix multiply-accumulate.
///
/// Unsigned and signed 8-bit integer matrix multiply-accumulate. This
/// instruction multiplies the 2x8 matrix of unsigned 8-bit integer values in
/// the first source vector by the 8x2 matrix of signed 8-bit integer values in
/// the second source vector. The resulting 2x2 32-bit integer matrix product is
/// destructively added to the 32-bit integer matrix accumulator in the
/// destination vector. This is equivalent to performing an 8-way dot product
/// per destination element.
///
///
/// Source:
/// https://developer.arm.com/architectures/instruction-sets/intrinsics/#f:@navigationhierarchiessimdisa=[Neon]&q=usmmla
class UsmmlaOp;
} // namespace mlir::arm_neon
#ifdef GET_OP_CLASSES
#undef GET_OP_CLASSES
namespace mlir::arm_neon {
//===----------------------------------------------------------------------===//
// ::mlir::arm_neon::BfmmlaOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class BfmmlaOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
BfmmlaOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("arm_neon.intr.bfmmla", odsAttrs.getContext());
}
BfmmlaOpGenericAdaptorBase(BfmmlaOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class BfmmlaOpGenericAdaptor : public detail::BfmmlaOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::BfmmlaOpGenericAdaptorBase;
static constexpr int odsIndex_acc = 0;
static constexpr int odsIndex_src1 = 1;
static constexpr int odsIndex_src2 = 2;
public:
BfmmlaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
BfmmlaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : BfmmlaOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
BfmmlaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : BfmmlaOpGenericAdaptor(values, attrs, Properties{}, {}) {}
BfmmlaOpGenericAdaptor(RangeT values, const BfmmlaOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = BfmmlaOp, typename = std::enable_if_t<std::is_same_v<LateInst, BfmmlaOp>>>
BfmmlaOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAcc() {
return (*getODSOperands(0).begin());
}
ValueT getSrc1() {
return (*getODSOperands(1).begin());
}
ValueT getSrc2() {
return (*getODSOperands(2).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class BfmmlaOpAdaptor : public BfmmlaOpGenericAdaptor<::mlir::ValueRange> {
public:
using BfmmlaOpGenericAdaptor::BfmmlaOpGenericAdaptor;
BfmmlaOpAdaptor(BfmmlaOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class BfmmlaOp : public ::mlir::Op<BfmmlaOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = BfmmlaOpAdaptor;
template <typename RangeT>
using GenericAdaptor = BfmmlaOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_acc = 0;
static constexpr int odsIndex_src1 = 1;
static constexpr int odsIndex_src2 = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("arm_neon.intr.bfmmla");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getAcc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::VectorType> getSrc1() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::VectorType> getSrc2() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin());
}
::mlir::OpOperand &getAccMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSrc1Mutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSrc2Mutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static BfmmlaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static BfmmlaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static BfmmlaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static BfmmlaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BfmmlaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static BfmmlaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BfmmlaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static BfmmlaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::arm_neon
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_neon::BfmmlaOp)
namespace mlir::arm_neon {
//===----------------------------------------------------------------------===//
// ::mlir::arm_neon::SMullOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class SMullOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
SMullOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("arm_neon.intr.smull", odsAttrs.getContext());
}
SMullOpGenericAdaptorBase(SMullOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class SMullOpGenericAdaptor : public detail::SMullOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::SMullOpGenericAdaptorBase;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
public:
SMullOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
SMullOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SMullOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
SMullOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SMullOpGenericAdaptor(values, attrs, Properties{}, {}) {}
SMullOpGenericAdaptor(RangeT values, const SMullOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = SMullOp, typename = std::enable_if_t<std::is_same_v<LateInst, SMullOp>>>
SMullOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getA() {
return (*getODSOperands(0).begin());
}
ValueT getB() {
return (*getODSOperands(1).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class SMullOpAdaptor : public SMullOpGenericAdaptor<::mlir::ValueRange> {
public:
using SMullOpGenericAdaptor::SMullOpGenericAdaptor;
SMullOpAdaptor(SMullOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class SMullOp : public ::mlir::Op<SMullOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = SMullOpAdaptor;
template <typename RangeT>
using GenericAdaptor = SMullOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("arm_neon.intr.smull");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::VectorType> getB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin());
}
::mlir::OpOperand &getAMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getBMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b);
static SMullOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b);
static SMullOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b);
static SMullOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b);
static SMullOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SMullOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SMullOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SMullOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SMullOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::arm_neon
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_neon::SMullOp)
namespace mlir::arm_neon {
//===----------------------------------------------------------------------===//
// ::mlir::arm_neon::Sdot2dOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class Sdot2dOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
Sdot2dOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("arm_neon.2d.sdot", odsAttrs.getContext());
}
Sdot2dOpGenericAdaptorBase(Sdot2dOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class Sdot2dOpGenericAdaptor : public detail::Sdot2dOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::Sdot2dOpGenericAdaptorBase;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
static constexpr int odsIndex_c = 2;
public:
Sdot2dOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
Sdot2dOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Sdot2dOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
Sdot2dOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Sdot2dOpGenericAdaptor(values, attrs, Properties{}, {}) {}
Sdot2dOpGenericAdaptor(RangeT values, const Sdot2dOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = Sdot2dOp, typename = std::enable_if_t<std::is_same_v<LateInst, Sdot2dOp>>>
Sdot2dOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getA() {
return (*getODSOperands(0).begin());
}
ValueT getB() {
return (*getODSOperands(1).begin());
}
ValueT getC() {
return (*getODSOperands(2).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class Sdot2dOpAdaptor : public Sdot2dOpGenericAdaptor<::mlir::ValueRange> {
public:
using Sdot2dOpGenericAdaptor::Sdot2dOpGenericAdaptor;
Sdot2dOpAdaptor(Sdot2dOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class Sdot2dOp : public ::mlir::Op<Sdot2dOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = Sdot2dOpAdaptor;
template <typename RangeT>
using GenericAdaptor = Sdot2dOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
static constexpr int odsIndex_c = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("arm_neon.2d.sdot");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::VectorType> getB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::VectorType> getC() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin());
}
::mlir::OpOperand &getAMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getBMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getCMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c);
static Sdot2dOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c);
static Sdot2dOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c);
static Sdot2dOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c);
static Sdot2dOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Sdot2dOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static Sdot2dOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Sdot2dOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static Sdot2dOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
static constexpr int kReductionSize = 4;
};
} // namespace mlir::arm_neon
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_neon::Sdot2dOp)
namespace mlir::arm_neon {
//===----------------------------------------------------------------------===//
// ::mlir::arm_neon::SdotOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class SdotOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
SdotOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("arm_neon.intr.sdot", odsAttrs.getContext());
}
SdotOpGenericAdaptorBase(SdotOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class SdotOpGenericAdaptor : public detail::SdotOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::SdotOpGenericAdaptorBase;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
static constexpr int odsIndex_c = 2;
public:
SdotOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
SdotOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SdotOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
SdotOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SdotOpGenericAdaptor(values, attrs, Properties{}, {}) {}
SdotOpGenericAdaptor(RangeT values, const SdotOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = SdotOp, typename = std::enable_if_t<std::is_same_v<LateInst, SdotOp>>>
SdotOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getA() {
return (*getODSOperands(0).begin());
}
ValueT getB() {
return (*getODSOperands(1).begin());
}
ValueT getC() {
return (*getODSOperands(2).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class SdotOpAdaptor : public SdotOpGenericAdaptor<::mlir::ValueRange> {
public:
using SdotOpGenericAdaptor::SdotOpGenericAdaptor;
SdotOpAdaptor(SdotOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class SdotOp : public ::mlir::Op<SdotOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = SdotOpAdaptor;
template <typename RangeT>
using GenericAdaptor = SdotOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_a = 0;
static constexpr int odsIndex_b = 1;
static constexpr int odsIndex_c = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("arm_neon.intr.sdot");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getA() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::VectorType> getB() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::VectorType> getC() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin());
}
::mlir::OpOperand &getAMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getBMutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getCMutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c);
static SdotOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c);
static SdotOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c);
static SdotOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c);
static SdotOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SdotOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SdotOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SdotOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SdotOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::arm_neon
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_neon::SdotOp)
namespace mlir::arm_neon {
//===----------------------------------------------------------------------===//
// ::mlir::arm_neon::SmmlaOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class SmmlaOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
SmmlaOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("arm_neon.intr.smmla", odsAttrs.getContext());
}
SmmlaOpGenericAdaptorBase(SmmlaOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class SmmlaOpGenericAdaptor : public detail::SmmlaOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::SmmlaOpGenericAdaptorBase;
static constexpr int odsIndex_acc = 0;
static constexpr int odsIndex_src1 = 1;
static constexpr int odsIndex_src2 = 2;
public:
SmmlaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
SmmlaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SmmlaOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
SmmlaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SmmlaOpGenericAdaptor(values, attrs, Properties{}, {}) {}
SmmlaOpGenericAdaptor(RangeT values, const SmmlaOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = SmmlaOp, typename = std::enable_if_t<std::is_same_v<LateInst, SmmlaOp>>>
SmmlaOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAcc() {
return (*getODSOperands(0).begin());
}
ValueT getSrc1() {
return (*getODSOperands(1).begin());
}
ValueT getSrc2() {
return (*getODSOperands(2).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class SmmlaOpAdaptor : public SmmlaOpGenericAdaptor<::mlir::ValueRange> {
public:
using SmmlaOpGenericAdaptor::SmmlaOpGenericAdaptor;
SmmlaOpAdaptor(SmmlaOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class SmmlaOp : public ::mlir::Op<SmmlaOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = SmmlaOpAdaptor;
template <typename RangeT>
using GenericAdaptor = SmmlaOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_acc = 0;
static constexpr int odsIndex_src1 = 1;
static constexpr int odsIndex_src2 = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("arm_neon.intr.smmla");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getAcc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::VectorType> getSrc1() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::VectorType> getSrc2() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin());
}
::mlir::OpOperand &getAccMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSrc1Mutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSrc2Mutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static SmmlaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static SmmlaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static SmmlaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static SmmlaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SmmlaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static SmmlaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SmmlaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static SmmlaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::arm_neon
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_neon::SmmlaOp)
namespace mlir::arm_neon {
//===----------------------------------------------------------------------===//
// ::mlir::arm_neon::UmmlaOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class UmmlaOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
UmmlaOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("arm_neon.intr.ummla", odsAttrs.getContext());
}
UmmlaOpGenericAdaptorBase(UmmlaOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class UmmlaOpGenericAdaptor : public detail::UmmlaOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::UmmlaOpGenericAdaptorBase;
static constexpr int odsIndex_acc = 0;
static constexpr int odsIndex_src1 = 1;
static constexpr int odsIndex_src2 = 2;
public:
UmmlaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
UmmlaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UmmlaOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
UmmlaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : UmmlaOpGenericAdaptor(values, attrs, Properties{}, {}) {}
UmmlaOpGenericAdaptor(RangeT values, const UmmlaOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = UmmlaOp, typename = std::enable_if_t<std::is_same_v<LateInst, UmmlaOp>>>
UmmlaOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAcc() {
return (*getODSOperands(0).begin());
}
ValueT getSrc1() {
return (*getODSOperands(1).begin());
}
ValueT getSrc2() {
return (*getODSOperands(2).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class UmmlaOpAdaptor : public UmmlaOpGenericAdaptor<::mlir::ValueRange> {
public:
using UmmlaOpGenericAdaptor::UmmlaOpGenericAdaptor;
UmmlaOpAdaptor(UmmlaOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class UmmlaOp : public ::mlir::Op<UmmlaOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = UmmlaOpAdaptor;
template <typename RangeT>
using GenericAdaptor = UmmlaOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_acc = 0;
static constexpr int odsIndex_src1 = 1;
static constexpr int odsIndex_src2 = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("arm_neon.intr.ummla");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getAcc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::VectorType> getSrc1() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::VectorType> getSrc2() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin());
}
::mlir::OpOperand &getAccMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSrc1Mutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSrc2Mutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static UmmlaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static UmmlaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static UmmlaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static UmmlaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static UmmlaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static UmmlaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static UmmlaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static UmmlaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::arm_neon
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_neon::UmmlaOp)
namespace mlir::arm_neon {
//===----------------------------------------------------------------------===//
// ::mlir::arm_neon::UsmmlaOp declarations
//===----------------------------------------------------------------------===//
namespace detail {
class UsmmlaOpGenericAdaptorBase {
public:
using Properties = ::mlir::EmptyProperties;
protected:
::mlir::DictionaryAttr odsAttrs;
::std::optional<::mlir::OperationName> odsOpName;
Properties properties;
::mlir::RegionRange odsRegions;
public:
UsmmlaOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
odsOpName.emplace("arm_neon.intr.usmmla", odsAttrs.getContext());
}
UsmmlaOpGenericAdaptorBase(UsmmlaOp op);
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
return {index, 1};
}
const Properties &getProperties() {
return properties;
}
::mlir::DictionaryAttr getAttributes() {
return odsAttrs;
}
};
} // namespace detail
template <typename RangeT>
class UsmmlaOpGenericAdaptor : public detail::UsmmlaOpGenericAdaptorBase {
using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
using Base = detail::UsmmlaOpGenericAdaptorBase;
static constexpr int odsIndex_acc = 0;
static constexpr int odsIndex_src1 = 1;
static constexpr int odsIndex_src2 = 2;
public:
UsmmlaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
UsmmlaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UsmmlaOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
UsmmlaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : UsmmlaOpGenericAdaptor(values, attrs, Properties{}, {}) {}
UsmmlaOpGenericAdaptor(RangeT values, const UsmmlaOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
template <typename LateInst = UsmmlaOp, typename = std::enable_if_t<std::is_same_v<LateInst, UsmmlaOp>>>
UsmmlaOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return Base::getODSOperandIndexAndLength(index, odsOperands.size());
}
RangeT getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(odsOperands.begin(), valueRange.first),
std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
}
ValueT getAcc() {
return (*getODSOperands(0).begin());
}
ValueT getSrc1() {
return (*getODSOperands(1).begin());
}
ValueT getSrc2() {
return (*getODSOperands(2).begin());
}
RangeT getOperands() {
return odsOperands;
}
private:
RangeT odsOperands;
};
class UsmmlaOpAdaptor : public UsmmlaOpGenericAdaptor<::mlir::ValueRange> {
public:
using UsmmlaOpGenericAdaptor::UsmmlaOpGenericAdaptor;
UsmmlaOpAdaptor(UsmmlaOp op);
::llvm::LogicalResult verify(::mlir::Location loc);
};
class UsmmlaOp : public ::mlir::Op<UsmmlaOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::VectorType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
public:
using Op::Op;
using Op::print;
using Adaptor = UsmmlaOpAdaptor;
template <typename RangeT>
using GenericAdaptor = UsmmlaOpGenericAdaptor<RangeT>;
using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
static constexpr int odsIndex_acc = 0;
static constexpr int odsIndex_src1 = 1;
static constexpr int odsIndex_src2 = 2;
using Properties = FoldAdaptor::Properties;
static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
return {};
}
static constexpr ::llvm::StringLiteral getOperationName() {
return ::llvm::StringLiteral("arm_neon.intr.usmmla");
}
std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::operand_range getODSOperands(unsigned index) {
auto valueRange = getODSOperandIndexAndLength(index);
return {std::next(getOperation()->operand_begin(), valueRange.first),
std::next(getOperation()->operand_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getAcc() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin());
}
::mlir::TypedValue<::mlir::VectorType> getSrc1() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin());
}
::mlir::TypedValue<::mlir::VectorType> getSrc2() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin());
}
::mlir::OpOperand &getAccMutable() {
auto range = getODSOperandIndexAndLength(0);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSrc1Mutable() {
auto range = getODSOperandIndexAndLength(1);
return getOperation()->getOpOperand(range.first);
}
::mlir::OpOperand &getSrc2Mutable() {
auto range = getODSOperandIndexAndLength(2);
return getOperation()->getOpOperand(range.first);
}
std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
return {index, 1};
}
::mlir::Operation::result_range getODSResults(unsigned index) {
auto valueRange = getODSResultIndexAndLength(index);
return {std::next(getOperation()->result_begin(), valueRange.first),
std::next(getOperation()->result_begin(), valueRange.first + valueRange.second)};
}
::mlir::TypedValue<::mlir::VectorType> getRes() {
return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSResults(0).begin());
}
static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
static llvm::hash_code computePropertiesHash(const Properties &prop);
static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs);
static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static UsmmlaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static UsmmlaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static UsmmlaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static UsmmlaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value acc, ::mlir::Value src1, ::mlir::Value src2);
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static UsmmlaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static UsmmlaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static UsmmlaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
static UsmmlaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
::llvm::LogicalResult verifyInvariantsImpl();
::llvm::LogicalResult verifyInvariants();
static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
void print(::mlir::OpAsmPrinter &_odsPrinter);
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
public:
};
} // namespace mlir::arm_neon
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::arm_neon::UsmmlaOp)
#endif // GET_OP_CLASSES