/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |* *| |* Op Declarations *| |* *| |* Automatically generated file, do not edit! *| |* From: LLVMIntrinsicOps.td *| |* *| \*===----------------------------------------------------------------------===*/ namespace mlir::LLVM { class ACosOp; } // namespace mlir::LLVM namespace mlir::LLVM { class ASinOp; } // namespace mlir::LLVM namespace mlir::LLVM { class ATan2Op; } // namespace mlir::LLVM namespace mlir::LLVM { class ATanOp; } // namespace mlir::LLVM namespace mlir::LLVM { class AbsOp; } // namespace mlir::LLVM namespace mlir::LLVM { class Annotation; } // namespace mlir::LLVM namespace mlir::LLVM { class AssumeOp; } // namespace mlir::LLVM namespace mlir::LLVM { class BitReverseOp; } // namespace mlir::LLVM namespace mlir::LLVM { class ByteSwapOp; } // namespace mlir::LLVM namespace mlir::LLVM { class ConstrainedFAddIntr; } // namespace mlir::LLVM namespace mlir::LLVM { class ConstrainedFDivIntr; } // namespace mlir::LLVM namespace mlir::LLVM { class ConstrainedFMAIntr; } // namespace mlir::LLVM namespace mlir::LLVM { class ConstrainedFMulAddIntr; } // namespace mlir::LLVM namespace mlir::LLVM { class ConstrainedFMulIntr; } // namespace mlir::LLVM namespace mlir::LLVM { class ConstrainedFPExtIntr; } // namespace mlir::LLVM namespace mlir::LLVM { class ConstrainedFPTruncIntr; } // namespace mlir::LLVM namespace mlir::LLVM { class ConstrainedFRemIntr; } // namespace mlir::LLVM namespace mlir::LLVM { class ConstrainedFSubIntr; } // namespace mlir::LLVM namespace mlir::LLVM { class ConstrainedSIToFP; } // namespace mlir::LLVM namespace mlir::LLVM { class ConstrainedUIToFP; } // namespace mlir::LLVM namespace mlir::LLVM { class CopySignOp; } // namespace mlir::LLVM namespace mlir::LLVM { class CoroAlignOp; } // namespace mlir::LLVM namespace mlir::LLVM { class CoroBeginOp; } // namespace mlir::LLVM namespace mlir::LLVM { class CoroEndOp; } // namespace mlir::LLVM namespace mlir::LLVM { class CoroFreeOp; } // namespace mlir::LLVM namespace mlir::LLVM { class CoroIdOp; } // namespace mlir::LLVM namespace mlir::LLVM { class CoroPromiseOp; } // namespace mlir::LLVM namespace mlir::LLVM { class CoroResumeOp; } // namespace mlir::LLVM namespace mlir::LLVM { class CoroSaveOp; } // namespace mlir::LLVM namespace mlir::LLVM { class CoroSizeOp; } // namespace mlir::LLVM namespace mlir::LLVM { class CoroSuspendOp; } // namespace mlir::LLVM namespace mlir::LLVM { class CosOp; } // namespace mlir::LLVM namespace mlir::LLVM { class CoshOp; } // namespace mlir::LLVM namespace mlir::LLVM { class CountLeadingZerosOp; } // namespace mlir::LLVM namespace mlir::LLVM { class CountTrailingZerosOp; } // namespace mlir::LLVM namespace mlir::LLVM { class CtPopOp; } // namespace mlir::LLVM namespace mlir::LLVM { /// Describes how the address relates to a source language variable. class DbgDeclareOp; } // namespace mlir::LLVM namespace mlir::LLVM { /// Relates the program to a debug information label. class DbgLabelOp; } // namespace mlir::LLVM namespace mlir::LLVM { /// Describes how the value relates to a source language variable. class DbgValueOp; } // namespace mlir::LLVM namespace mlir::LLVM { class DebugTrap; } // namespace mlir::LLVM namespace mlir::LLVM { class EhTypeidForOp; } // namespace mlir::LLVM namespace mlir::LLVM { class Exp10Op; } // namespace mlir::LLVM namespace mlir::LLVM { class Exp2Op; } // namespace mlir::LLVM namespace mlir::LLVM { class ExpOp; } // namespace mlir::LLVM namespace mlir::LLVM { class ExpectOp; } // namespace mlir::LLVM namespace mlir::LLVM { class ExpectWithProbabilityOp; } // namespace mlir::LLVM namespace mlir::LLVM { class FAbsOp; } // namespace mlir::LLVM namespace mlir::LLVM { class FCeilOp; } // namespace mlir::LLVM namespace mlir::LLVM { class FFloorOp; } // namespace mlir::LLVM namespace mlir::LLVM { class FMAOp; } // namespace mlir::LLVM namespace mlir::LLVM { class FMulAddOp; } // namespace mlir::LLVM namespace mlir::LLVM { class FTruncOp; } // namespace mlir::LLVM namespace mlir::LLVM { class FakeUseOp; } // namespace mlir::LLVM namespace mlir::LLVM { class FractionExpOp; } // namespace mlir::LLVM namespace mlir::LLVM { class FshlOp; } // namespace mlir::LLVM namespace mlir::LLVM { class FshrOp; } // namespace mlir::LLVM namespace mlir::LLVM { class GetActiveLaneMaskOp; } // namespace mlir::LLVM namespace mlir::LLVM { class InvariantEndOp; } // namespace mlir::LLVM namespace mlir::LLVM { class InvariantStartOp; } // namespace mlir::LLVM namespace mlir::LLVM { class IsConstantOp; } // namespace mlir::LLVM namespace mlir::LLVM { class IsFPClass; } // namespace mlir::LLVM namespace mlir::LLVM { class LaunderInvariantGroupOp; } // namespace mlir::LLVM namespace mlir::LLVM { class LifetimeEndOp; } // namespace mlir::LLVM namespace mlir::LLVM { class LifetimeStartOp; } // namespace mlir::LLVM namespace mlir::LLVM { class LlrintOp; } // namespace mlir::LLVM namespace mlir::LLVM { class LlroundOp; } // namespace mlir::LLVM namespace mlir::LLVM { class LoadExpOp; } // namespace mlir::LLVM namespace mlir::LLVM { class Log10Op; } // namespace mlir::LLVM namespace mlir::LLVM { class Log2Op; } // namespace mlir::LLVM namespace mlir::LLVM { class LogOp; } // namespace mlir::LLVM namespace mlir::LLVM { class LrintOp; } // namespace mlir::LLVM namespace mlir::LLVM { class LroundOp; } // namespace mlir::LLVM namespace mlir::LLVM { class MaskedLoadOp; } // namespace mlir::LLVM namespace mlir::LLVM { class MaskedStoreOp; } // namespace mlir::LLVM namespace mlir::LLVM { class MatrixColumnMajorLoadOp; } // namespace mlir::LLVM namespace mlir::LLVM { class MatrixColumnMajorStoreOp; } // namespace mlir::LLVM namespace mlir::LLVM { class MatrixMultiplyOp; } // namespace mlir::LLVM namespace mlir::LLVM { class MatrixTransposeOp; } // namespace mlir::LLVM namespace mlir::LLVM { class MaxNumOp; } // namespace mlir::LLVM namespace mlir::LLVM { class MaximumOp; } // namespace mlir::LLVM namespace mlir::LLVM { class MemcpyInlineOp; } // namespace mlir::LLVM namespace mlir::LLVM { class MemcpyOp; } // namespace mlir::LLVM namespace mlir::LLVM { class MemmoveOp; } // namespace mlir::LLVM namespace mlir::LLVM { class MemsetInlineOp; } // namespace mlir::LLVM namespace mlir::LLVM { class MemsetOp; } // namespace mlir::LLVM namespace mlir::LLVM { class MinNumOp; } // namespace mlir::LLVM namespace mlir::LLVM { class MinimumOp; } // namespace mlir::LLVM namespace mlir::LLVM { class NearbyintOp; } // namespace mlir::LLVM namespace mlir::LLVM { class NoAliasScopeDeclOp; } // namespace mlir::LLVM namespace mlir::LLVM { class PowIOp; } // namespace mlir::LLVM namespace mlir::LLVM { class PowOp; } // namespace mlir::LLVM namespace mlir::LLVM { class Prefetch; } // namespace mlir::LLVM namespace mlir::LLVM { class PtrAnnotation; } // namespace mlir::LLVM namespace mlir::LLVM { class PtrMaskOp; } // namespace mlir::LLVM namespace mlir::LLVM { class RintOp; } // namespace mlir::LLVM namespace mlir::LLVM { class RoundEvenOp; } // namespace mlir::LLVM namespace mlir::LLVM { class RoundOp; } // namespace mlir::LLVM namespace mlir::LLVM { class SAddSat; } // namespace mlir::LLVM namespace mlir::LLVM { class SAddWithOverflowOp; } // namespace mlir::LLVM namespace mlir::LLVM { class SCmpOp; } // namespace mlir::LLVM namespace mlir::LLVM { class SMaxOp; } // namespace mlir::LLVM namespace mlir::LLVM { class SMinOp; } // namespace mlir::LLVM namespace mlir::LLVM { class SMulWithOverflowOp; } // namespace mlir::LLVM namespace mlir::LLVM { class SSACopyOp; } // namespace mlir::LLVM namespace mlir::LLVM { class SSHLSat; } // namespace mlir::LLVM namespace mlir::LLVM { class SSubSat; } // namespace mlir::LLVM namespace mlir::LLVM { class SSubWithOverflowOp; } // namespace mlir::LLVM namespace mlir::LLVM { class SinOp; } // namespace mlir::LLVM namespace mlir::LLVM { class SincosOp; } // namespace mlir::LLVM namespace mlir::LLVM { class SinhOp; } // namespace mlir::LLVM namespace mlir::LLVM { class SqrtOp; } // namespace mlir::LLVM namespace mlir::LLVM { class StackRestoreOp; } // namespace mlir::LLVM namespace mlir::LLVM { class StackSaveOp; } // namespace mlir::LLVM namespace mlir::LLVM { class StepVectorOp; } // namespace mlir::LLVM namespace mlir::LLVM { class StripInvariantGroupOp; } // namespace mlir::LLVM namespace mlir::LLVM { class TanOp; } // namespace mlir::LLVM namespace mlir::LLVM { class TanhOp; } // namespace mlir::LLVM namespace mlir::LLVM { class ThreadlocalAddressOp; } // namespace mlir::LLVM namespace mlir::LLVM { class Trap; } // namespace mlir::LLVM namespace mlir::LLVM { class UAddSat; } // namespace mlir::LLVM namespace mlir::LLVM { class UAddWithOverflowOp; } // namespace mlir::LLVM namespace mlir::LLVM { class UBSanTrap; } // namespace mlir::LLVM namespace mlir::LLVM { class UCmpOp; } // namespace mlir::LLVM namespace mlir::LLVM { class UMaxOp; } // namespace mlir::LLVM namespace mlir::LLVM { class UMinOp; } // namespace mlir::LLVM namespace mlir::LLVM { class UMulWithOverflowOp; } // namespace mlir::LLVM namespace mlir::LLVM { class USHLSat; } // namespace mlir::LLVM namespace mlir::LLVM { class USubSat; } // namespace mlir::LLVM namespace mlir::LLVM { class USubWithOverflowOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPAShrOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPAddOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPAndOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPFAddOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPFDivOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPFMulAddOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPFMulOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPFNegOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPFPExtOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPFPToSIOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPFPToUIOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPFPTruncOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPFRemOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPFSubOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPFmaOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPIntToPtrOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPLShrOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPLoadOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPMergeMinOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPMulOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPOrOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPPtrToIntOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPReduceAddOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPReduceAndOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPReduceFAddOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPReduceFMaxOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPReduceFMinOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPReduceFMulOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPReduceMulOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPReduceOrOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPReduceSMaxOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPReduceSMinOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPReduceUMaxOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPReduceUMinOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPReduceXorOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPSDivOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPSExtOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPSIToFPOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPSMaxOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPSMinOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPSRemOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPSelectMinOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPShlOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPStoreOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPStridedLoadOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPStridedStoreOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPSubOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPTruncOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPUDivOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPUIToFPOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPUMaxOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPUMinOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPURemOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPXorOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VPZExtOp; } // namespace mlir::LLVM namespace mlir::LLVM { /// Copies the current argument position from `src_list` to `dest_list`. class VaCopyOp; } // namespace mlir::LLVM namespace mlir::LLVM { /// Destroys `arg_list`, which has been initialized by `intr.vastart` or `intr.vacopy`. class VaEndOp; } // namespace mlir::LLVM namespace mlir::LLVM { /// Initializes `arg_list` for subsequent variadic argument extractions. class VaStartOp; } // namespace mlir::LLVM namespace mlir::LLVM { class VarAnnotation; } // namespace mlir::LLVM namespace mlir::LLVM { class masked_compressstore; } // namespace mlir::LLVM namespace mlir::LLVM { class masked_expandload; } // namespace mlir::LLVM namespace mlir::LLVM { class masked_gather; } // namespace mlir::LLVM namespace mlir::LLVM { class masked_scatter; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_deinterleave2; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_extract; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_insert; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_interleave2; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_reduce_add; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_reduce_and; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_reduce_fadd; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_reduce_fmax; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_reduce_fmaximum; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_reduce_fmin; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_reduce_fminimum; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_reduce_fmul; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_reduce_mul; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_reduce_or; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_reduce_smax; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_reduce_smin; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_reduce_umax; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_reduce_umin; } // namespace mlir::LLVM namespace mlir::LLVM { class vector_reduce_xor; } // namespace mlir::LLVM namespace mlir::LLVM { class vscale; } // namespace mlir::LLVM #ifdef GET_OP_CLASSES #undef GET_OP_CLASSES namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ACosOp declarations //===----------------------------------------------------------------------===// namespace detail { class ACosOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ACosOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.acos", odsAttrs.getContext()); } ACosOpGenericAdaptorBase(ACosOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class ACosOpGenericAdaptor : public detail::ACosOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ACosOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: ACosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ACosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ACosOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ACosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ACosOpGenericAdaptor(values, attrs, Properties{}, {}) {} ACosOpGenericAdaptor(RangeT values, const ACosOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ACosOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ACosOpAdaptor : public ACosOpGenericAdaptor<::mlir::ValueRange> { public: using ACosOpGenericAdaptor::ACosOpGenericAdaptor; ACosOpAdaptor(ACosOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ACosOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ACosOpAdaptor; template using GenericAdaptor = ACosOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.acos"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ACosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ACosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ACosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ACosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ACosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ACosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ACosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ACosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ACosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ACosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ACosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ACosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ACosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ACosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ACosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ACosOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 ACosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ACosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ACosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ACosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ACosOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::ACosOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ASinOp declarations //===----------------------------------------------------------------------===// namespace detail { class ASinOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ASinOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.asin", odsAttrs.getContext()); } ASinOpGenericAdaptorBase(ASinOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class ASinOpGenericAdaptor : public detail::ASinOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ASinOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: ASinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ASinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ASinOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ASinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ASinOpGenericAdaptor(values, attrs, Properties{}, {}) {} ASinOpGenericAdaptor(RangeT values, const ASinOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ASinOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ASinOpAdaptor : public ASinOpGenericAdaptor<::mlir::ValueRange> { public: using ASinOpGenericAdaptor::ASinOpGenericAdaptor; ASinOpAdaptor(ASinOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ASinOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ASinOpAdaptor; template using GenericAdaptor = ASinOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.asin"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ASinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ASinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ASinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ASinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ASinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ASinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ASinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ASinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ASinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ASinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ASinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ASinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ASinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ASinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ASinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ASinOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 ASinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ASinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ASinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ASinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ASinOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::ASinOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ATan2Op declarations //===----------------------------------------------------------------------===// namespace detail { class ATan2OpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ATan2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.atan2", odsAttrs.getContext()); } ATan2OpGenericAdaptorBase(ATan2Op op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class ATan2OpGenericAdaptor : public detail::ATan2OpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ATan2OpGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: ATan2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ATan2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ATan2OpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ATan2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ATan2OpGenericAdaptor(values, attrs, Properties{}, {}) {} ATan2OpGenericAdaptor(RangeT values, const ATan2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ATan2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 ATan2OpAdaptor : public ATan2OpGenericAdaptor<::mlir::ValueRange> { public: using ATan2OpGenericAdaptor::ATan2OpGenericAdaptor; ATan2OpAdaptor(ATan2Op op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ATan2Op : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ATan2OpAdaptor; template using GenericAdaptor = ATan2OpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.atan2"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ATan2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ATan2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ATan2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ATan2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ATan2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ATan2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ATan2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ATan2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ATan2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ATan2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ATan2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ATan2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ATan2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ATan2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ATan2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ATan2Op create(::mlir::ImplicitLocOpBuilder &builder, ::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 ATan2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ATan2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ATan2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ATan2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ATan2Op) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::ATan2OpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ATanOp declarations //===----------------------------------------------------------------------===// namespace detail { class ATanOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ATanOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.atan", odsAttrs.getContext()); } ATanOpGenericAdaptorBase(ATanOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class ATanOpGenericAdaptor : public detail::ATanOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ATanOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: ATanOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ATanOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ATanOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ATanOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ATanOpGenericAdaptor(values, attrs, Properties{}, {}) {} ATanOpGenericAdaptor(RangeT values, const ATanOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ATanOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ATanOpAdaptor : public ATanOpGenericAdaptor<::mlir::ValueRange> { public: using ATanOpGenericAdaptor::ATanOpGenericAdaptor; ATanOpAdaptor(ATanOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ATanOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ATanOpAdaptor; template using GenericAdaptor = ATanOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.atan"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ATanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ATanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ATanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ATanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ATanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ATanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ATanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ATanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ATanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ATanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ATanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ATanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ATanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ATanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ATanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ATanOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 ATanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ATanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ATanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ATanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ATanOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::ATanOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::AbsOp declarations //===----------------------------------------------------------------------===// namespace detail { class AbsOpGenericAdaptorBase { public: struct Properties { using is_int_min_poisonTy = ::mlir::IntegerAttr; is_int_min_poisonTy is_int_min_poison; auto getIsIntMinPoison() const { auto &propStorage = this->is_int_min_poison; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setIsIntMinPoison(const ::mlir::IntegerAttr &propValue) { this->is_int_min_poison = propValue; } bool operator==(const Properties &rhs) const { return rhs.is_int_min_poison == this->is_int_min_poison && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: AbsOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.abs", odsAttrs.getContext()); } AbsOpGenericAdaptorBase(AbsOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getIsIntMinPoisonAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().is_int_min_poison); return attr; } bool getIsIntMinPoison(); }; } // namespace detail template class AbsOpGenericAdaptor : public detail::AbsOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::AbsOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: AbsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} AbsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : AbsOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} AbsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : AbsOpGenericAdaptor(values, attrs, Properties{}, {}) {} AbsOpGenericAdaptor(RangeT values, const AbsOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> AbsOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class AbsOpAdaptor : public AbsOpGenericAdaptor<::mlir::ValueRange> { public: using AbsOpGenericAdaptor::AbsOpGenericAdaptor; AbsOpAdaptor(AbsOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class AbsOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = AbsOpAdaptor; template using GenericAdaptor = AbsOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("is_int_min_poison")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getIsIntMinPoisonAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getIsIntMinPoisonAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.abs"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getIsIntMinPoisonAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().is_int_min_poison); } bool getIsIntMinPoison(); void setIsIntMinPoisonAttr(::mlir::IntegerAttr attr) { getProperties().is_int_min_poison = attr; } void setIsIntMinPoison(bool attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::IntegerAttr is_int_min_poison); static AbsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::IntegerAttr is_int_min_poison); static AbsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::IntegerAttr is_int_min_poison); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::IntegerAttr is_int_min_poison); static AbsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::IntegerAttr is_int_min_poison); static AbsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::IntegerAttr is_int_min_poison); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, bool is_int_min_poison); static AbsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, bool is_int_min_poison); static AbsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, bool is_int_min_poison); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, bool is_int_min_poison); static AbsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, bool is_int_min_poison); static AbsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, bool is_int_min_poison); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static AbsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static AbsOp 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 AbsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static AbsOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::AbsOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::AbsOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::Annotation declarations //===----------------------------------------------------------------------===// namespace detail { class AnnotationGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: AnnotationGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.annotation", odsAttrs.getContext()); } AnnotationGenericAdaptorBase(Annotation op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class AnnotationGenericAdaptor : public detail::AnnotationGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::AnnotationGenericAdaptorBase; static constexpr int odsIndex_integer = 0; static constexpr int odsIndex_annotation = 1; static constexpr int odsIndex_fileName = 2; static constexpr int odsIndex_line = 3; public: AnnotationGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} AnnotationGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : AnnotationGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} AnnotationGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : AnnotationGenericAdaptor(values, attrs, Properties{}, {}) {} AnnotationGenericAdaptor(RangeT values, const AnnotationGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> AnnotationGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getInteger() { return (*getODSOperands(0).begin()); } ValueT getAnnotation() { return (*getODSOperands(1).begin()); } ValueT getFileName() { return (*getODSOperands(2).begin()); } ValueT getLine() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class AnnotationAdaptor : public AnnotationGenericAdaptor<::mlir::ValueRange> { public: using AnnotationGenericAdaptor::AnnotationGenericAdaptor; AnnotationAdaptor(Annotation op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class Annotation : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = AnnotationAdaptor; template using GenericAdaptor = AnnotationGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_integer = 0; static constexpr int odsIndex_annotation = 1; static constexpr int odsIndex_fileName = 2; static constexpr int odsIndex_line = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.annotation"); } std::pair 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::IntegerType> getInteger() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getAnnotation() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getFileName() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getLine() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getIntegerMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getAnnotationMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getFileNameMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getLineMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::IntegerType> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*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 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 integer, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line); static Annotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value integer, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line); static Annotation create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value integer, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value integer, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line); static Annotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value integer, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line); static Annotation create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value integer, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value integer, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line); static Annotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value integer, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line); static Annotation create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value integer, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Annotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Annotation create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Annotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Annotation create(::mlir::ImplicitLocOpBuilder &builder, ::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 Annotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static Annotation create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static Annotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static Annotation create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::Annotation) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::AssumeOp declarations //===----------------------------------------------------------------------===// namespace detail { class AssumeOpGenericAdaptorBase { public: struct Properties { using op_bundle_sizesTy = ::mlir::DenseI32ArrayAttr; op_bundle_sizesTy op_bundle_sizes; auto getOpBundleSizes() const { auto &propStorage = this->op_bundle_sizes; return ::llvm::cast<::mlir::DenseI32ArrayAttr>(propStorage); } void setOpBundleSizes(const ::mlir::DenseI32ArrayAttr &propValue) { this->op_bundle_sizes = propValue; } using op_bundle_tagsTy = ::mlir::ArrayAttr; op_bundle_tagsTy op_bundle_tags; auto getOpBundleTags() const { auto &propStorage = this->op_bundle_tags; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setOpBundleTags(const ::mlir::ArrayAttr &propValue) { this->op_bundle_tags = propValue; } bool operator==(const Properties &rhs) const { return rhs.op_bundle_sizes == this->op_bundle_sizes && rhs.op_bundle_tags == this->op_bundle_tags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: AssumeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.assume", odsAttrs.getContext()); } AssumeOpGenericAdaptorBase(AssumeOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize); const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::DenseI32ArrayAttr getOpBundleSizesAttr() { auto attr = ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().op_bundle_sizes); return attr; } ::llvm::ArrayRef getOpBundleSizes(); ::mlir::ArrayAttr getOpBundleTagsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().op_bundle_tags); return attr; } ::std::optional< ::mlir::ArrayAttr > getOpBundleTags(); }; } // namespace detail template class AssumeOpGenericAdaptor : public detail::AssumeOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::AssumeOpGenericAdaptorBase; static constexpr int odsIndex_cond = 0; static constexpr int odsIndex_op_bundle_operands = 1; public: AssumeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} AssumeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : AssumeOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} AssumeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : AssumeOpGenericAdaptor(values, attrs, Properties{}, {}) {} AssumeOpGenericAdaptor(RangeT values, const AssumeOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> AssumeOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getCond() { return (*getODSOperands(0).begin()); } ::llvm::SmallVector getOpBundleOperands() { auto tblgenTmpOperands = getODSOperands(1); auto sizes = getOpBundleSizes(); ::llvm::SmallVector tblgenTmpOperandGroups; for (int i = 0, e = sizes.size(); i < e; ++i) { tblgenTmpOperandGroups.push_back(tblgenTmpOperands.take_front(sizes[i])); tblgenTmpOperands = tblgenTmpOperands.drop_front(sizes[i]); } return tblgenTmpOperandGroups; } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class AssumeOpAdaptor : public AssumeOpGenericAdaptor<::mlir::ValueRange> { public: using AssumeOpGenericAdaptor::AssumeOpGenericAdaptor; AssumeOpAdaptor(AssumeOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class AssumeOp : public ::mlir::Op::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = AssumeOpAdaptor; template using GenericAdaptor = AssumeOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_cond = 0; static constexpr int odsIndex_op_bundle_operands = 1; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("op_bundle_sizes"), ::llvm::StringRef("op_bundle_tags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getOpBundleSizesAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getOpBundleSizesAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getOpBundleTagsAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getOpBundleTagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.assume"); } std::pair getODSOperandIndexAndLength(unsigned index); ::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::IntegerType> getCond() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin()); } ::mlir::OperandRangeRange getOpBundleOperands() { return getODSOperands(1).split(getOpBundleSizesAttr()); } ::mlir::OpOperand &getCondMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::MutableOperandRangeRange getOpBundleOperandsMutable(); std::pair 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)}; } 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::DenseI32ArrayAttr getOpBundleSizesAttr() { return ::llvm::cast<::mlir::DenseI32ArrayAttr>(getProperties().op_bundle_sizes); } ::llvm::ArrayRef getOpBundleSizes(); ::mlir::ArrayAttr getOpBundleTagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().op_bundle_tags); } ::std::optional< ::mlir::ArrayAttr > getOpBundleTags(); void setOpBundleSizesAttr(::mlir::DenseI32ArrayAttr attr) { getProperties().op_bundle_sizes = attr; } void setOpBundleSizes(::llvm::ArrayRef attrValue); void setOpBundleTagsAttr(::mlir::ArrayAttr attr) { getProperties().op_bundle_tags = attr; } ::mlir::Attribute removeOpBundleTagsAttr() { auto attr = getProperties().op_bundle_tags; getProperties().op_bundle_tags = {}; return attr; } static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value cond); static AssumeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value cond); static AssumeOp create(::mlir::ImplicitLocOpBuilder &builder, Value cond); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value cond, llvm::StringRef tag, ValueRange args); static AssumeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value cond, llvm::StringRef tag, ValueRange args); static AssumeOp create(::mlir::ImplicitLocOpBuilder &builder, Value cond, llvm::StringRef tag, ValueRange args); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value cond, AssumeAlignTag tag, Value ptr, Value align); static AssumeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value cond, AssumeAlignTag tag, Value ptr, Value align); static AssumeOp create(::mlir::ImplicitLocOpBuilder &builder, Value cond, AssumeAlignTag tag, Value ptr, Value align); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value cond, AssumeSeparateStorageTag tag, Value ptr1, Value ptr2); static AssumeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value cond, AssumeSeparateStorageTag tag, Value ptr1, Value ptr2); static AssumeOp create(::mlir::ImplicitLocOpBuilder &builder, Value cond, AssumeSeparateStorageTag tag, Value ptr1, Value ptr2); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value cond, ::llvm::ArrayRef<::mlir::ValueRange> op_bundle_operands, /*optional*/::mlir::ArrayAttr op_bundle_tags); static AssumeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value cond, ::llvm::ArrayRef<::mlir::ValueRange> op_bundle_operands, /*optional*/::mlir::ArrayAttr op_bundle_tags); static AssumeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value cond, ::llvm::ArrayRef<::mlir::ValueRange> op_bundle_operands, /*optional*/::mlir::ArrayAttr op_bundle_tags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value cond, ::llvm::ArrayRef<::mlir::ValueRange> op_bundle_operands, /*optional*/::mlir::ArrayAttr op_bundle_tags); static AssumeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value cond, ::llvm::ArrayRef<::mlir::ValueRange> op_bundle_operands, /*optional*/::mlir::ArrayAttr op_bundle_tags); static AssumeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value cond, ::llvm::ArrayRef<::mlir::ValueRange> op_bundle_operands, /*optional*/::mlir::ArrayAttr op_bundle_tags); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static AssumeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static AssumeOp 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 AssumeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static AssumeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); ::llvm::LogicalResult verify(); static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result); void print(::mlir::OpAsmPrinter &_odsPrinter); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 2 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::AssumeOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::AssumeOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::BitReverseOp declarations //===----------------------------------------------------------------------===// namespace detail { class BitReverseOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: BitReverseOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.bitreverse", odsAttrs.getContext()); } BitReverseOpGenericAdaptorBase(BitReverseOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class BitReverseOpGenericAdaptor : public detail::BitReverseOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::BitReverseOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: BitReverseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} BitReverseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : BitReverseOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} BitReverseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : BitReverseOpGenericAdaptor(values, attrs, Properties{}, {}) {} BitReverseOpGenericAdaptor(RangeT values, const BitReverseOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> BitReverseOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class BitReverseOpAdaptor : public BitReverseOpGenericAdaptor<::mlir::ValueRange> { public: using BitReverseOpGenericAdaptor::BitReverseOpGenericAdaptor; BitReverseOpAdaptor(BitReverseOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class BitReverseOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = BitReverseOpAdaptor; template using GenericAdaptor = BitReverseOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.bitreverse"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 in); static BitReverseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in); static BitReverseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in); static BitReverseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in); static BitReverseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in); static BitReverseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in); static BitReverseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static BitReverseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static BitReverseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static BitReverseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static BitReverseOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 BitReverseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static BitReverseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static BitReverseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static BitReverseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::BitReverseOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ByteSwapOp declarations //===----------------------------------------------------------------------===// namespace detail { class ByteSwapOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ByteSwapOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.bswap", odsAttrs.getContext()); } ByteSwapOpGenericAdaptorBase(ByteSwapOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class ByteSwapOpGenericAdaptor : public detail::ByteSwapOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ByteSwapOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: ByteSwapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ByteSwapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ByteSwapOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ByteSwapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ByteSwapOpGenericAdaptor(values, attrs, Properties{}, {}) {} ByteSwapOpGenericAdaptor(RangeT values, const ByteSwapOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ByteSwapOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ByteSwapOpAdaptor : public ByteSwapOpGenericAdaptor<::mlir::ValueRange> { public: using ByteSwapOpGenericAdaptor::ByteSwapOpGenericAdaptor; ByteSwapOpAdaptor(ByteSwapOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ByteSwapOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ByteSwapOpAdaptor; template using GenericAdaptor = ByteSwapOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.bswap"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 in); static ByteSwapOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in); static ByteSwapOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in); static ByteSwapOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in); static ByteSwapOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in); static ByteSwapOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in); static ByteSwapOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ByteSwapOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ByteSwapOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ByteSwapOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ByteSwapOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 ByteSwapOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ByteSwapOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ByteSwapOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ByteSwapOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ByteSwapOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ConstrainedFAddIntr declarations //===----------------------------------------------------------------------===// namespace detail { class ConstrainedFAddIntrGenericAdaptorBase { public: struct Properties { using fpExceptionBehaviorTy = ::mlir::LLVM::FPExceptionBehaviorAttr; fpExceptionBehaviorTy fpExceptionBehavior; auto getFpExceptionBehavior() const { auto &propStorage = this->fpExceptionBehavior; return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(propStorage); } void setFpExceptionBehavior(const ::mlir::LLVM::FPExceptionBehaviorAttr &propValue) { this->fpExceptionBehavior = propValue; } using roundingmodeTy = ::mlir::LLVM::RoundingModeAttr; roundingmodeTy roundingmode; auto getRoundingmode() const { auto &propStorage = this->roundingmode; return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(propStorage); } void setRoundingmode(const ::mlir::LLVM::RoundingModeAttr &propValue) { this->roundingmode = propValue; } bool operator==(const Properties &rhs) const { return rhs.fpExceptionBehavior == this->fpExceptionBehavior && rhs.roundingmode == this->roundingmode && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ConstrainedFAddIntrGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.experimental.constrained.fadd", odsAttrs.getContext()); } ConstrainedFAddIntrGenericAdaptorBase(ConstrainedFAddIntr op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { auto attr = ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); return attr; } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { auto attr = ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); return attr; } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); }; } // namespace detail template class ConstrainedFAddIntrGenericAdaptor : public detail::ConstrainedFAddIntrGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ConstrainedFAddIntrGenericAdaptorBase; static constexpr int odsIndex_arg_0 = 0; static constexpr int odsIndex_arg_1 = 1; public: ConstrainedFAddIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ConstrainedFAddIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConstrainedFAddIntrGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ConstrainedFAddIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConstrainedFAddIntrGenericAdaptor(values, attrs, Properties{}, {}) {} ConstrainedFAddIntrGenericAdaptor(RangeT values, const ConstrainedFAddIntrGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ConstrainedFAddIntrGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getArg_0() { return (*getODSOperands(0).begin()); } ValueT getArg_1() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ConstrainedFAddIntrAdaptor : public ConstrainedFAddIntrGenericAdaptor<::mlir::ValueRange> { public: using ConstrainedFAddIntrGenericAdaptor::ConstrainedFAddIntrGenericAdaptor; ConstrainedFAddIntrAdaptor(ConstrainedFAddIntr op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ConstrainedFAddIntr : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait, ::mlir::LLVM::RoundingModeOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ConstrainedFAddIntrAdaptor; template using GenericAdaptor = ConstrainedFAddIntrGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_arg_0 = 0; static constexpr int odsIndex_arg_1 = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttr; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttrName; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttr; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fpExceptionBehavior"), ::llvm::StringRef("roundingmode")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFpExceptionBehaviorAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFpExceptionBehaviorAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getRoundingmodeAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getRoundingmodeAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.experimental.constrained.fadd"); } std::pair 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::Type> getArg_0() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getArg_1() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getArg_0Mutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getArg_1Mutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); void setRoundingmodeAttr(::mlir::LLVM::RoundingModeAttr attr) { getProperties().roundingmode = attr; } void setRoundingmode(::mlir::LLVM::RoundingMode attrValue); void setFpExceptionBehaviorAttr(::mlir::LLVM::FPExceptionBehaviorAttr attr) { getProperties().fpExceptionBehavior = attr; } void setFpExceptionBehavior(::mlir::LLVM::FPExceptionBehavior attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::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 ConstrainedFAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 2 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ConstrainedFAddIntr) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::ConstrainedFAddIntrGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ConstrainedFDivIntr declarations //===----------------------------------------------------------------------===// namespace detail { class ConstrainedFDivIntrGenericAdaptorBase { public: struct Properties { using fpExceptionBehaviorTy = ::mlir::LLVM::FPExceptionBehaviorAttr; fpExceptionBehaviorTy fpExceptionBehavior; auto getFpExceptionBehavior() const { auto &propStorage = this->fpExceptionBehavior; return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(propStorage); } void setFpExceptionBehavior(const ::mlir::LLVM::FPExceptionBehaviorAttr &propValue) { this->fpExceptionBehavior = propValue; } using roundingmodeTy = ::mlir::LLVM::RoundingModeAttr; roundingmodeTy roundingmode; auto getRoundingmode() const { auto &propStorage = this->roundingmode; return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(propStorage); } void setRoundingmode(const ::mlir::LLVM::RoundingModeAttr &propValue) { this->roundingmode = propValue; } bool operator==(const Properties &rhs) const { return rhs.fpExceptionBehavior == this->fpExceptionBehavior && rhs.roundingmode == this->roundingmode && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ConstrainedFDivIntrGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.experimental.constrained.fdiv", odsAttrs.getContext()); } ConstrainedFDivIntrGenericAdaptorBase(ConstrainedFDivIntr op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { auto attr = ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); return attr; } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { auto attr = ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); return attr; } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); }; } // namespace detail template class ConstrainedFDivIntrGenericAdaptor : public detail::ConstrainedFDivIntrGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ConstrainedFDivIntrGenericAdaptorBase; static constexpr int odsIndex_arg_0 = 0; static constexpr int odsIndex_arg_1 = 1; public: ConstrainedFDivIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ConstrainedFDivIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConstrainedFDivIntrGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ConstrainedFDivIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConstrainedFDivIntrGenericAdaptor(values, attrs, Properties{}, {}) {} ConstrainedFDivIntrGenericAdaptor(RangeT values, const ConstrainedFDivIntrGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ConstrainedFDivIntrGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getArg_0() { return (*getODSOperands(0).begin()); } ValueT getArg_1() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ConstrainedFDivIntrAdaptor : public ConstrainedFDivIntrGenericAdaptor<::mlir::ValueRange> { public: using ConstrainedFDivIntrGenericAdaptor::ConstrainedFDivIntrGenericAdaptor; ConstrainedFDivIntrAdaptor(ConstrainedFDivIntr op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ConstrainedFDivIntr : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait, ::mlir::LLVM::RoundingModeOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ConstrainedFDivIntrAdaptor; template using GenericAdaptor = ConstrainedFDivIntrGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_arg_0 = 0; static constexpr int odsIndex_arg_1 = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttr; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttrName; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttr; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fpExceptionBehavior"), ::llvm::StringRef("roundingmode")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFpExceptionBehaviorAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFpExceptionBehaviorAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getRoundingmodeAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getRoundingmodeAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.experimental.constrained.fdiv"); } std::pair 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::Type> getArg_0() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getArg_1() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getArg_0Mutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getArg_1Mutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); void setRoundingmodeAttr(::mlir::LLVM::RoundingModeAttr attr) { getProperties().roundingmode = attr; } void setRoundingmode(::mlir::LLVM::RoundingMode attrValue); void setFpExceptionBehaviorAttr(::mlir::LLVM::FPExceptionBehaviorAttr attr) { getProperties().fpExceptionBehavior = attr; } void setFpExceptionBehavior(::mlir::LLVM::FPExceptionBehavior attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFDivIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFDivIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFDivIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFDivIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFDivIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFDivIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFDivIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFDivIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFDivIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFDivIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFDivIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFDivIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFDivIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFDivIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFDivIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFDivIntr create(::mlir::ImplicitLocOpBuilder &builder, ::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 ConstrainedFDivIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFDivIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFDivIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFDivIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 2 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ConstrainedFDivIntr) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::ConstrainedFDivIntrGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ConstrainedFMAIntr declarations //===----------------------------------------------------------------------===// namespace detail { class ConstrainedFMAIntrGenericAdaptorBase { public: struct Properties { using fpExceptionBehaviorTy = ::mlir::LLVM::FPExceptionBehaviorAttr; fpExceptionBehaviorTy fpExceptionBehavior; auto getFpExceptionBehavior() const { auto &propStorage = this->fpExceptionBehavior; return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(propStorage); } void setFpExceptionBehavior(const ::mlir::LLVM::FPExceptionBehaviorAttr &propValue) { this->fpExceptionBehavior = propValue; } using roundingmodeTy = ::mlir::LLVM::RoundingModeAttr; roundingmodeTy roundingmode; auto getRoundingmode() const { auto &propStorage = this->roundingmode; return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(propStorage); } void setRoundingmode(const ::mlir::LLVM::RoundingModeAttr &propValue) { this->roundingmode = propValue; } bool operator==(const Properties &rhs) const { return rhs.fpExceptionBehavior == this->fpExceptionBehavior && rhs.roundingmode == this->roundingmode && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ConstrainedFMAIntrGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.experimental.constrained.fma", odsAttrs.getContext()); } ConstrainedFMAIntrGenericAdaptorBase(ConstrainedFMAIntr op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { auto attr = ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); return attr; } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { auto attr = ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); return attr; } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); }; } // namespace detail template class ConstrainedFMAIntrGenericAdaptor : public detail::ConstrainedFMAIntrGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ConstrainedFMAIntrGenericAdaptorBase; static constexpr int odsIndex_arg_0 = 0; static constexpr int odsIndex_arg_1 = 1; static constexpr int odsIndex_arg_2 = 2; public: ConstrainedFMAIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ConstrainedFMAIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConstrainedFMAIntrGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ConstrainedFMAIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConstrainedFMAIntrGenericAdaptor(values, attrs, Properties{}, {}) {} ConstrainedFMAIntrGenericAdaptor(RangeT values, const ConstrainedFMAIntrGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ConstrainedFMAIntrGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getArg_0() { return (*getODSOperands(0).begin()); } ValueT getArg_1() { return (*getODSOperands(1).begin()); } ValueT getArg_2() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ConstrainedFMAIntrAdaptor : public ConstrainedFMAIntrGenericAdaptor<::mlir::ValueRange> { public: using ConstrainedFMAIntrGenericAdaptor::ConstrainedFMAIntrGenericAdaptor; ConstrainedFMAIntrAdaptor(ConstrainedFMAIntr op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ConstrainedFMAIntr : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait, ::mlir::LLVM::RoundingModeOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ConstrainedFMAIntrAdaptor; template using GenericAdaptor = ConstrainedFMAIntrGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_arg_0 = 0; static constexpr int odsIndex_arg_1 = 1; static constexpr int odsIndex_arg_2 = 2; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttr; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttrName; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttr; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fpExceptionBehavior"), ::llvm::StringRef("roundingmode")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFpExceptionBehaviorAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFpExceptionBehaviorAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getRoundingmodeAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getRoundingmodeAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.experimental.constrained.fma"); } std::pair 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::Type> getArg_0() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getArg_1() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::Type> getArg_2() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getArg_0Mutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getArg_1Mutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getArg_2Mutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); void setRoundingmodeAttr(::mlir::LLVM::RoundingModeAttr attr) { getProperties().roundingmode = attr; } void setRoundingmode(::mlir::LLVM::RoundingMode attrValue); void setFpExceptionBehaviorAttr(::mlir::LLVM::FPExceptionBehaviorAttr attr) { getProperties().fpExceptionBehavior = attr; } void setFpExceptionBehavior(::mlir::LLVM::FPExceptionBehavior attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMAIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMAIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMAIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMAIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMAIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMAIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMAIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMAIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMAIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMAIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMAIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMAIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFMAIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFMAIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFMAIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFMAIntr create(::mlir::ImplicitLocOpBuilder &builder, ::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 ConstrainedFMAIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFMAIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFMAIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFMAIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 2 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ConstrainedFMAIntr) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::ConstrainedFMAIntrGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ConstrainedFMulAddIntr declarations //===----------------------------------------------------------------------===// namespace detail { class ConstrainedFMulAddIntrGenericAdaptorBase { public: struct Properties { using fpExceptionBehaviorTy = ::mlir::LLVM::FPExceptionBehaviorAttr; fpExceptionBehaviorTy fpExceptionBehavior; auto getFpExceptionBehavior() const { auto &propStorage = this->fpExceptionBehavior; return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(propStorage); } void setFpExceptionBehavior(const ::mlir::LLVM::FPExceptionBehaviorAttr &propValue) { this->fpExceptionBehavior = propValue; } using roundingmodeTy = ::mlir::LLVM::RoundingModeAttr; roundingmodeTy roundingmode; auto getRoundingmode() const { auto &propStorage = this->roundingmode; return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(propStorage); } void setRoundingmode(const ::mlir::LLVM::RoundingModeAttr &propValue) { this->roundingmode = propValue; } bool operator==(const Properties &rhs) const { return rhs.fpExceptionBehavior == this->fpExceptionBehavior && rhs.roundingmode == this->roundingmode && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ConstrainedFMulAddIntrGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.experimental.constrained.fmuladd", odsAttrs.getContext()); } ConstrainedFMulAddIntrGenericAdaptorBase(ConstrainedFMulAddIntr op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { auto attr = ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); return attr; } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { auto attr = ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); return attr; } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); }; } // namespace detail template class ConstrainedFMulAddIntrGenericAdaptor : public detail::ConstrainedFMulAddIntrGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ConstrainedFMulAddIntrGenericAdaptorBase; static constexpr int odsIndex_arg_0 = 0; static constexpr int odsIndex_arg_1 = 1; static constexpr int odsIndex_arg_2 = 2; public: ConstrainedFMulAddIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ConstrainedFMulAddIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConstrainedFMulAddIntrGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ConstrainedFMulAddIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConstrainedFMulAddIntrGenericAdaptor(values, attrs, Properties{}, {}) {} ConstrainedFMulAddIntrGenericAdaptor(RangeT values, const ConstrainedFMulAddIntrGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ConstrainedFMulAddIntrGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getArg_0() { return (*getODSOperands(0).begin()); } ValueT getArg_1() { return (*getODSOperands(1).begin()); } ValueT getArg_2() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ConstrainedFMulAddIntrAdaptor : public ConstrainedFMulAddIntrGenericAdaptor<::mlir::ValueRange> { public: using ConstrainedFMulAddIntrGenericAdaptor::ConstrainedFMulAddIntrGenericAdaptor; ConstrainedFMulAddIntrAdaptor(ConstrainedFMulAddIntr op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ConstrainedFMulAddIntr : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait, ::mlir::LLVM::RoundingModeOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ConstrainedFMulAddIntrAdaptor; template using GenericAdaptor = ConstrainedFMulAddIntrGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_arg_0 = 0; static constexpr int odsIndex_arg_1 = 1; static constexpr int odsIndex_arg_2 = 2; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttr; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttrName; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttr; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fpExceptionBehavior"), ::llvm::StringRef("roundingmode")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFpExceptionBehaviorAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFpExceptionBehaviorAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getRoundingmodeAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getRoundingmodeAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.experimental.constrained.fmuladd"); } std::pair 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::Type> getArg_0() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getArg_1() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::Type> getArg_2() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getArg_0Mutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getArg_1Mutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getArg_2Mutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); void setRoundingmodeAttr(::mlir::LLVM::RoundingModeAttr attr) { getProperties().roundingmode = attr; } void setRoundingmode(::mlir::LLVM::RoundingMode attrValue); void setFpExceptionBehaviorAttr(::mlir::LLVM::FPExceptionBehaviorAttr attr) { getProperties().fpExceptionBehavior = attr; } void setFpExceptionBehavior(::mlir::LLVM::FPExceptionBehavior attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMulAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMulAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMulAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMulAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMulAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMulAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMulAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMulAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMulAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMulAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMulAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMulAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::Value arg_2, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFMulAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFMulAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFMulAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFMulAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::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 ConstrainedFMulAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFMulAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFMulAddIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFMulAddIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 2 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ConstrainedFMulAddIntr) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::ConstrainedFMulAddIntrGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ConstrainedFMulIntr declarations //===----------------------------------------------------------------------===// namespace detail { class ConstrainedFMulIntrGenericAdaptorBase { public: struct Properties { using fpExceptionBehaviorTy = ::mlir::LLVM::FPExceptionBehaviorAttr; fpExceptionBehaviorTy fpExceptionBehavior; auto getFpExceptionBehavior() const { auto &propStorage = this->fpExceptionBehavior; return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(propStorage); } void setFpExceptionBehavior(const ::mlir::LLVM::FPExceptionBehaviorAttr &propValue) { this->fpExceptionBehavior = propValue; } using roundingmodeTy = ::mlir::LLVM::RoundingModeAttr; roundingmodeTy roundingmode; auto getRoundingmode() const { auto &propStorage = this->roundingmode; return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(propStorage); } void setRoundingmode(const ::mlir::LLVM::RoundingModeAttr &propValue) { this->roundingmode = propValue; } bool operator==(const Properties &rhs) const { return rhs.fpExceptionBehavior == this->fpExceptionBehavior && rhs.roundingmode == this->roundingmode && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ConstrainedFMulIntrGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.experimental.constrained.fmul", odsAttrs.getContext()); } ConstrainedFMulIntrGenericAdaptorBase(ConstrainedFMulIntr op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { auto attr = ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); return attr; } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { auto attr = ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); return attr; } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); }; } // namespace detail template class ConstrainedFMulIntrGenericAdaptor : public detail::ConstrainedFMulIntrGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ConstrainedFMulIntrGenericAdaptorBase; static constexpr int odsIndex_arg_0 = 0; static constexpr int odsIndex_arg_1 = 1; public: ConstrainedFMulIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ConstrainedFMulIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConstrainedFMulIntrGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ConstrainedFMulIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConstrainedFMulIntrGenericAdaptor(values, attrs, Properties{}, {}) {} ConstrainedFMulIntrGenericAdaptor(RangeT values, const ConstrainedFMulIntrGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ConstrainedFMulIntrGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getArg_0() { return (*getODSOperands(0).begin()); } ValueT getArg_1() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ConstrainedFMulIntrAdaptor : public ConstrainedFMulIntrGenericAdaptor<::mlir::ValueRange> { public: using ConstrainedFMulIntrGenericAdaptor::ConstrainedFMulIntrGenericAdaptor; ConstrainedFMulIntrAdaptor(ConstrainedFMulIntr op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ConstrainedFMulIntr : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait, ::mlir::LLVM::RoundingModeOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ConstrainedFMulIntrAdaptor; template using GenericAdaptor = ConstrainedFMulIntrGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_arg_0 = 0; static constexpr int odsIndex_arg_1 = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttr; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttrName; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttr; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fpExceptionBehavior"), ::llvm::StringRef("roundingmode")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFpExceptionBehaviorAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFpExceptionBehaviorAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getRoundingmodeAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getRoundingmodeAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.experimental.constrained.fmul"); } std::pair 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::Type> getArg_0() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getArg_1() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getArg_0Mutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getArg_1Mutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); void setRoundingmodeAttr(::mlir::LLVM::RoundingModeAttr attr) { getProperties().roundingmode = attr; } void setRoundingmode(::mlir::LLVM::RoundingMode attrValue); void setFpExceptionBehaviorAttr(::mlir::LLVM::FPExceptionBehaviorAttr attr) { getProperties().fpExceptionBehavior = attr; } void setFpExceptionBehavior(::mlir::LLVM::FPExceptionBehavior attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMulIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMulIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMulIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMulIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMulIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFMulIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMulIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMulIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMulIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMulIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMulIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFMulIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFMulIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFMulIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFMulIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFMulIntr create(::mlir::ImplicitLocOpBuilder &builder, ::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 ConstrainedFMulIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFMulIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFMulIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFMulIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 2 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ConstrainedFMulIntr) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::ConstrainedFMulIntrGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ConstrainedFPExtIntr declarations //===----------------------------------------------------------------------===// namespace detail { class ConstrainedFPExtIntrGenericAdaptorBase { public: struct Properties { using fpExceptionBehaviorTy = ::mlir::LLVM::FPExceptionBehaviorAttr; fpExceptionBehaviorTy fpExceptionBehavior; auto getFpExceptionBehavior() const { auto &propStorage = this->fpExceptionBehavior; return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(propStorage); } void setFpExceptionBehavior(const ::mlir::LLVM::FPExceptionBehaviorAttr &propValue) { this->fpExceptionBehavior = propValue; } bool operator==(const Properties &rhs) const { return rhs.fpExceptionBehavior == this->fpExceptionBehavior && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ConstrainedFPExtIntrGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.experimental.constrained.fpext", odsAttrs.getContext()); } ConstrainedFPExtIntrGenericAdaptorBase(ConstrainedFPExtIntr op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { auto attr = ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); return attr; } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); }; } // namespace detail template class ConstrainedFPExtIntrGenericAdaptor : public detail::ConstrainedFPExtIntrGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ConstrainedFPExtIntrGenericAdaptorBase; static constexpr int odsIndex_arg_0 = 0; public: ConstrainedFPExtIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ConstrainedFPExtIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConstrainedFPExtIntrGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ConstrainedFPExtIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConstrainedFPExtIntrGenericAdaptor(values, attrs, Properties{}, {}) {} ConstrainedFPExtIntrGenericAdaptor(RangeT values, const ConstrainedFPExtIntrGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ConstrainedFPExtIntrGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getArg_0() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ConstrainedFPExtIntrAdaptor : public ConstrainedFPExtIntrGenericAdaptor<::mlir::ValueRange> { public: using ConstrainedFPExtIntrGenericAdaptor::ConstrainedFPExtIntrGenericAdaptor; ConstrainedFPExtIntrAdaptor(ConstrainedFPExtIntr op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ConstrainedFPExtIntr : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ConstrainedFPExtIntrAdaptor; template using GenericAdaptor = ConstrainedFPExtIntrGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_arg_0 = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttr; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fpExceptionBehavior")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFpExceptionBehaviorAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFpExceptionBehaviorAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.experimental.constrained.fpext"); } std::pair 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::Type> getArg_0() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getArg_0Mutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); void setFpExceptionBehaviorAttr(::mlir::LLVM::FPExceptionBehaviorAttr attr) { getProperties().fpExceptionBehavior = attr; } void setFpExceptionBehavior(::mlir::LLVM::FPExceptionBehavior attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFPExtIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFPExtIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFPExtIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFPExtIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFPExtIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFPExtIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFPExtIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFPExtIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFPExtIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFPExtIntr 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 ConstrainedFPExtIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFPExtIntr 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ConstrainedFPExtIntr) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::ConstrainedFPExtIntrGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ConstrainedFPTruncIntr declarations //===----------------------------------------------------------------------===// namespace detail { class ConstrainedFPTruncIntrGenericAdaptorBase { public: struct Properties { using fpExceptionBehaviorTy = ::mlir::LLVM::FPExceptionBehaviorAttr; fpExceptionBehaviorTy fpExceptionBehavior; auto getFpExceptionBehavior() const { auto &propStorage = this->fpExceptionBehavior; return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(propStorage); } void setFpExceptionBehavior(const ::mlir::LLVM::FPExceptionBehaviorAttr &propValue) { this->fpExceptionBehavior = propValue; } using roundingmodeTy = ::mlir::LLVM::RoundingModeAttr; roundingmodeTy roundingmode; auto getRoundingmode() const { auto &propStorage = this->roundingmode; return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(propStorage); } void setRoundingmode(const ::mlir::LLVM::RoundingModeAttr &propValue) { this->roundingmode = propValue; } bool operator==(const Properties &rhs) const { return rhs.fpExceptionBehavior == this->fpExceptionBehavior && rhs.roundingmode == this->roundingmode && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ConstrainedFPTruncIntrGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.experimental.constrained.fptrunc", odsAttrs.getContext()); } ConstrainedFPTruncIntrGenericAdaptorBase(ConstrainedFPTruncIntr op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { auto attr = ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); return attr; } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { auto attr = ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); return attr; } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); }; } // namespace detail template class ConstrainedFPTruncIntrGenericAdaptor : public detail::ConstrainedFPTruncIntrGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ConstrainedFPTruncIntrGenericAdaptorBase; static constexpr int odsIndex_arg_0 = 0; public: ConstrainedFPTruncIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ConstrainedFPTruncIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConstrainedFPTruncIntrGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ConstrainedFPTruncIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConstrainedFPTruncIntrGenericAdaptor(values, attrs, Properties{}, {}) {} ConstrainedFPTruncIntrGenericAdaptor(RangeT values, const ConstrainedFPTruncIntrGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ConstrainedFPTruncIntrGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getArg_0() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ConstrainedFPTruncIntrAdaptor : public ConstrainedFPTruncIntrGenericAdaptor<::mlir::ValueRange> { public: using ConstrainedFPTruncIntrGenericAdaptor::ConstrainedFPTruncIntrGenericAdaptor; ConstrainedFPTruncIntrAdaptor(ConstrainedFPTruncIntr op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ConstrainedFPTruncIntr : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait, ::mlir::LLVM::RoundingModeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ConstrainedFPTruncIntrAdaptor; template using GenericAdaptor = ConstrainedFPTruncIntrGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_arg_0 = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttr; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttrName; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttr; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fpExceptionBehavior"), ::llvm::StringRef("roundingmode")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFpExceptionBehaviorAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFpExceptionBehaviorAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getRoundingmodeAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getRoundingmodeAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.experimental.constrained.fptrunc"); } std::pair 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::Type> getArg_0() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getArg_0Mutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); void setRoundingmodeAttr(::mlir::LLVM::RoundingModeAttr attr) { getProperties().roundingmode = attr; } void setRoundingmode(::mlir::LLVM::RoundingMode attrValue); void setFpExceptionBehaviorAttr(::mlir::LLVM::FPExceptionBehaviorAttr attr) { getProperties().fpExceptionBehavior = attr; } void setFpExceptionBehavior(::mlir::LLVM::FPExceptionBehavior attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFPTruncIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFPTruncIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFPTruncIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFPTruncIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFPTruncIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFPTruncIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFPTruncIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFPTruncIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFPTruncIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFPTruncIntr 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 ConstrainedFPTruncIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFPTruncIntr 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 2 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ConstrainedFPTruncIntr) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::ConstrainedFPTruncIntrGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ConstrainedFRemIntr declarations //===----------------------------------------------------------------------===// namespace detail { class ConstrainedFRemIntrGenericAdaptorBase { public: struct Properties { using fpExceptionBehaviorTy = ::mlir::LLVM::FPExceptionBehaviorAttr; fpExceptionBehaviorTy fpExceptionBehavior; auto getFpExceptionBehavior() const { auto &propStorage = this->fpExceptionBehavior; return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(propStorage); } void setFpExceptionBehavior(const ::mlir::LLVM::FPExceptionBehaviorAttr &propValue) { this->fpExceptionBehavior = propValue; } using roundingmodeTy = ::mlir::LLVM::RoundingModeAttr; roundingmodeTy roundingmode; auto getRoundingmode() const { auto &propStorage = this->roundingmode; return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(propStorage); } void setRoundingmode(const ::mlir::LLVM::RoundingModeAttr &propValue) { this->roundingmode = propValue; } bool operator==(const Properties &rhs) const { return rhs.fpExceptionBehavior == this->fpExceptionBehavior && rhs.roundingmode == this->roundingmode && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ConstrainedFRemIntrGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.experimental.constrained.frem", odsAttrs.getContext()); } ConstrainedFRemIntrGenericAdaptorBase(ConstrainedFRemIntr op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { auto attr = ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); return attr; } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { auto attr = ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); return attr; } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); }; } // namespace detail template class ConstrainedFRemIntrGenericAdaptor : public detail::ConstrainedFRemIntrGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ConstrainedFRemIntrGenericAdaptorBase; static constexpr int odsIndex_arg_0 = 0; static constexpr int odsIndex_arg_1 = 1; public: ConstrainedFRemIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ConstrainedFRemIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConstrainedFRemIntrGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ConstrainedFRemIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConstrainedFRemIntrGenericAdaptor(values, attrs, Properties{}, {}) {} ConstrainedFRemIntrGenericAdaptor(RangeT values, const ConstrainedFRemIntrGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ConstrainedFRemIntrGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getArg_0() { return (*getODSOperands(0).begin()); } ValueT getArg_1() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ConstrainedFRemIntrAdaptor : public ConstrainedFRemIntrGenericAdaptor<::mlir::ValueRange> { public: using ConstrainedFRemIntrGenericAdaptor::ConstrainedFRemIntrGenericAdaptor; ConstrainedFRemIntrAdaptor(ConstrainedFRemIntr op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ConstrainedFRemIntr : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait, ::mlir::LLVM::RoundingModeOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ConstrainedFRemIntrAdaptor; template using GenericAdaptor = ConstrainedFRemIntrGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_arg_0 = 0; static constexpr int odsIndex_arg_1 = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttr; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttrName; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttr; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fpExceptionBehavior"), ::llvm::StringRef("roundingmode")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFpExceptionBehaviorAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFpExceptionBehaviorAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getRoundingmodeAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getRoundingmodeAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.experimental.constrained.frem"); } std::pair 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::Type> getArg_0() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getArg_1() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getArg_0Mutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getArg_1Mutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); void setRoundingmodeAttr(::mlir::LLVM::RoundingModeAttr attr) { getProperties().roundingmode = attr; } void setRoundingmode(::mlir::LLVM::RoundingMode attrValue); void setFpExceptionBehaviorAttr(::mlir::LLVM::FPExceptionBehaviorAttr attr) { getProperties().fpExceptionBehavior = attr; } void setFpExceptionBehavior(::mlir::LLVM::FPExceptionBehavior attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFRemIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFRemIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFRemIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFRemIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFRemIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFRemIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFRemIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFRemIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFRemIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFRemIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFRemIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFRemIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFRemIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFRemIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFRemIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFRemIntr create(::mlir::ImplicitLocOpBuilder &builder, ::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 ConstrainedFRemIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFRemIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFRemIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFRemIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 2 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ConstrainedFRemIntr) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::ConstrainedFRemIntrGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ConstrainedFSubIntr declarations //===----------------------------------------------------------------------===// namespace detail { class ConstrainedFSubIntrGenericAdaptorBase { public: struct Properties { using fpExceptionBehaviorTy = ::mlir::LLVM::FPExceptionBehaviorAttr; fpExceptionBehaviorTy fpExceptionBehavior; auto getFpExceptionBehavior() const { auto &propStorage = this->fpExceptionBehavior; return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(propStorage); } void setFpExceptionBehavior(const ::mlir::LLVM::FPExceptionBehaviorAttr &propValue) { this->fpExceptionBehavior = propValue; } using roundingmodeTy = ::mlir::LLVM::RoundingModeAttr; roundingmodeTy roundingmode; auto getRoundingmode() const { auto &propStorage = this->roundingmode; return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(propStorage); } void setRoundingmode(const ::mlir::LLVM::RoundingModeAttr &propValue) { this->roundingmode = propValue; } bool operator==(const Properties &rhs) const { return rhs.fpExceptionBehavior == this->fpExceptionBehavior && rhs.roundingmode == this->roundingmode && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ConstrainedFSubIntrGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.experimental.constrained.fsub", odsAttrs.getContext()); } ConstrainedFSubIntrGenericAdaptorBase(ConstrainedFSubIntr op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { auto attr = ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); return attr; } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { auto attr = ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); return attr; } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); }; } // namespace detail template class ConstrainedFSubIntrGenericAdaptor : public detail::ConstrainedFSubIntrGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ConstrainedFSubIntrGenericAdaptorBase; static constexpr int odsIndex_arg_0 = 0; static constexpr int odsIndex_arg_1 = 1; public: ConstrainedFSubIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ConstrainedFSubIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConstrainedFSubIntrGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ConstrainedFSubIntrGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConstrainedFSubIntrGenericAdaptor(values, attrs, Properties{}, {}) {} ConstrainedFSubIntrGenericAdaptor(RangeT values, const ConstrainedFSubIntrGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ConstrainedFSubIntrGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getArg_0() { return (*getODSOperands(0).begin()); } ValueT getArg_1() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ConstrainedFSubIntrAdaptor : public ConstrainedFSubIntrGenericAdaptor<::mlir::ValueRange> { public: using ConstrainedFSubIntrGenericAdaptor::ConstrainedFSubIntrGenericAdaptor; ConstrainedFSubIntrAdaptor(ConstrainedFSubIntr op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ConstrainedFSubIntr : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait, ::mlir::LLVM::RoundingModeOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ConstrainedFSubIntrAdaptor; template using GenericAdaptor = ConstrainedFSubIntrGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_arg_0 = 0; static constexpr int odsIndex_arg_1 = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttr; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttrName; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttr; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fpExceptionBehavior"), ::llvm::StringRef("roundingmode")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFpExceptionBehaviorAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFpExceptionBehaviorAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getRoundingmodeAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getRoundingmodeAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.experimental.constrained.fsub"); } std::pair 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::Type> getArg_0() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getArg_1() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getArg_0Mutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getArg_1Mutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); void setRoundingmodeAttr(::mlir::LLVM::RoundingModeAttr attr) { getProperties().roundingmode = attr; } void setRoundingmode(::mlir::LLVM::RoundingMode attrValue); void setFpExceptionBehaviorAttr(::mlir::LLVM::FPExceptionBehaviorAttr attr) { getProperties().fpExceptionBehavior = attr; } void setFpExceptionBehavior(::mlir::LLVM::FPExceptionBehavior attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFSubIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFSubIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFSubIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFSubIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFSubIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedFSubIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFSubIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFSubIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFSubIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFSubIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFSubIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedFSubIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::Value arg_1, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFSubIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFSubIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFSubIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedFSubIntr create(::mlir::ImplicitLocOpBuilder &builder, ::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 ConstrainedFSubIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFSubIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFSubIntr create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedFSubIntr create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 2 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ConstrainedFSubIntr) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::ConstrainedFSubIntrGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ConstrainedSIToFP declarations //===----------------------------------------------------------------------===// namespace detail { class ConstrainedSIToFPGenericAdaptorBase { public: struct Properties { using fpExceptionBehaviorTy = ::mlir::LLVM::FPExceptionBehaviorAttr; fpExceptionBehaviorTy fpExceptionBehavior; auto getFpExceptionBehavior() const { auto &propStorage = this->fpExceptionBehavior; return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(propStorage); } void setFpExceptionBehavior(const ::mlir::LLVM::FPExceptionBehaviorAttr &propValue) { this->fpExceptionBehavior = propValue; } using roundingmodeTy = ::mlir::LLVM::RoundingModeAttr; roundingmodeTy roundingmode; auto getRoundingmode() const { auto &propStorage = this->roundingmode; return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(propStorage); } void setRoundingmode(const ::mlir::LLVM::RoundingModeAttr &propValue) { this->roundingmode = propValue; } bool operator==(const Properties &rhs) const { return rhs.fpExceptionBehavior == this->fpExceptionBehavior && rhs.roundingmode == this->roundingmode && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ConstrainedSIToFPGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.experimental.constrained.sitofp", odsAttrs.getContext()); } ConstrainedSIToFPGenericAdaptorBase(ConstrainedSIToFP op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { auto attr = ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); return attr; } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { auto attr = ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); return attr; } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); }; } // namespace detail template class ConstrainedSIToFPGenericAdaptor : public detail::ConstrainedSIToFPGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ConstrainedSIToFPGenericAdaptorBase; static constexpr int odsIndex_arg_0 = 0; public: ConstrainedSIToFPGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ConstrainedSIToFPGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConstrainedSIToFPGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ConstrainedSIToFPGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConstrainedSIToFPGenericAdaptor(values, attrs, Properties{}, {}) {} ConstrainedSIToFPGenericAdaptor(RangeT values, const ConstrainedSIToFPGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ConstrainedSIToFPGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getArg_0() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ConstrainedSIToFPAdaptor : public ConstrainedSIToFPGenericAdaptor<::mlir::ValueRange> { public: using ConstrainedSIToFPGenericAdaptor::ConstrainedSIToFPGenericAdaptor; ConstrainedSIToFPAdaptor(ConstrainedSIToFP op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ConstrainedSIToFP : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait, ::mlir::LLVM::RoundingModeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ConstrainedSIToFPAdaptor; template using GenericAdaptor = ConstrainedSIToFPGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_arg_0 = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttr; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttrName; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttr; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fpExceptionBehavior"), ::llvm::StringRef("roundingmode")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFpExceptionBehaviorAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFpExceptionBehaviorAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getRoundingmodeAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getRoundingmodeAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.experimental.constrained.sitofp"); } std::pair 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::Type> getArg_0() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getArg_0Mutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); void setRoundingmodeAttr(::mlir::LLVM::RoundingModeAttr attr) { getProperties().roundingmode = attr; } void setRoundingmode(::mlir::LLVM::RoundingMode attrValue); void setFpExceptionBehaviorAttr(::mlir::LLVM::FPExceptionBehaviorAttr attr) { getProperties().fpExceptionBehavior = attr; } void setFpExceptionBehavior(::mlir::LLVM::FPExceptionBehavior attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedSIToFP create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedSIToFP create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedSIToFP create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedSIToFP create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedSIToFP create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedSIToFP create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedSIToFP create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedSIToFP create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedSIToFP create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedSIToFP 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 ConstrainedSIToFP create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedSIToFP 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 2 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ConstrainedSIToFP) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::ConstrainedSIToFPGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ConstrainedUIToFP declarations //===----------------------------------------------------------------------===// namespace detail { class ConstrainedUIToFPGenericAdaptorBase { public: struct Properties { using fpExceptionBehaviorTy = ::mlir::LLVM::FPExceptionBehaviorAttr; fpExceptionBehaviorTy fpExceptionBehavior; auto getFpExceptionBehavior() const { auto &propStorage = this->fpExceptionBehavior; return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(propStorage); } void setFpExceptionBehavior(const ::mlir::LLVM::FPExceptionBehaviorAttr &propValue) { this->fpExceptionBehavior = propValue; } using roundingmodeTy = ::mlir::LLVM::RoundingModeAttr; roundingmodeTy roundingmode; auto getRoundingmode() const { auto &propStorage = this->roundingmode; return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(propStorage); } void setRoundingmode(const ::mlir::LLVM::RoundingModeAttr &propValue) { this->roundingmode = propValue; } bool operator==(const Properties &rhs) const { return rhs.fpExceptionBehavior == this->fpExceptionBehavior && rhs.roundingmode == this->roundingmode && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ConstrainedUIToFPGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.experimental.constrained.uitofp", odsAttrs.getContext()); } ConstrainedUIToFPGenericAdaptorBase(ConstrainedUIToFP op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { auto attr = ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); return attr; } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { auto attr = ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); return attr; } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); }; } // namespace detail template class ConstrainedUIToFPGenericAdaptor : public detail::ConstrainedUIToFPGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ConstrainedUIToFPGenericAdaptorBase; static constexpr int odsIndex_arg_0 = 0; public: ConstrainedUIToFPGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ConstrainedUIToFPGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ConstrainedUIToFPGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ConstrainedUIToFPGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ConstrainedUIToFPGenericAdaptor(values, attrs, Properties{}, {}) {} ConstrainedUIToFPGenericAdaptor(RangeT values, const ConstrainedUIToFPGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ConstrainedUIToFPGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getArg_0() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ConstrainedUIToFPAdaptor : public ConstrainedUIToFPGenericAdaptor<::mlir::ValueRange> { public: using ConstrainedUIToFPGenericAdaptor::ConstrainedUIToFPGenericAdaptor; ConstrainedUIToFPAdaptor(ConstrainedUIToFP op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ConstrainedUIToFP : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait, ::mlir::LLVM::RoundingModeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ConstrainedUIToFPAdaptor; template using GenericAdaptor = ConstrainedUIToFPGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_arg_0 = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttr; using ::mlir::LLVM::FPExceptionBehaviorOpInterface::Trait::getFPExceptionBehaviorAttrName; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttr; using ::mlir::LLVM::RoundingModeOpInterface::Trait::getRoundingModeAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fpExceptionBehavior"), ::llvm::StringRef("roundingmode")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFpExceptionBehaviorAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFpExceptionBehaviorAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getRoundingmodeAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getRoundingmodeAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.experimental.constrained.uitofp"); } std::pair 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::Type> getArg_0() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getArg_0Mutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::RoundingModeAttr getRoundingmodeAttr() { return ::llvm::cast<::mlir::LLVM::RoundingModeAttr>(getProperties().roundingmode); } ::mlir::LLVM::RoundingMode getRoundingmode(); ::mlir::LLVM::FPExceptionBehaviorAttr getFpExceptionBehaviorAttr() { return ::llvm::cast<::mlir::LLVM::FPExceptionBehaviorAttr>(getProperties().fpExceptionBehavior); } ::mlir::LLVM::FPExceptionBehavior getFpExceptionBehavior(); void setRoundingmodeAttr(::mlir::LLVM::RoundingModeAttr attr) { getProperties().roundingmode = attr; } void setRoundingmode(::mlir::LLVM::RoundingMode attrValue); void setFpExceptionBehaviorAttr(::mlir::LLVM::FPExceptionBehaviorAttr attr) { getProperties().fpExceptionBehavior = attr; } void setFpExceptionBehavior(::mlir::LLVM::FPExceptionBehavior attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedUIToFP create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedUIToFP create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedUIToFP create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static ConstrainedUIToFP create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingModeAttr roundingmode, ::mlir::LLVM::FPExceptionBehaviorAttr fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedUIToFP create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedUIToFP create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedUIToFP create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static ConstrainedUIToFP create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_0, ::mlir::LLVM::RoundingMode roundingmode, ::mlir::LLVM::FPExceptionBehavior fpExceptionBehavior); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedUIToFP create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ConstrainedUIToFP 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 ConstrainedUIToFP create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ConstrainedUIToFP 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 2 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ConstrainedUIToFP) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::ConstrainedUIToFPGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::CopySignOp declarations //===----------------------------------------------------------------------===// namespace detail { class CopySignOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: CopySignOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.copysign", odsAttrs.getContext()); } CopySignOpGenericAdaptorBase(CopySignOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class CopySignOpGenericAdaptor : public detail::CopySignOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::CopySignOpGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: CopySignOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} CopySignOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CopySignOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} CopySignOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CopySignOpGenericAdaptor(values, attrs, Properties{}, {}) {} CopySignOpGenericAdaptor(RangeT values, const CopySignOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> CopySignOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 CopySignOpAdaptor : public CopySignOpGenericAdaptor<::mlir::ValueRange> { public: using CopySignOpGenericAdaptor::CopySignOpGenericAdaptor; CopySignOpAdaptor(CopySignOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class CopySignOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = CopySignOpAdaptor; template using GenericAdaptor = CopySignOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.copysign"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CopySignOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CopySignOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CopySignOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CopySignOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CopySignOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CopySignOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CopySignOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CopySignOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CopySignOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CopySignOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CopySignOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CopySignOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CopySignOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CopySignOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CopySignOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CopySignOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 CopySignOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CopySignOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CopySignOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CopySignOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::CopySignOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::CopySignOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::CoroAlignOp declarations //===----------------------------------------------------------------------===// namespace detail { class CoroAlignOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: CoroAlignOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.coro.align", odsAttrs.getContext()); } CoroAlignOpGenericAdaptorBase(CoroAlignOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class CoroAlignOpGenericAdaptor : public detail::CoroAlignOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::CoroAlignOpGenericAdaptorBase; public: CoroAlignOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} CoroAlignOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CoroAlignOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} CoroAlignOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CoroAlignOpGenericAdaptor(values, attrs, Properties{}, {}) {} CoroAlignOpGenericAdaptor(RangeT values, const CoroAlignOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> CoroAlignOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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)}; } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class CoroAlignOpAdaptor : public CoroAlignOpGenericAdaptor<::mlir::ValueRange> { public: using CoroAlignOpGenericAdaptor::CoroAlignOpGenericAdaptor; CoroAlignOpAdaptor(CoroAlignOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class CoroAlignOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants> { public: using Op::Op; using Op::print; using Adaptor = CoroAlignOpAdaptor; template using GenericAdaptor = CoroAlignOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.coro.align"); } std::pair 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)}; } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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); static CoroAlignOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res); static CoroAlignOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes); static CoroAlignOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes); static CoroAlignOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroAlignOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroAlignOp 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 CoroAlignOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CoroAlignOp 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::CoroAlignOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::CoroBeginOp declarations //===----------------------------------------------------------------------===// namespace detail { class CoroBeginOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: CoroBeginOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.coro.begin", odsAttrs.getContext()); } CoroBeginOpGenericAdaptorBase(CoroBeginOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class CoroBeginOpGenericAdaptor : public detail::CoroBeginOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::CoroBeginOpGenericAdaptorBase; static constexpr int odsIndex_token = 0; static constexpr int odsIndex_mem = 1; public: CoroBeginOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} CoroBeginOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CoroBeginOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} CoroBeginOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CoroBeginOpGenericAdaptor(values, attrs, Properties{}, {}) {} CoroBeginOpGenericAdaptor(RangeT values, const CoroBeginOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> CoroBeginOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getToken() { return (*getODSOperands(0).begin()); } ValueT getMem() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class CoroBeginOpAdaptor : public CoroBeginOpGenericAdaptor<::mlir::ValueRange> { public: using CoroBeginOpGenericAdaptor::CoroBeginOpGenericAdaptor; CoroBeginOpAdaptor(CoroBeginOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class CoroBeginOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::TokenConsumerTrait> { public: using Op::Op; using Op::print; using Adaptor = CoroBeginOpAdaptor; template using GenericAdaptor = CoroBeginOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_token = 0; static constexpr int odsIndex_mem = 1; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.coro.begin"); } std::pair 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::TokenType> getToken() { return ::llvm::cast<::mlir::TypedValue<::mlir::TokenType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getMem() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getTokenMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMemMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 token, ::mlir::Value mem); static CoroBeginOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value token, ::mlir::Value mem); static CoroBeginOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value token, ::mlir::Value mem); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value token, ::mlir::Value mem); static CoroBeginOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value token, ::mlir::Value mem); static CoroBeginOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value token, ::mlir::Value mem); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroBeginOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroBeginOp 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 CoroBeginOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CoroBeginOp 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::CoroBeginOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::CoroEndOp declarations //===----------------------------------------------------------------------===// namespace detail { class CoroEndOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: CoroEndOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.coro.end", odsAttrs.getContext()); } CoroEndOpGenericAdaptorBase(CoroEndOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class CoroEndOpGenericAdaptor : public detail::CoroEndOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::CoroEndOpGenericAdaptorBase; static constexpr int odsIndex_handle = 0; static constexpr int odsIndex_unwind = 1; static constexpr int odsIndex_retvals = 2; public: CoroEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} CoroEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CoroEndOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} CoroEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CoroEndOpGenericAdaptor(values, attrs, Properties{}, {}) {} CoroEndOpGenericAdaptor(RangeT values, const CoroEndOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> CoroEndOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getHandle() { return (*getODSOperands(0).begin()); } ValueT getUnwind() { return (*getODSOperands(1).begin()); } ValueT getRetvals() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class CoroEndOpAdaptor : public CoroEndOpGenericAdaptor<::mlir::ValueRange> { public: using CoroEndOpGenericAdaptor::CoroEndOpGenericAdaptor; CoroEndOpAdaptor(CoroEndOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class CoroEndOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::TokenConsumerTrait> { public: using Op::Op; using Op::print; using Adaptor = CoroEndOpAdaptor; template using GenericAdaptor = CoroEndOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_handle = 0; static constexpr int odsIndex_unwind = 1; static constexpr int odsIndex_retvals = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.coro.end"); } std::pair 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::LLVM::LLVMPointerType> getHandle() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getUnwind() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::TokenType> getRetvals() { return ::llvm::cast<::mlir::TypedValue<::mlir::TokenType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getHandleMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getUnwindMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRetvalsMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 handle, ::mlir::Value unwind, ::mlir::Value retvals); static CoroEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value handle, ::mlir::Value unwind, ::mlir::Value retvals); static CoroEndOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value handle, ::mlir::Value unwind, ::mlir::Value retvals); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value handle, ::mlir::Value unwind, ::mlir::Value retvals); static CoroEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value handle, ::mlir::Value unwind, ::mlir::Value retvals); static CoroEndOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value handle, ::mlir::Value unwind, ::mlir::Value retvals); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroEndOp 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 CoroEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CoroEndOp 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::CoroEndOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::CoroFreeOp declarations //===----------------------------------------------------------------------===// namespace detail { class CoroFreeOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: CoroFreeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.coro.free", odsAttrs.getContext()); } CoroFreeOpGenericAdaptorBase(CoroFreeOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class CoroFreeOpGenericAdaptor : public detail::CoroFreeOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::CoroFreeOpGenericAdaptorBase; static constexpr int odsIndex_id = 0; static constexpr int odsIndex_handle = 1; public: CoroFreeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} CoroFreeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CoroFreeOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} CoroFreeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CoroFreeOpGenericAdaptor(values, attrs, Properties{}, {}) {} CoroFreeOpGenericAdaptor(RangeT values, const CoroFreeOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> CoroFreeOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getId() { return (*getODSOperands(0).begin()); } ValueT getHandle() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class CoroFreeOpAdaptor : public CoroFreeOpGenericAdaptor<::mlir::ValueRange> { public: using CoroFreeOpGenericAdaptor::CoroFreeOpGenericAdaptor; CoroFreeOpAdaptor(CoroFreeOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class CoroFreeOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::TokenConsumerTrait> { public: using Op::Op; using Op::print; using Adaptor = CoroFreeOpAdaptor; template using GenericAdaptor = CoroFreeOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_id = 0; static constexpr int odsIndex_handle = 1; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.coro.free"); } std::pair 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::TokenType> getId() { return ::llvm::cast<::mlir::TypedValue<::mlir::TokenType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getHandle() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getIdMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getHandleMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 id, ::mlir::Value handle); static CoroFreeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value id, ::mlir::Value handle); static CoroFreeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value id, ::mlir::Value handle); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value id, ::mlir::Value handle); static CoroFreeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value id, ::mlir::Value handle); static CoroFreeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value id, ::mlir::Value handle); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroFreeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroFreeOp 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 CoroFreeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CoroFreeOp 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::CoroFreeOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::CoroIdOp declarations //===----------------------------------------------------------------------===// namespace detail { class CoroIdOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: CoroIdOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.coro.id", odsAttrs.getContext()); } CoroIdOpGenericAdaptorBase(CoroIdOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class CoroIdOpGenericAdaptor : public detail::CoroIdOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::CoroIdOpGenericAdaptorBase; static constexpr int odsIndex_align = 0; static constexpr int odsIndex_promise = 1; static constexpr int odsIndex_coroaddr = 2; static constexpr int odsIndex_fnaddrs = 3; public: CoroIdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} CoroIdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CoroIdOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} CoroIdOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CoroIdOpGenericAdaptor(values, attrs, Properties{}, {}) {} CoroIdOpGenericAdaptor(RangeT values, const CoroIdOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> CoroIdOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getAlign() { return (*getODSOperands(0).begin()); } ValueT getPromise() { return (*getODSOperands(1).begin()); } ValueT getCoroaddr() { return (*getODSOperands(2).begin()); } ValueT getFnaddrs() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class CoroIdOpAdaptor : public CoroIdOpGenericAdaptor<::mlir::ValueRange> { public: using CoroIdOpGenericAdaptor::CoroIdOpGenericAdaptor; CoroIdOpAdaptor(CoroIdOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class CoroIdOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::TokenProducerTrait> { public: using Op::Op; using Op::print; using Adaptor = CoroIdOpAdaptor; template using GenericAdaptor = CoroIdOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_align = 0; static constexpr int odsIndex_promise = 1; static constexpr int odsIndex_coroaddr = 2; static constexpr int odsIndex_fnaddrs = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.coro.id"); } std::pair 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::IntegerType> getAlign() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getPromise() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getCoroaddr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getFnaddrs() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getAlignMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getPromiseMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getCoroaddrMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getFnaddrsMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 align, ::mlir::Value promise, ::mlir::Value coroaddr, ::mlir::Value fnaddrs); static CoroIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value align, ::mlir::Value promise, ::mlir::Value coroaddr, ::mlir::Value fnaddrs); static CoroIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value align, ::mlir::Value promise, ::mlir::Value coroaddr, ::mlir::Value fnaddrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value align, ::mlir::Value promise, ::mlir::Value coroaddr, ::mlir::Value fnaddrs); static CoroIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value align, ::mlir::Value promise, ::mlir::Value coroaddr, ::mlir::Value fnaddrs); static CoroIdOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value align, ::mlir::Value promise, ::mlir::Value coroaddr, ::mlir::Value fnaddrs); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroIdOp 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 CoroIdOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CoroIdOp 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::CoroIdOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::CoroPromiseOp declarations //===----------------------------------------------------------------------===// namespace detail { class CoroPromiseOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: CoroPromiseOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.coro.promise", odsAttrs.getContext()); } CoroPromiseOpGenericAdaptorBase(CoroPromiseOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class CoroPromiseOpGenericAdaptor : public detail::CoroPromiseOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::CoroPromiseOpGenericAdaptorBase; static constexpr int odsIndex_handle = 0; static constexpr int odsIndex_align = 1; static constexpr int odsIndex_from = 2; public: CoroPromiseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} CoroPromiseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CoroPromiseOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} CoroPromiseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CoroPromiseOpGenericAdaptor(values, attrs, Properties{}, {}) {} CoroPromiseOpGenericAdaptor(RangeT values, const CoroPromiseOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> CoroPromiseOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getHandle() { return (*getODSOperands(0).begin()); } ValueT getAlign() { return (*getODSOperands(1).begin()); } ValueT getFrom() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class CoroPromiseOpAdaptor : public CoroPromiseOpGenericAdaptor<::mlir::ValueRange> { public: using CoroPromiseOpGenericAdaptor::CoroPromiseOpGenericAdaptor; CoroPromiseOpAdaptor(CoroPromiseOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class CoroPromiseOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants> { public: using Op::Op; using Op::print; using Adaptor = CoroPromiseOpAdaptor; template using GenericAdaptor = CoroPromiseOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_handle = 0; static constexpr int odsIndex_align = 1; static constexpr int odsIndex_from = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.coro.promise"); } std::pair 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::LLVM::LLVMPointerType> getHandle() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getAlign() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getFrom() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getHandleMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getAlignMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getFromMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::LLVM::LLVMPointerType> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*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 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 handle, ::mlir::Value align, ::mlir::Value from); static CoroPromiseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value handle, ::mlir::Value align, ::mlir::Value from); static CoroPromiseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value handle, ::mlir::Value align, ::mlir::Value from); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value handle, ::mlir::Value align, ::mlir::Value from); static CoroPromiseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value handle, ::mlir::Value align, ::mlir::Value from); static CoroPromiseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value handle, ::mlir::Value align, ::mlir::Value from); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroPromiseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroPromiseOp 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 CoroPromiseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CoroPromiseOp 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::CoroPromiseOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::CoroResumeOp declarations //===----------------------------------------------------------------------===// namespace detail { class CoroResumeOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: CoroResumeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.coro.resume", odsAttrs.getContext()); } CoroResumeOpGenericAdaptorBase(CoroResumeOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class CoroResumeOpGenericAdaptor : public detail::CoroResumeOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::CoroResumeOpGenericAdaptorBase; static constexpr int odsIndex_handle = 0; public: CoroResumeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} CoroResumeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CoroResumeOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} CoroResumeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CoroResumeOpGenericAdaptor(values, attrs, Properties{}, {}) {} CoroResumeOpGenericAdaptor(RangeT values, const CoroResumeOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> CoroResumeOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getHandle() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class CoroResumeOpAdaptor : public CoroResumeOpGenericAdaptor<::mlir::ValueRange> { public: using CoroResumeOpGenericAdaptor::CoroResumeOpGenericAdaptor; CoroResumeOpAdaptor(CoroResumeOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class CoroResumeOp : public ::mlir::Op { public: using Op::Op; using Op::print; using Adaptor = CoroResumeOpAdaptor; template using GenericAdaptor = CoroResumeOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_handle = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.coro.resume"); } std::pair 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::LLVM::LLVMPointerType> getHandle() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getHandleMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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::Value handle); static CoroResumeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value handle); static CoroResumeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value handle); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value handle); static CoroResumeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value handle); static CoroResumeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value handle); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroResumeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroResumeOp 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 CoroResumeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CoroResumeOp 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::CoroResumeOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::CoroSaveOp declarations //===----------------------------------------------------------------------===// namespace detail { class CoroSaveOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: CoroSaveOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.coro.save", odsAttrs.getContext()); } CoroSaveOpGenericAdaptorBase(CoroSaveOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class CoroSaveOpGenericAdaptor : public detail::CoroSaveOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::CoroSaveOpGenericAdaptorBase; static constexpr int odsIndex_handle = 0; public: CoroSaveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} CoroSaveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CoroSaveOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} CoroSaveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CoroSaveOpGenericAdaptor(values, attrs, Properties{}, {}) {} CoroSaveOpGenericAdaptor(RangeT values, const CoroSaveOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> CoroSaveOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getHandle() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class CoroSaveOpAdaptor : public CoroSaveOpGenericAdaptor<::mlir::ValueRange> { public: using CoroSaveOpGenericAdaptor::CoroSaveOpGenericAdaptor; CoroSaveOpAdaptor(CoroSaveOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class CoroSaveOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::TokenProducerTrait> { public: using Op::Op; using Op::print; using Adaptor = CoroSaveOpAdaptor; template using GenericAdaptor = CoroSaveOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_handle = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.coro.save"); } std::pair 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::LLVM::LLVMPointerType> getHandle() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getHandleMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 handle); static CoroSaveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value handle); static CoroSaveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value handle); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value handle); static CoroSaveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value handle); static CoroSaveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value handle); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroSaveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroSaveOp 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 CoroSaveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CoroSaveOp 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::CoroSaveOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::CoroSizeOp declarations //===----------------------------------------------------------------------===// namespace detail { class CoroSizeOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: CoroSizeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.coro.size", odsAttrs.getContext()); } CoroSizeOpGenericAdaptorBase(CoroSizeOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class CoroSizeOpGenericAdaptor : public detail::CoroSizeOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::CoroSizeOpGenericAdaptorBase; public: CoroSizeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} CoroSizeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CoroSizeOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} CoroSizeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CoroSizeOpGenericAdaptor(values, attrs, Properties{}, {}) {} CoroSizeOpGenericAdaptor(RangeT values, const CoroSizeOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> CoroSizeOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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)}; } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class CoroSizeOpAdaptor : public CoroSizeOpGenericAdaptor<::mlir::ValueRange> { public: using CoroSizeOpGenericAdaptor::CoroSizeOpGenericAdaptor; CoroSizeOpAdaptor(CoroSizeOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class CoroSizeOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants> { public: using Op::Op; using Op::print; using Adaptor = CoroSizeOpAdaptor; template using GenericAdaptor = CoroSizeOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.coro.size"); } std::pair 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)}; } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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); static CoroSizeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res); static CoroSizeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes); static CoroSizeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes); static CoroSizeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroSizeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroSizeOp 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 CoroSizeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CoroSizeOp 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::CoroSizeOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::CoroSuspendOp declarations //===----------------------------------------------------------------------===// namespace detail { class CoroSuspendOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: CoroSuspendOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.coro.suspend", odsAttrs.getContext()); } CoroSuspendOpGenericAdaptorBase(CoroSuspendOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class CoroSuspendOpGenericAdaptor : public detail::CoroSuspendOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::CoroSuspendOpGenericAdaptorBase; static constexpr int odsIndex_save = 0; static constexpr int odsIndex_final = 1; public: CoroSuspendOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} CoroSuspendOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CoroSuspendOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} CoroSuspendOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CoroSuspendOpGenericAdaptor(values, attrs, Properties{}, {}) {} CoroSuspendOpGenericAdaptor(RangeT values, const CoroSuspendOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> CoroSuspendOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSave() { return (*getODSOperands(0).begin()); } ValueT getFinal() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class CoroSuspendOpAdaptor : public CoroSuspendOpGenericAdaptor<::mlir::ValueRange> { public: using CoroSuspendOpGenericAdaptor::CoroSuspendOpGenericAdaptor; CoroSuspendOpAdaptor(CoroSuspendOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class CoroSuspendOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::OpTrait::TokenConsumerTrait> { public: using Op::Op; using Op::print; using Adaptor = CoroSuspendOpAdaptor; template using GenericAdaptor = CoroSuspendOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_save = 0; static constexpr int odsIndex_final = 1; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.coro.suspend"); } std::pair 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::TokenType> getSave() { return ::llvm::cast<::mlir::TypedValue<::mlir::TokenType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getFinal() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getSaveMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getFinalMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 save, ::mlir::Value final); static CoroSuspendOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value save, ::mlir::Value final); static CoroSuspendOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value save, ::mlir::Value final); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value save, ::mlir::Value final); static CoroSuspendOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value save, ::mlir::Value final); static CoroSuspendOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value save, ::mlir::Value final); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroSuspendOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoroSuspendOp 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 CoroSuspendOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CoroSuspendOp 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::CoroSuspendOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::CosOp declarations //===----------------------------------------------------------------------===// namespace detail { class CosOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: CosOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.cos", odsAttrs.getContext()); } CosOpGenericAdaptorBase(CosOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class CosOpGenericAdaptor : public detail::CosOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::CosOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: CosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} CosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CosOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} CosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CosOpGenericAdaptor(values, attrs, Properties{}, {}) {} CosOpGenericAdaptor(RangeT values, const CosOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> CosOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class CosOpAdaptor : public CosOpGenericAdaptor<::mlir::ValueRange> { public: using CosOpGenericAdaptor::CosOpGenericAdaptor; CosOpAdaptor(CosOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class CosOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = CosOpAdaptor; template using GenericAdaptor = CosOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.cos"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::CosOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::CosOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::CoshOp declarations //===----------------------------------------------------------------------===// namespace detail { class CoshOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: CoshOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.cosh", odsAttrs.getContext()); } CoshOpGenericAdaptorBase(CoshOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class CoshOpGenericAdaptor : public detail::CoshOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::CoshOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: CoshOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} CoshOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CoshOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} CoshOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CoshOpGenericAdaptor(values, attrs, Properties{}, {}) {} CoshOpGenericAdaptor(RangeT values, const CoshOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> CoshOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class CoshOpAdaptor : public CoshOpGenericAdaptor<::mlir::ValueRange> { public: using CoshOpGenericAdaptor::CoshOpGenericAdaptor; CoshOpAdaptor(CoshOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class CoshOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = CoshOpAdaptor; template using GenericAdaptor = CoshOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.cosh"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CoshOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CoshOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CoshOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CoshOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CoshOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static CoshOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CoshOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CoshOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CoshOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CoshOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CoshOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static CoshOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoshOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoshOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoshOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CoshOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 CoshOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CoshOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CoshOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CoshOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::CoshOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::CoshOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::CountLeadingZerosOp declarations //===----------------------------------------------------------------------===// namespace detail { class CountLeadingZerosOpGenericAdaptorBase { public: struct Properties { using is_zero_poisonTy = ::mlir::IntegerAttr; is_zero_poisonTy is_zero_poison; auto getIsZeroPoison() const { auto &propStorage = this->is_zero_poison; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setIsZeroPoison(const ::mlir::IntegerAttr &propValue) { this->is_zero_poison = propValue; } bool operator==(const Properties &rhs) const { return rhs.is_zero_poison == this->is_zero_poison && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: CountLeadingZerosOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.ctlz", odsAttrs.getContext()); } CountLeadingZerosOpGenericAdaptorBase(CountLeadingZerosOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getIsZeroPoisonAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().is_zero_poison); return attr; } bool getIsZeroPoison(); }; } // namespace detail template class CountLeadingZerosOpGenericAdaptor : public detail::CountLeadingZerosOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::CountLeadingZerosOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: CountLeadingZerosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} CountLeadingZerosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CountLeadingZerosOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} CountLeadingZerosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CountLeadingZerosOpGenericAdaptor(values, attrs, Properties{}, {}) {} CountLeadingZerosOpGenericAdaptor(RangeT values, const CountLeadingZerosOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> CountLeadingZerosOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class CountLeadingZerosOpAdaptor : public CountLeadingZerosOpGenericAdaptor<::mlir::ValueRange> { public: using CountLeadingZerosOpGenericAdaptor::CountLeadingZerosOpGenericAdaptor; CountLeadingZerosOpAdaptor(CountLeadingZerosOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class CountLeadingZerosOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = CountLeadingZerosOpAdaptor; template using GenericAdaptor = CountLeadingZerosOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("is_zero_poison")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getIsZeroPoisonAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getIsZeroPoisonAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.ctlz"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getIsZeroPoisonAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().is_zero_poison); } bool getIsZeroPoison(); void setIsZeroPoisonAttr(::mlir::IntegerAttr attr) { getProperties().is_zero_poison = attr; } void setIsZeroPoison(bool attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static CountLeadingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static CountLeadingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static CountLeadingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static CountLeadingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static CountLeadingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static CountLeadingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, bool is_zero_poison); static CountLeadingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, bool is_zero_poison); static CountLeadingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, bool is_zero_poison); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, bool is_zero_poison); static CountLeadingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, bool is_zero_poison); static CountLeadingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, bool is_zero_poison); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, bool is_zero_poison); static CountLeadingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, bool is_zero_poison); static CountLeadingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, bool is_zero_poison); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CountLeadingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CountLeadingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CountLeadingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CountLeadingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 CountLeadingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CountLeadingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CountLeadingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CountLeadingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::CountLeadingZerosOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::CountLeadingZerosOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::CountTrailingZerosOp declarations //===----------------------------------------------------------------------===// namespace detail { class CountTrailingZerosOpGenericAdaptorBase { public: struct Properties { using is_zero_poisonTy = ::mlir::IntegerAttr; is_zero_poisonTy is_zero_poison; auto getIsZeroPoison() const { auto &propStorage = this->is_zero_poison; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setIsZeroPoison(const ::mlir::IntegerAttr &propValue) { this->is_zero_poison = propValue; } bool operator==(const Properties &rhs) const { return rhs.is_zero_poison == this->is_zero_poison && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: CountTrailingZerosOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.cttz", odsAttrs.getContext()); } CountTrailingZerosOpGenericAdaptorBase(CountTrailingZerosOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getIsZeroPoisonAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().is_zero_poison); return attr; } bool getIsZeroPoison(); }; } // namespace detail template class CountTrailingZerosOpGenericAdaptor : public detail::CountTrailingZerosOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::CountTrailingZerosOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: CountTrailingZerosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} CountTrailingZerosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CountTrailingZerosOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} CountTrailingZerosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CountTrailingZerosOpGenericAdaptor(values, attrs, Properties{}, {}) {} CountTrailingZerosOpGenericAdaptor(RangeT values, const CountTrailingZerosOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> CountTrailingZerosOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class CountTrailingZerosOpAdaptor : public CountTrailingZerosOpGenericAdaptor<::mlir::ValueRange> { public: using CountTrailingZerosOpGenericAdaptor::CountTrailingZerosOpGenericAdaptor; CountTrailingZerosOpAdaptor(CountTrailingZerosOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class CountTrailingZerosOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = CountTrailingZerosOpAdaptor; template using GenericAdaptor = CountTrailingZerosOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("is_zero_poison")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getIsZeroPoisonAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getIsZeroPoisonAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.cttz"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getIsZeroPoisonAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().is_zero_poison); } bool getIsZeroPoison(); void setIsZeroPoisonAttr(::mlir::IntegerAttr attr) { getProperties().is_zero_poison = attr; } void setIsZeroPoison(bool attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static CountTrailingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static CountTrailingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static CountTrailingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static CountTrailingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static CountTrailingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static CountTrailingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::IntegerAttr is_zero_poison); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, bool is_zero_poison); static CountTrailingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, bool is_zero_poison); static CountTrailingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, bool is_zero_poison); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, bool is_zero_poison); static CountTrailingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, bool is_zero_poison); static CountTrailingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, bool is_zero_poison); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, bool is_zero_poison); static CountTrailingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, bool is_zero_poison); static CountTrailingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, bool is_zero_poison); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CountTrailingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CountTrailingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CountTrailingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CountTrailingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 CountTrailingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CountTrailingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CountTrailingZerosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CountTrailingZerosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::CountTrailingZerosOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::CountTrailingZerosOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::CtPopOp declarations //===----------------------------------------------------------------------===// namespace detail { class CtPopOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: CtPopOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.ctpop", odsAttrs.getContext()); } CtPopOpGenericAdaptorBase(CtPopOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class CtPopOpGenericAdaptor : public detail::CtPopOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::CtPopOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: CtPopOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} CtPopOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : CtPopOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} CtPopOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : CtPopOpGenericAdaptor(values, attrs, Properties{}, {}) {} CtPopOpGenericAdaptor(RangeT values, const CtPopOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> CtPopOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class CtPopOpAdaptor : public CtPopOpGenericAdaptor<::mlir::ValueRange> { public: using CtPopOpGenericAdaptor::CtPopOpGenericAdaptor; CtPopOpAdaptor(CtPopOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class CtPopOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = CtPopOpAdaptor; template using GenericAdaptor = CtPopOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.ctpop"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 in); static CtPopOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in); static CtPopOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in); static CtPopOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in); static CtPopOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in); static CtPopOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in); static CtPopOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CtPopOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CtPopOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CtPopOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static CtPopOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 CtPopOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CtPopOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CtPopOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static CtPopOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::CtPopOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::DbgDeclareOp declarations //===----------------------------------------------------------------------===// namespace detail { class DbgDeclareOpGenericAdaptorBase { public: struct Properties { using locationExprTy = ::mlir::LLVM::DIExpressionAttr; locationExprTy locationExpr; auto getLocationExpr() const { auto &propStorage = this->locationExpr; return ::llvm::dyn_cast_or_null<::mlir::LLVM::DIExpressionAttr>(propStorage); } void setLocationExpr(const ::mlir::LLVM::DIExpressionAttr &propValue) { this->locationExpr = propValue; } using varInfoTy = ::mlir::LLVM::DILocalVariableAttr; varInfoTy varInfo; auto getVarInfo() const { auto &propStorage = this->varInfo; return ::llvm::cast<::mlir::LLVM::DILocalVariableAttr>(propStorage); } void setVarInfo(const ::mlir::LLVM::DILocalVariableAttr &propValue) { this->varInfo = propValue; } bool operator==(const Properties &rhs) const { return rhs.locationExpr == this->locationExpr && rhs.varInfo == this->varInfo && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: DbgDeclareOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.dbg.declare", odsAttrs.getContext()); } DbgDeclareOpGenericAdaptorBase(DbgDeclareOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::DILocalVariableAttr getVarInfoAttr() { auto attr = ::llvm::cast<::mlir::LLVM::DILocalVariableAttr>(getProperties().varInfo); return attr; } ::mlir::LLVM::DILocalVariableAttr getVarInfo(); ::mlir::LLVM::DIExpressionAttr getLocationExprAttr(); ::mlir::LLVM::DIExpressionAttr getLocationExpr(); }; } // namespace detail template class DbgDeclareOpGenericAdaptor : public detail::DbgDeclareOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::DbgDeclareOpGenericAdaptorBase; static constexpr int odsIndex_addr = 0; public: DbgDeclareOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} DbgDeclareOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : DbgDeclareOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} DbgDeclareOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : DbgDeclareOpGenericAdaptor(values, attrs, Properties{}, {}) {} DbgDeclareOpGenericAdaptor(RangeT values, const DbgDeclareOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> DbgDeclareOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getAddr() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class DbgDeclareOpAdaptor : public DbgDeclareOpGenericAdaptor<::mlir::ValueRange> { public: using DbgDeclareOpGenericAdaptor::DbgDeclareOpGenericAdaptor; DbgDeclareOpAdaptor(DbgDeclareOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class DbgDeclareOp : public ::mlir::Op { public: using Op::Op; using Op::print; using Adaptor = DbgDeclareOpAdaptor; template using GenericAdaptor = DbgDeclareOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_addr = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("locationExpr"), ::llvm::StringRef("varInfo")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getLocationExprAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getLocationExprAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getVarInfoAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getVarInfoAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.dbg.declare"); } std::pair 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::LLVM::LLVMPointerType> getAddr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getAddrMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::DILocalVariableAttr getVarInfoAttr() { return ::llvm::cast<::mlir::LLVM::DILocalVariableAttr>(getProperties().varInfo); } ::mlir::LLVM::DILocalVariableAttr getVarInfo(); ::mlir::LLVM::DIExpressionAttr getLocationExprAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::DIExpressionAttr>(getProperties().locationExpr); } ::mlir::LLVM::DIExpressionAttr getLocationExpr(); void setVarInfoAttr(::mlir::LLVM::DILocalVariableAttr attr) { getProperties().varInfo = attr; } void setLocationExprAttr(::mlir::LLVM::DIExpressionAttr attr) { getProperties().locationExpr = attr; } static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::LLVM::DILocalVariableAttr varInfo, ::mlir::LLVM::DIExpressionAttr locationExpr = nullptr); static DbgDeclareOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::LLVM::DILocalVariableAttr varInfo, ::mlir::LLVM::DIExpressionAttr locationExpr = nullptr); static DbgDeclareOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::LLVM::DILocalVariableAttr varInfo, ::mlir::LLVM::DIExpressionAttr locationExpr = nullptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::LLVM::DILocalVariableAttr varInfo, ::mlir::LLVM::DIExpressionAttr locationExpr = nullptr); static DbgDeclareOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::LLVM::DILocalVariableAttr varInfo, ::mlir::LLVM::DIExpressionAttr locationExpr = nullptr); static DbgDeclareOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::LLVM::DILocalVariableAttr varInfo, ::mlir::LLVM::DIExpressionAttr locationExpr = nullptr); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static DbgDeclareOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static DbgDeclareOp 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 DbgDeclareOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static DbgDeclareOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); bool canUsesBeRemoved(const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout); ::mlir::DeletionKind removeBlockingUses(const ::llvm::SmallPtrSetImpl &blockingUses, ::mlir::OpBuilder &builder); bool requiresReplacedValues(); void visitReplacedValues(::llvm::ArrayRef> mutatedDefs, ::mlir::OpBuilder &builder); static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result); void print(::mlir::OpAsmPrinter &_odsPrinter); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 2 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::DbgDeclareOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::DbgDeclareOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::DbgLabelOp declarations //===----------------------------------------------------------------------===// namespace detail { class DbgLabelOpGenericAdaptorBase { public: struct Properties { using labelTy = ::mlir::LLVM::DILabelAttr; labelTy label; auto getLabel() const { auto &propStorage = this->label; return ::llvm::cast<::mlir::LLVM::DILabelAttr>(propStorage); } void setLabel(const ::mlir::LLVM::DILabelAttr &propValue) { this->label = propValue; } bool operator==(const Properties &rhs) const { return rhs.label == this->label && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: DbgLabelOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.dbg.label", odsAttrs.getContext()); } DbgLabelOpGenericAdaptorBase(DbgLabelOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::DILabelAttr getLabelAttr() { auto attr = ::llvm::cast<::mlir::LLVM::DILabelAttr>(getProperties().label); return attr; } ::mlir::LLVM::DILabelAttr getLabel(); }; } // namespace detail template class DbgLabelOpGenericAdaptor : public detail::DbgLabelOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::DbgLabelOpGenericAdaptorBase; public: DbgLabelOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} DbgLabelOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : DbgLabelOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} DbgLabelOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : DbgLabelOpGenericAdaptor(values, attrs, Properties{}, {}) {} DbgLabelOpGenericAdaptor(RangeT values, const DbgLabelOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> DbgLabelOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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)}; } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class DbgLabelOpAdaptor : public DbgLabelOpGenericAdaptor<::mlir::ValueRange> { public: using DbgLabelOpGenericAdaptor::DbgLabelOpGenericAdaptor; DbgLabelOpAdaptor(DbgLabelOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class DbgLabelOp : public ::mlir::Op { public: using Op::Op; using Op::print; using Adaptor = DbgLabelOpAdaptor; template using GenericAdaptor = DbgLabelOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("label")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getLabelAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getLabelAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.dbg.label"); } std::pair 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)}; } std::pair 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)}; } 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::DILabelAttr getLabelAttr() { return ::llvm::cast<::mlir::LLVM::DILabelAttr>(getProperties().label); } ::mlir::LLVM::DILabelAttr getLabel(); void setLabelAttr(::mlir::LLVM::DILabelAttr attr) { getProperties().label = attr; } static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::LLVM::DILabelAttr label); static DbgLabelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::LLVM::DILabelAttr label); static DbgLabelOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::LLVM::DILabelAttr label); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::LLVM::DILabelAttr label); static DbgLabelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::LLVM::DILabelAttr label); static DbgLabelOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::LLVM::DILabelAttr label); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static DbgLabelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static DbgLabelOp 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 DbgLabelOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static DbgLabelOp 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::DbgLabelOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::DbgLabelOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::DbgValueOp declarations //===----------------------------------------------------------------------===// namespace detail { class DbgValueOpGenericAdaptorBase { public: struct Properties { using locationExprTy = ::mlir::LLVM::DIExpressionAttr; locationExprTy locationExpr; auto getLocationExpr() const { auto &propStorage = this->locationExpr; return ::llvm::dyn_cast_or_null<::mlir::LLVM::DIExpressionAttr>(propStorage); } void setLocationExpr(const ::mlir::LLVM::DIExpressionAttr &propValue) { this->locationExpr = propValue; } using varInfoTy = ::mlir::LLVM::DILocalVariableAttr; varInfoTy varInfo; auto getVarInfo() const { auto &propStorage = this->varInfo; return ::llvm::cast<::mlir::LLVM::DILocalVariableAttr>(propStorage); } void setVarInfo(const ::mlir::LLVM::DILocalVariableAttr &propValue) { this->varInfo = propValue; } bool operator==(const Properties &rhs) const { return rhs.locationExpr == this->locationExpr && rhs.varInfo == this->varInfo && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: DbgValueOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.dbg.value", odsAttrs.getContext()); } DbgValueOpGenericAdaptorBase(DbgValueOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::DILocalVariableAttr getVarInfoAttr() { auto attr = ::llvm::cast<::mlir::LLVM::DILocalVariableAttr>(getProperties().varInfo); return attr; } ::mlir::LLVM::DILocalVariableAttr getVarInfo(); ::mlir::LLVM::DIExpressionAttr getLocationExprAttr(); ::mlir::LLVM::DIExpressionAttr getLocationExpr(); }; } // namespace detail template class DbgValueOpGenericAdaptor : public detail::DbgValueOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::DbgValueOpGenericAdaptorBase; static constexpr int odsIndex_value = 0; public: DbgValueOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} DbgValueOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : DbgValueOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} DbgValueOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : DbgValueOpGenericAdaptor(values, attrs, Properties{}, {}) {} DbgValueOpGenericAdaptor(RangeT values, const DbgValueOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> DbgValueOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getValue() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class DbgValueOpAdaptor : public DbgValueOpGenericAdaptor<::mlir::ValueRange> { public: using DbgValueOpGenericAdaptor::DbgValueOpGenericAdaptor; DbgValueOpAdaptor(DbgValueOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class DbgValueOp : public ::mlir::Op { public: using Op::Op; using Op::print; using Adaptor = DbgValueOpAdaptor; template using GenericAdaptor = DbgValueOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_value = 0; using Properties = FoldAdaptor::Properties; using ::mlir::PromotableOpInterface::Trait::requiresReplacedValues; using ::mlir::PromotableOpInterface::Trait::visitReplacedValues; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("locationExpr"), ::llvm::StringRef("varInfo")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getLocationExprAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getLocationExprAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getVarInfoAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getVarInfoAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.dbg.value"); } std::pair 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::Type> getValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::DILocalVariableAttr getVarInfoAttr() { return ::llvm::cast<::mlir::LLVM::DILocalVariableAttr>(getProperties().varInfo); } ::mlir::LLVM::DILocalVariableAttr getVarInfo(); ::mlir::LLVM::DIExpressionAttr getLocationExprAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::DIExpressionAttr>(getProperties().locationExpr); } ::mlir::LLVM::DIExpressionAttr getLocationExpr(); void setVarInfoAttr(::mlir::LLVM::DILocalVariableAttr attr) { getProperties().varInfo = attr; } void setLocationExprAttr(::mlir::LLVM::DIExpressionAttr attr) { getProperties().locationExpr = attr; } static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value, ::mlir::LLVM::DILocalVariableAttr varInfo, ::mlir::LLVM::DIExpressionAttr locationExpr = nullptr); static DbgValueOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value, ::mlir::LLVM::DILocalVariableAttr varInfo, ::mlir::LLVM::DIExpressionAttr locationExpr = nullptr); static DbgValueOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value, ::mlir::LLVM::DILocalVariableAttr varInfo, ::mlir::LLVM::DIExpressionAttr locationExpr = nullptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::LLVM::DILocalVariableAttr varInfo, ::mlir::LLVM::DIExpressionAttr locationExpr = nullptr); static DbgValueOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::LLVM::DILocalVariableAttr varInfo, ::mlir::LLVM::DIExpressionAttr locationExpr = nullptr); static DbgValueOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::LLVM::DILocalVariableAttr varInfo, ::mlir::LLVM::DIExpressionAttr locationExpr = nullptr); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static DbgValueOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static DbgValueOp 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 DbgValueOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static DbgValueOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); bool canUsesBeRemoved(const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout); ::mlir::DeletionKind removeBlockingUses(const ::llvm::SmallPtrSetImpl &blockingUses, ::mlir::OpBuilder &builder); static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result); void print(::mlir::OpAsmPrinter &_odsPrinter); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 2 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::DbgValueOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::DbgValueOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::DebugTrap declarations //===----------------------------------------------------------------------===// namespace detail { class DebugTrapGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: DebugTrapGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.debugtrap", odsAttrs.getContext()); } DebugTrapGenericAdaptorBase(DebugTrap op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class DebugTrapGenericAdaptor : public detail::DebugTrapGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::DebugTrapGenericAdaptorBase; public: DebugTrapGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} DebugTrapGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : DebugTrapGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} DebugTrapGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : DebugTrapGenericAdaptor(values, attrs, Properties{}, {}) {} DebugTrapGenericAdaptor(RangeT values, const DebugTrapGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> DebugTrapGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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)}; } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class DebugTrapAdaptor : public DebugTrapGenericAdaptor<::mlir::ValueRange> { public: using DebugTrapGenericAdaptor::DebugTrapGenericAdaptor; DebugTrapAdaptor(DebugTrap op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class DebugTrap : public ::mlir::Op { public: using Op::Op; using Op::print; using Adaptor = DebugTrapAdaptor; template using GenericAdaptor = DebugTrapGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.debugtrap"); } std::pair 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)}; } std::pair 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)}; } 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 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); static DebugTrap create(::mlir::OpBuilder &builder, ::mlir::Location location); static DebugTrap create(::mlir::ImplicitLocOpBuilder &builder); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes); static DebugTrap create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes); static DebugTrap create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static DebugTrap create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static DebugTrap 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 DebugTrap create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static DebugTrap 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::DebugTrap) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::EhTypeidForOp declarations //===----------------------------------------------------------------------===// namespace detail { class EhTypeidForOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: EhTypeidForOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.eh.typeid.for", odsAttrs.getContext()); } EhTypeidForOpGenericAdaptorBase(EhTypeidForOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class EhTypeidForOpGenericAdaptor : public detail::EhTypeidForOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::EhTypeidForOpGenericAdaptorBase; static constexpr int odsIndex_type_info = 0; public: EhTypeidForOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} EhTypeidForOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EhTypeidForOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} EhTypeidForOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EhTypeidForOpGenericAdaptor(values, attrs, Properties{}, {}) {} EhTypeidForOpGenericAdaptor(RangeT values, const EhTypeidForOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> EhTypeidForOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getTypeInfo() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class EhTypeidForOpAdaptor : public EhTypeidForOpGenericAdaptor<::mlir::ValueRange> { public: using EhTypeidForOpGenericAdaptor::EhTypeidForOpGenericAdaptor; EhTypeidForOpAdaptor(EhTypeidForOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class EhTypeidForOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants> { public: using Op::Op; using Op::print; using Adaptor = EhTypeidForOpAdaptor; template using GenericAdaptor = EhTypeidForOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_type_info = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.eh.typeid.for"); } std::pair 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::LLVM::LLVMPointerType> getTypeInfo() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getTypeInfoMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 type_info); static EhTypeidForOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value type_info); static EhTypeidForOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value type_info); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value type_info); static EhTypeidForOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value type_info); static EhTypeidForOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value type_info); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static EhTypeidForOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static EhTypeidForOp 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 EhTypeidForOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static EhTypeidForOp 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::EhTypeidForOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::Exp10Op declarations //===----------------------------------------------------------------------===// namespace detail { class Exp10OpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: Exp10OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.exp10", odsAttrs.getContext()); } Exp10OpGenericAdaptorBase(Exp10Op op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class Exp10OpGenericAdaptor : public detail::Exp10OpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::Exp10OpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: Exp10OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} Exp10OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Exp10OpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} Exp10OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Exp10OpGenericAdaptor(values, attrs, Properties{}, {}) {} Exp10OpGenericAdaptor(RangeT values, const Exp10OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> Exp10OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class Exp10OpAdaptor : public Exp10OpGenericAdaptor<::mlir::ValueRange> { public: using Exp10OpGenericAdaptor::Exp10OpGenericAdaptor; Exp10OpAdaptor(Exp10Op op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class Exp10Op : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = Exp10OpAdaptor; template using GenericAdaptor = Exp10OpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.exp10"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Exp10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Exp10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Exp10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Exp10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Exp10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Exp10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Exp10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Exp10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Exp10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Exp10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Exp10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Exp10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Exp10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Exp10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Exp10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Exp10Op create(::mlir::ImplicitLocOpBuilder &builder, ::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 Exp10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static Exp10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static Exp10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static Exp10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::Exp10Op) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::Exp10OpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::Exp2Op declarations //===----------------------------------------------------------------------===// namespace detail { class Exp2OpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: Exp2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.exp2", odsAttrs.getContext()); } Exp2OpGenericAdaptorBase(Exp2Op op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class Exp2OpGenericAdaptor : public detail::Exp2OpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::Exp2OpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: Exp2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} Exp2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Exp2OpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} Exp2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Exp2OpGenericAdaptor(values, attrs, Properties{}, {}) {} Exp2OpGenericAdaptor(RangeT values, const Exp2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> Exp2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class Exp2OpAdaptor : public Exp2OpGenericAdaptor<::mlir::ValueRange> { public: using Exp2OpGenericAdaptor::Exp2OpGenericAdaptor; Exp2OpAdaptor(Exp2Op op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class Exp2Op : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = Exp2OpAdaptor; template using GenericAdaptor = Exp2OpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.exp2"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Exp2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Exp2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Exp2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Exp2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Exp2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Exp2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Exp2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Exp2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Exp2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Exp2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Exp2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Exp2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Exp2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Exp2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Exp2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Exp2Op create(::mlir::ImplicitLocOpBuilder &builder, ::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 Exp2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static Exp2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static Exp2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static Exp2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::Exp2Op) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::Exp2OpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ExpOp declarations //===----------------------------------------------------------------------===// namespace detail { class ExpOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ExpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.exp", odsAttrs.getContext()); } ExpOpGenericAdaptorBase(ExpOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class ExpOpGenericAdaptor : public detail::ExpOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ExpOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: ExpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ExpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ExpOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ExpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ExpOpGenericAdaptor(values, attrs, Properties{}, {}) {} ExpOpGenericAdaptor(RangeT values, const ExpOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ExpOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ExpOpAdaptor : public ExpOpGenericAdaptor<::mlir::ValueRange> { public: using ExpOpGenericAdaptor::ExpOpGenericAdaptor; ExpOpAdaptor(ExpOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ExpOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ExpOpAdaptor; template using GenericAdaptor = ExpOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.exp"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static ExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static ExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 ExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ExpOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::ExpOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ExpectOp declarations //===----------------------------------------------------------------------===// namespace detail { class ExpectOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ExpectOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.expect", odsAttrs.getContext()); } ExpectOpGenericAdaptorBase(ExpectOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class ExpectOpGenericAdaptor : public detail::ExpectOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ExpectOpGenericAdaptorBase; static constexpr int odsIndex_val = 0; static constexpr int odsIndex_expected = 1; public: ExpectOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ExpectOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ExpectOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ExpectOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ExpectOpGenericAdaptor(values, attrs, Properties{}, {}) {} ExpectOpGenericAdaptor(RangeT values, const ExpectOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ExpectOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getVal() { return (*getODSOperands(0).begin()); } ValueT getExpected() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ExpectOpAdaptor : public ExpectOpGenericAdaptor<::mlir::ValueRange> { public: using ExpectOpGenericAdaptor::ExpectOpGenericAdaptor; ExpectOpAdaptor(ExpectOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ExpectOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ExpectOpAdaptor; template using GenericAdaptor = ExpectOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_val = 0; static constexpr int odsIndex_expected = 1; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.expect"); } std::pair 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::IntegerType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getExpected() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getExpectedMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 val, ::mlir::Value expected); static ExpectOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val, ::mlir::Value expected); static ExpectOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val, ::mlir::Value expected); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value val, ::mlir::Value expected); static ExpectOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value val, ::mlir::Value expected); static ExpectOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value val, ::mlir::Value expected); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value expected); static ExpectOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value expected); static ExpectOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value expected); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ExpectOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ExpectOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ExpectOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ExpectOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 ExpectOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ExpectOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ExpectOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ExpectOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ExpectOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ExpectWithProbabilityOp declarations //===----------------------------------------------------------------------===// namespace detail { class ExpectWithProbabilityOpGenericAdaptorBase { public: struct Properties { using probTy = ::mlir::FloatAttr; probTy prob; auto getProb() const { auto &propStorage = this->prob; return ::llvm::cast<::mlir::FloatAttr>(propStorage); } void setProb(const ::mlir::FloatAttr &propValue) { this->prob = propValue; } bool operator==(const Properties &rhs) const { return rhs.prob == this->prob && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ExpectWithProbabilityOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.expect.with.probability", odsAttrs.getContext()); } ExpectWithProbabilityOpGenericAdaptorBase(ExpectWithProbabilityOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::FloatAttr getProbAttr() { auto attr = ::llvm::cast<::mlir::FloatAttr>(getProperties().prob); return attr; } ::llvm::APFloat getProb(); }; } // namespace detail template class ExpectWithProbabilityOpGenericAdaptor : public detail::ExpectWithProbabilityOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ExpectWithProbabilityOpGenericAdaptorBase; static constexpr int odsIndex_val = 0; static constexpr int odsIndex_expected = 1; public: ExpectWithProbabilityOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ExpectWithProbabilityOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ExpectWithProbabilityOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ExpectWithProbabilityOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ExpectWithProbabilityOpGenericAdaptor(values, attrs, Properties{}, {}) {} ExpectWithProbabilityOpGenericAdaptor(RangeT values, const ExpectWithProbabilityOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ExpectWithProbabilityOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getVal() { return (*getODSOperands(0).begin()); } ValueT getExpected() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ExpectWithProbabilityOpAdaptor : public ExpectWithProbabilityOpGenericAdaptor<::mlir::ValueRange> { public: using ExpectWithProbabilityOpGenericAdaptor::ExpectWithProbabilityOpGenericAdaptor; ExpectWithProbabilityOpAdaptor(ExpectWithProbabilityOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ExpectWithProbabilityOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ExpectWithProbabilityOpAdaptor; template using GenericAdaptor = ExpectWithProbabilityOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_val = 0; static constexpr int odsIndex_expected = 1; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("prob")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getProbAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getProbAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.expect.with.probability"); } std::pair 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::IntegerType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getExpected() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getExpectedMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::FloatAttr getProbAttr() { return ::llvm::cast<::mlir::FloatAttr>(getProperties().prob); } ::llvm::APFloat getProb(); void setProbAttr(::mlir::FloatAttr attr) { getProperties().prob = attr; } void setProb(::llvm::APFloat attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value val, ::mlir::Value expected, ::mlir::FloatAttr prob); static ExpectWithProbabilityOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val, ::mlir::Value expected, ::mlir::FloatAttr prob); static ExpectWithProbabilityOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val, ::mlir::Value expected, ::mlir::FloatAttr prob); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value val, ::mlir::Value expected, ::mlir::FloatAttr prob); static ExpectWithProbabilityOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value val, ::mlir::Value expected, ::mlir::FloatAttr prob); static ExpectWithProbabilityOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value val, ::mlir::Value expected, ::mlir::FloatAttr prob); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value expected, ::mlir::FloatAttr prob); static ExpectWithProbabilityOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value expected, ::mlir::FloatAttr prob); static ExpectWithProbabilityOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value expected, ::mlir::FloatAttr prob); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value val, ::mlir::Value expected, ::llvm::APFloat prob); static ExpectWithProbabilityOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val, ::mlir::Value expected, ::llvm::APFloat prob); static ExpectWithProbabilityOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val, ::mlir::Value expected, ::llvm::APFloat prob); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value val, ::mlir::Value expected, ::llvm::APFloat prob); static ExpectWithProbabilityOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value val, ::mlir::Value expected, ::llvm::APFloat prob); static ExpectWithProbabilityOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value val, ::mlir::Value expected, ::llvm::APFloat prob); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value expected, ::llvm::APFloat prob); static ExpectWithProbabilityOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value expected, ::llvm::APFloat prob); static ExpectWithProbabilityOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value expected, ::llvm::APFloat prob); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ExpectWithProbabilityOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ExpectWithProbabilityOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ExpectWithProbabilityOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ExpectWithProbabilityOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 ExpectWithProbabilityOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ExpectWithProbabilityOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ExpectWithProbabilityOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ExpectWithProbabilityOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ExpectWithProbabilityOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::ExpectWithProbabilityOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::FAbsOp declarations //===----------------------------------------------------------------------===// namespace detail { class FAbsOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: FAbsOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.fabs", odsAttrs.getContext()); } FAbsOpGenericAdaptorBase(FAbsOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class FAbsOpGenericAdaptor : public detail::FAbsOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::FAbsOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: FAbsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} FAbsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FAbsOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} FAbsOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FAbsOpGenericAdaptor(values, attrs, Properties{}, {}) {} FAbsOpGenericAdaptor(RangeT values, const FAbsOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> FAbsOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class FAbsOpAdaptor : public FAbsOpGenericAdaptor<::mlir::ValueRange> { public: using FAbsOpGenericAdaptor::FAbsOpGenericAdaptor; FAbsOpAdaptor(FAbsOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class FAbsOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = FAbsOpAdaptor; template using GenericAdaptor = FAbsOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.fabs"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FAbsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FAbsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FAbsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FAbsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FAbsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FAbsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FAbsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FAbsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FAbsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FAbsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FAbsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FAbsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FAbsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FAbsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FAbsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FAbsOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 FAbsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FAbsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FAbsOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FAbsOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::FAbsOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::FAbsOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::FCeilOp declarations //===----------------------------------------------------------------------===// namespace detail { class FCeilOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: FCeilOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.ceil", odsAttrs.getContext()); } FCeilOpGenericAdaptorBase(FCeilOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class FCeilOpGenericAdaptor : public detail::FCeilOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::FCeilOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: FCeilOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} FCeilOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FCeilOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} FCeilOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FCeilOpGenericAdaptor(values, attrs, Properties{}, {}) {} FCeilOpGenericAdaptor(RangeT values, const FCeilOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> FCeilOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class FCeilOpAdaptor : public FCeilOpGenericAdaptor<::mlir::ValueRange> { public: using FCeilOpGenericAdaptor::FCeilOpGenericAdaptor; FCeilOpAdaptor(FCeilOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class FCeilOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = FCeilOpAdaptor; template using GenericAdaptor = FCeilOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.ceil"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FCeilOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FCeilOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FCeilOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FCeilOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FCeilOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FCeilOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FCeilOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FCeilOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FCeilOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FCeilOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FCeilOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FCeilOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FCeilOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FCeilOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FCeilOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FCeilOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 FCeilOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FCeilOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FCeilOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FCeilOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::FCeilOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::FCeilOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::FFloorOp declarations //===----------------------------------------------------------------------===// namespace detail { class FFloorOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: FFloorOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.floor", odsAttrs.getContext()); } FFloorOpGenericAdaptorBase(FFloorOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class FFloorOpGenericAdaptor : public detail::FFloorOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::FFloorOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: FFloorOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} FFloorOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FFloorOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} FFloorOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FFloorOpGenericAdaptor(values, attrs, Properties{}, {}) {} FFloorOpGenericAdaptor(RangeT values, const FFloorOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> FFloorOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class FFloorOpAdaptor : public FFloorOpGenericAdaptor<::mlir::ValueRange> { public: using FFloorOpGenericAdaptor::FFloorOpGenericAdaptor; FFloorOpAdaptor(FFloorOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class FFloorOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = FFloorOpAdaptor; template using GenericAdaptor = FFloorOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.floor"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FFloorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FFloorOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FFloorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FFloorOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FFloorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FFloorOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FFloorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FFloorOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FFloorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FFloorOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FFloorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FFloorOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FFloorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FFloorOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FFloorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FFloorOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 FFloorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FFloorOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FFloorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FFloorOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::FFloorOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::FFloorOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::FMAOp declarations //===----------------------------------------------------------------------===// namespace detail { class FMAOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: FMAOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.fma", odsAttrs.getContext()); } FMAOpGenericAdaptorBase(FMAOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class FMAOpGenericAdaptor : public detail::FMAOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::FMAOpGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; static constexpr int odsIndex_c = 2; public: FMAOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} FMAOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FMAOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} FMAOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FMAOpGenericAdaptor(values, attrs, Properties{}, {}) {} FMAOpGenericAdaptor(RangeT values, const FMAOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> FMAOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 FMAOpAdaptor : public FMAOpGenericAdaptor<::mlir::ValueRange> { public: using FMAOpGenericAdaptor::FMAOpGenericAdaptor; FMAOpAdaptor(FMAOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class FMAOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = FMAOpAdaptor; template using GenericAdaptor = FMAOpGenericAdaptor; 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; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.fma"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::Type> getC() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FMAOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FMAOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FMAOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FMAOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FMAOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FMAOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FMAOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FMAOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FMAOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FMAOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FMAOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FMAOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FMAOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FMAOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FMAOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FMAOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 FMAOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FMAOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FMAOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FMAOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::FMAOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::FMAOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::FMulAddOp declarations //===----------------------------------------------------------------------===// namespace detail { class FMulAddOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: FMulAddOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.fmuladd", odsAttrs.getContext()); } FMulAddOpGenericAdaptorBase(FMulAddOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class FMulAddOpGenericAdaptor : public detail::FMulAddOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::FMulAddOpGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; static constexpr int odsIndex_c = 2; public: FMulAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} FMulAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FMulAddOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} FMulAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FMulAddOpGenericAdaptor(values, attrs, Properties{}, {}) {} FMulAddOpGenericAdaptor(RangeT values, const FMulAddOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> FMulAddOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 FMulAddOpAdaptor : public FMulAddOpGenericAdaptor<::mlir::ValueRange> { public: using FMulAddOpGenericAdaptor::FMulAddOpGenericAdaptor; FMulAddOpAdaptor(FMulAddOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class FMulAddOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = FMulAddOpAdaptor; template using GenericAdaptor = FMulAddOpGenericAdaptor; 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; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.fmuladd"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::Type> getC() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FMulAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FMulAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FMulAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FMulAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FMulAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FMulAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FMulAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FMulAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FMulAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FMulAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FMulAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FMulAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FMulAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FMulAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FMulAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FMulAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 FMulAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FMulAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FMulAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FMulAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::FMulAddOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::FMulAddOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::FTruncOp declarations //===----------------------------------------------------------------------===// namespace detail { class FTruncOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: FTruncOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.trunc", odsAttrs.getContext()); } FTruncOpGenericAdaptorBase(FTruncOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class FTruncOpGenericAdaptor : public detail::FTruncOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::FTruncOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: FTruncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} FTruncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FTruncOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} FTruncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FTruncOpGenericAdaptor(values, attrs, Properties{}, {}) {} FTruncOpGenericAdaptor(RangeT values, const FTruncOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> FTruncOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class FTruncOpAdaptor : public FTruncOpGenericAdaptor<::mlir::ValueRange> { public: using FTruncOpGenericAdaptor::FTruncOpGenericAdaptor; FTruncOpAdaptor(FTruncOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class FTruncOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = FTruncOpAdaptor; template using GenericAdaptor = FTruncOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.trunc"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FTruncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FTruncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FTruncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FTruncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FTruncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FTruncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FTruncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FTruncOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 FTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FTruncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FTruncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::FTruncOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::FTruncOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::FakeUseOp declarations //===----------------------------------------------------------------------===// namespace detail { class FakeUseOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: FakeUseOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.fake.use", odsAttrs.getContext()); } FakeUseOpGenericAdaptorBase(FakeUseOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize); const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class FakeUseOpGenericAdaptor : public detail::FakeUseOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::FakeUseOpGenericAdaptorBase; static constexpr int odsIndex_args = 0; public: FakeUseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} FakeUseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FakeUseOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} FakeUseOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FakeUseOpGenericAdaptor(values, attrs, Properties{}, {}) {} FakeUseOpGenericAdaptor(RangeT values, const FakeUseOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> FakeUseOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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)}; } RangeT getArgs() { return getODSOperands(0); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class FakeUseOpAdaptor : public FakeUseOpGenericAdaptor<::mlir::ValueRange> { public: using FakeUseOpGenericAdaptor::FakeUseOpGenericAdaptor; FakeUseOpAdaptor(FakeUseOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class FakeUseOp : public ::mlir::Op { public: using Op::Op; using Op::print; using Adaptor = FakeUseOpAdaptor; template using GenericAdaptor = FakeUseOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_args = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.fake.use"); } std::pair getODSOperandIndexAndLength(unsigned index); ::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::Operation::operand_range getArgs() { return getODSOperands(0); } ::mlir::MutableOperandRange getArgsMutable(); std::pair 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)}; } 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 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::ValueRange args); static FakeUseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange args); static FakeUseOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange args); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FakeUseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FakeUseOp 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 FakeUseOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FakeUseOp 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::FakeUseOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::FractionExpOp declarations //===----------------------------------------------------------------------===// namespace detail { class FractionExpOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: FractionExpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.frexp", odsAttrs.getContext()); } FractionExpOpGenericAdaptorBase(FractionExpOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class FractionExpOpGenericAdaptor : public detail::FractionExpOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::FractionExpOpGenericAdaptorBase; static constexpr int odsIndex_val = 0; public: FractionExpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} FractionExpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FractionExpOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} FractionExpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FractionExpOpGenericAdaptor(values, attrs, Properties{}, {}) {} FractionExpOpGenericAdaptor(RangeT values, const FractionExpOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> FractionExpOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getVal() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class FractionExpOpAdaptor : public FractionExpOpGenericAdaptor<::mlir::ValueRange> { public: using FractionExpOpGenericAdaptor::FractionExpOpGenericAdaptor; FractionExpOpAdaptor(FractionExpOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class FractionExpOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = FractionExpOpAdaptor; template using GenericAdaptor = FractionExpOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_val = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.frexp"); } std::pair 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::Type> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value val, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FractionExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FractionExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FractionExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static FractionExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value val, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FractionExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FractionExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FractionExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static FractionExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FractionExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FractionExpOp 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 FractionExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FractionExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::FractionExpOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::FractionExpOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::FshlOp declarations //===----------------------------------------------------------------------===// namespace detail { class FshlOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: FshlOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.fshl", odsAttrs.getContext()); } FshlOpGenericAdaptorBase(FshlOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class FshlOpGenericAdaptor : public detail::FshlOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::FshlOpGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; static constexpr int odsIndex_c = 2; public: FshlOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} FshlOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FshlOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} FshlOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FshlOpGenericAdaptor(values, attrs, Properties{}, {}) {} FshlOpGenericAdaptor(RangeT values, const FshlOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> FshlOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 FshlOpAdaptor : public FshlOpGenericAdaptor<::mlir::ValueRange> { public: using FshlOpGenericAdaptor::FshlOpGenericAdaptor; FshlOpAdaptor(FshlOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class FshlOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = FshlOpAdaptor; template using GenericAdaptor = FshlOpGenericAdaptor; 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("llvm.intr.fshl"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::Type> getC() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 FshlOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c); static FshlOp 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::Value a, ::mlir::Value b, ::mlir::Value c); static FshlOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c); static FshlOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 FshlOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c); static FshlOp 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 FshlOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FshlOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FshlOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FshlOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 FshlOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FshlOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FshlOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FshlOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::FshlOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::FshrOp declarations //===----------------------------------------------------------------------===// namespace detail { class FshrOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: FshrOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.fshr", odsAttrs.getContext()); } FshrOpGenericAdaptorBase(FshrOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class FshrOpGenericAdaptor : public detail::FshrOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::FshrOpGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; static constexpr int odsIndex_c = 2; public: FshrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} FshrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : FshrOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} FshrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : FshrOpGenericAdaptor(values, attrs, Properties{}, {}) {} FshrOpGenericAdaptor(RangeT values, const FshrOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> FshrOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 FshrOpAdaptor : public FshrOpGenericAdaptor<::mlir::ValueRange> { public: using FshrOpGenericAdaptor::FshrOpGenericAdaptor; FshrOpAdaptor(FshrOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class FshrOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = FshrOpAdaptor; template using GenericAdaptor = FshrOpGenericAdaptor; 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("llvm.intr.fshr"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::Type> getC() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 FshrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c); static FshrOp 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::Value a, ::mlir::Value b, ::mlir::Value c); static FshrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c); static FshrOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 FshrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::Value c); static FshrOp 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 FshrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FshrOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FshrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static FshrOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 FshrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FshrOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FshrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static FshrOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::FshrOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::GetActiveLaneMaskOp declarations //===----------------------------------------------------------------------===// namespace detail { class GetActiveLaneMaskOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: GetActiveLaneMaskOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.get.active.lane.mask", odsAttrs.getContext()); } GetActiveLaneMaskOpGenericAdaptorBase(GetActiveLaneMaskOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class GetActiveLaneMaskOpGenericAdaptor : public detail::GetActiveLaneMaskOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::GetActiveLaneMaskOpGenericAdaptorBase; static constexpr int odsIndex_base = 0; static constexpr int odsIndex_n = 1; public: GetActiveLaneMaskOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} GetActiveLaneMaskOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : GetActiveLaneMaskOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} GetActiveLaneMaskOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : GetActiveLaneMaskOpGenericAdaptor(values, attrs, Properties{}, {}) {} GetActiveLaneMaskOpGenericAdaptor(RangeT values, const GetActiveLaneMaskOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> GetActiveLaneMaskOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getBase() { return (*getODSOperands(0).begin()); } ValueT getN() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class GetActiveLaneMaskOpAdaptor : public GetActiveLaneMaskOpGenericAdaptor<::mlir::ValueRange> { public: using GetActiveLaneMaskOpGenericAdaptor::GetActiveLaneMaskOpGenericAdaptor; GetActiveLaneMaskOpAdaptor(GetActiveLaneMaskOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class GetActiveLaneMaskOp : public ::mlir::Op::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 = GetActiveLaneMaskOpAdaptor; template using GenericAdaptor = GetActiveLaneMaskOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_base = 0; static constexpr int odsIndex_n = 1; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.get.active.lane.mask"); } std::pair 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::IntegerType> getBase() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getN() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getBaseMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getNMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 base, ::mlir::Value n); static GetActiveLaneMaskOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value base, ::mlir::Value n); static GetActiveLaneMaskOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value base, ::mlir::Value n); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::Value n); static GetActiveLaneMaskOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::Value n); static GetActiveLaneMaskOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value base, ::mlir::Value n); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static GetActiveLaneMaskOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static GetActiveLaneMaskOp 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 GetActiveLaneMaskOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static GetActiveLaneMaskOp 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::GetActiveLaneMaskOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::InvariantEndOp declarations //===----------------------------------------------------------------------===// namespace detail { class InvariantEndOpGenericAdaptorBase { public: struct Properties { using sizeTy = ::mlir::IntegerAttr; sizeTy size; auto getSize() const { auto &propStorage = this->size; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setSize(const ::mlir::IntegerAttr &propValue) { this->size = propValue; } bool operator==(const Properties &rhs) const { return rhs.size == this->size && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: InvariantEndOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.invariant.end", odsAttrs.getContext()); } InvariantEndOpGenericAdaptorBase(InvariantEndOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getSizeAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().size); return attr; } uint64_t getSize(); }; } // namespace detail template class InvariantEndOpGenericAdaptor : public detail::InvariantEndOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::InvariantEndOpGenericAdaptorBase; static constexpr int odsIndex_start = 0; static constexpr int odsIndex_ptr = 1; public: InvariantEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} InvariantEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : InvariantEndOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} InvariantEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : InvariantEndOpGenericAdaptor(values, attrs, Properties{}, {}) {} InvariantEndOpGenericAdaptor(RangeT values, const InvariantEndOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> InvariantEndOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getStart() { return (*getODSOperands(0).begin()); } ValueT getPtr() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class InvariantEndOpAdaptor : public InvariantEndOpGenericAdaptor<::mlir::ValueRange> { public: using InvariantEndOpGenericAdaptor::InvariantEndOpGenericAdaptor; InvariantEndOpAdaptor(InvariantEndOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class InvariantEndOp : public ::mlir::Op::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::PromotableOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = InvariantEndOpAdaptor; template using GenericAdaptor = InvariantEndOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_start = 0; static constexpr int odsIndex_ptr = 1; using Properties = FoldAdaptor::Properties; using ::mlir::PromotableOpInterface::Trait::requiresReplacedValues; using ::mlir::PromotableOpInterface::Trait::visitReplacedValues; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("size")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getSizeAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getSizeAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.invariant.end"); } std::pair 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::LLVM::LLVMPointerType> getStart() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getPtr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getStartMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getPtrMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getSizeAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().size); } uint64_t getSize(); void setSizeAttr(::mlir::IntegerAttr attr) { getProperties().size = attr; } void setSize(uint64_t attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value start, ::mlir::IntegerAttr size, ::mlir::Value ptr); static InvariantEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value start, ::mlir::IntegerAttr size, ::mlir::Value ptr); static InvariantEndOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value start, ::mlir::IntegerAttr size, ::mlir::Value ptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value start, ::mlir::IntegerAttr size, ::mlir::Value ptr); static InvariantEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value start, ::mlir::IntegerAttr size, ::mlir::Value ptr); static InvariantEndOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value start, ::mlir::IntegerAttr size, ::mlir::Value ptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value start, uint64_t size, ::mlir::Value ptr); static InvariantEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value start, uint64_t size, ::mlir::Value ptr); static InvariantEndOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value start, uint64_t size, ::mlir::Value ptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value start, uint64_t size, ::mlir::Value ptr); static InvariantEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value start, uint64_t size, ::mlir::Value ptr); static InvariantEndOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value start, uint64_t size, ::mlir::Value ptr); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static InvariantEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static InvariantEndOp 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 InvariantEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static InvariantEndOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); bool canUsesBeRemoved(const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout); ::mlir::DeletionKind removeBlockingUses(const ::llvm::SmallPtrSetImpl &blockingUses, ::mlir::OpBuilder &builder); static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result); void print(::mlir::OpAsmPrinter &_odsPrinter); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::InvariantEndOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::InvariantEndOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::InvariantStartOp declarations //===----------------------------------------------------------------------===// namespace detail { class InvariantStartOpGenericAdaptorBase { public: struct Properties { using sizeTy = ::mlir::IntegerAttr; sizeTy size; auto getSize() const { auto &propStorage = this->size; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setSize(const ::mlir::IntegerAttr &propValue) { this->size = propValue; } bool operator==(const Properties &rhs) const { return rhs.size == this->size && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: InvariantStartOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.invariant.start", odsAttrs.getContext()); } InvariantStartOpGenericAdaptorBase(InvariantStartOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getSizeAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().size); return attr; } uint64_t getSize(); }; } // namespace detail template class InvariantStartOpGenericAdaptor : public detail::InvariantStartOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::InvariantStartOpGenericAdaptorBase; static constexpr int odsIndex_ptr = 0; public: InvariantStartOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} InvariantStartOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : InvariantStartOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} InvariantStartOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : InvariantStartOpGenericAdaptor(values, attrs, Properties{}, {}) {} InvariantStartOpGenericAdaptor(RangeT values, const InvariantStartOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> InvariantStartOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getPtr() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class InvariantStartOpAdaptor : public InvariantStartOpGenericAdaptor<::mlir::ValueRange> { public: using InvariantStartOpGenericAdaptor::InvariantStartOpGenericAdaptor; InvariantStartOpAdaptor(InvariantStartOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class InvariantStartOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::PromotableOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = InvariantStartOpAdaptor; template using GenericAdaptor = InvariantStartOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_ptr = 0; using Properties = FoldAdaptor::Properties; using ::mlir::PromotableOpInterface::Trait::requiresReplacedValues; using ::mlir::PromotableOpInterface::Trait::visitReplacedValues; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("size")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getSizeAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getSizeAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.invariant.start"); } std::pair 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::LLVM::LLVMPointerType> getPtr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getPtrMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::LLVM::LLVMPointerType> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getSizeAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().size); } uint64_t getSize(); void setSizeAttr(::mlir::IntegerAttr attr) { getProperties().size = attr; } void setSize(uint64_t attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::IntegerAttr size, ::mlir::Value ptr); static InvariantStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::IntegerAttr size, ::mlir::Value ptr); static InvariantStartOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::IntegerAttr size, ::mlir::Value ptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr size, ::mlir::Value ptr); static InvariantStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr size, ::mlir::Value ptr); static InvariantStartOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr size, ::mlir::Value ptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr size, ::mlir::Value ptr); static InvariantStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr size, ::mlir::Value ptr); static InvariantStartOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr size, ::mlir::Value ptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, uint64_t size, ::mlir::Value ptr); static InvariantStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, uint64_t size, ::mlir::Value ptr); static InvariantStartOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, uint64_t size, ::mlir::Value ptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint64_t size, ::mlir::Value ptr); static InvariantStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, uint64_t size, ::mlir::Value ptr); static InvariantStartOp create(::mlir::ImplicitLocOpBuilder &builder, uint64_t size, ::mlir::Value ptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint64_t size, ::mlir::Value ptr); static InvariantStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint64_t size, ::mlir::Value ptr); static InvariantStartOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint64_t size, ::mlir::Value ptr); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static InvariantStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static InvariantStartOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static InvariantStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static InvariantStartOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 InvariantStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static InvariantStartOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static InvariantStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static InvariantStartOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); bool canUsesBeRemoved(const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout); ::mlir::DeletionKind removeBlockingUses(const ::llvm::SmallPtrSetImpl &blockingUses, ::mlir::OpBuilder &builder); static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result); void print(::mlir::OpAsmPrinter &_odsPrinter); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::InvariantStartOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::InvariantStartOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::IsConstantOp declarations //===----------------------------------------------------------------------===// namespace detail { class IsConstantOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: IsConstantOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.is.constant", odsAttrs.getContext()); } IsConstantOpGenericAdaptorBase(IsConstantOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class IsConstantOpGenericAdaptor : public detail::IsConstantOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::IsConstantOpGenericAdaptorBase; static constexpr int odsIndex_val = 0; public: IsConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} IsConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : IsConstantOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} IsConstantOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : IsConstantOpGenericAdaptor(values, attrs, Properties{}, {}) {} IsConstantOpGenericAdaptor(RangeT values, const IsConstantOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> IsConstantOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getVal() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class IsConstantOpAdaptor : public IsConstantOpGenericAdaptor<::mlir::ValueRange> { public: using IsConstantOpGenericAdaptor::IsConstantOpGenericAdaptor; IsConstantOpAdaptor(IsConstantOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class IsConstantOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = IsConstantOpAdaptor; template using GenericAdaptor = IsConstantOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_val = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.is.constant"); } std::pair 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::Type> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::IntegerType> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*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 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 val); static IsConstantOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val); static IsConstantOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value val); static IsConstantOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value val); static IsConstantOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value val); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val); static IsConstantOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val); static IsConstantOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static IsConstantOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static IsConstantOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static IsConstantOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static IsConstantOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 IsConstantOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static IsConstantOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static IsConstantOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static IsConstantOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::IsConstantOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::IsFPClass declarations //===----------------------------------------------------------------------===// namespace detail { class IsFPClassGenericAdaptorBase { public: struct Properties { using bitTy = ::mlir::IntegerAttr; bitTy bit; auto getBit() const { auto &propStorage = this->bit; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setBit(const ::mlir::IntegerAttr &propValue) { this->bit = propValue; } bool operator==(const Properties &rhs) const { return rhs.bit == this->bit && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: IsFPClassGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.is.fpclass", odsAttrs.getContext()); } IsFPClassGenericAdaptorBase(IsFPClass op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getBitAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().bit); return attr; } uint32_t getBit(); }; } // namespace detail template class IsFPClassGenericAdaptor : public detail::IsFPClassGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::IsFPClassGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: IsFPClassGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} IsFPClassGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : IsFPClassGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} IsFPClassGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : IsFPClassGenericAdaptor(values, attrs, Properties{}, {}) {} IsFPClassGenericAdaptor(RangeT values, const IsFPClassGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> IsFPClassGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class IsFPClassAdaptor : public IsFPClassGenericAdaptor<::mlir::ValueRange> { public: using IsFPClassGenericAdaptor::IsFPClassGenericAdaptor; IsFPClassAdaptor(IsFPClass op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class IsFPClass : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = IsFPClassAdaptor; template using GenericAdaptor = IsFPClassGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("bit")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getBitAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getBitAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.is.fpclass"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getBitAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().bit); } uint32_t getBit(); void setBitAttr(::mlir::IntegerAttr attr) { getProperties().bit = attr; } void setBit(uint32_t attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::IntegerAttr bit); static IsFPClass create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::IntegerAttr bit); static IsFPClass create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::IntegerAttr bit); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::IntegerAttr bit); static IsFPClass create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::IntegerAttr bit); static IsFPClass create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::IntegerAttr bit); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, uint32_t bit); static IsFPClass create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, uint32_t bit); static IsFPClass create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, uint32_t bit); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, uint32_t bit); static IsFPClass create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, uint32_t bit); static IsFPClass create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, uint32_t bit); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static IsFPClass create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static IsFPClass 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 IsFPClass create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static IsFPClass 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::IsFPClass) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::IsFPClassGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::LaunderInvariantGroupOp declarations //===----------------------------------------------------------------------===// namespace detail { class LaunderInvariantGroupOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: LaunderInvariantGroupOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.launder.invariant.group", odsAttrs.getContext()); } LaunderInvariantGroupOpGenericAdaptorBase(LaunderInvariantGroupOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class LaunderInvariantGroupOpGenericAdaptor : public detail::LaunderInvariantGroupOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::LaunderInvariantGroupOpGenericAdaptorBase; static constexpr int odsIndex_ptr = 0; public: LaunderInvariantGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} LaunderInvariantGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : LaunderInvariantGroupOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} LaunderInvariantGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : LaunderInvariantGroupOpGenericAdaptor(values, attrs, Properties{}, {}) {} LaunderInvariantGroupOpGenericAdaptor(RangeT values, const LaunderInvariantGroupOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> LaunderInvariantGroupOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getPtr() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class LaunderInvariantGroupOpAdaptor : public LaunderInvariantGroupOpGenericAdaptor<::mlir::ValueRange> { public: using LaunderInvariantGroupOpGenericAdaptor::LaunderInvariantGroupOpGenericAdaptor; LaunderInvariantGroupOpAdaptor(LaunderInvariantGroupOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class LaunderInvariantGroupOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::PromotableOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = LaunderInvariantGroupOpAdaptor; template using GenericAdaptor = LaunderInvariantGroupOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_ptr = 0; using Properties = FoldAdaptor::Properties; using ::mlir::PromotableOpInterface::Trait::requiresReplacedValues; using ::mlir::PromotableOpInterface::Trait::visitReplacedValues; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.launder.invariant.group"); } std::pair 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::LLVM::LLVMPointerType> getPtr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getPtrMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::LLVM::LLVMPointerType> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*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 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 ptr); static LaunderInvariantGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr); static LaunderInvariantGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value ptr); static LaunderInvariantGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr); static LaunderInvariantGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr); static LaunderInvariantGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr); static LaunderInvariantGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LaunderInvariantGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LaunderInvariantGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LaunderInvariantGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LaunderInvariantGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 LaunderInvariantGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static LaunderInvariantGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static LaunderInvariantGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static LaunderInvariantGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); bool canUsesBeRemoved(const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout); ::mlir::DeletionKind removeBlockingUses(const ::llvm::SmallPtrSetImpl &blockingUses, ::mlir::OpBuilder &builder); static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result); void print(::mlir::OpAsmPrinter &_odsPrinter); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::LaunderInvariantGroupOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::LifetimeEndOp declarations //===----------------------------------------------------------------------===// namespace detail { class LifetimeEndOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: LifetimeEndOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.lifetime.end", odsAttrs.getContext()); } LifetimeEndOpGenericAdaptorBase(LifetimeEndOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class LifetimeEndOpGenericAdaptor : public detail::LifetimeEndOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::LifetimeEndOpGenericAdaptorBase; static constexpr int odsIndex_ptr = 0; public: LifetimeEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} LifetimeEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : LifetimeEndOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} LifetimeEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : LifetimeEndOpGenericAdaptor(values, attrs, Properties{}, {}) {} LifetimeEndOpGenericAdaptor(RangeT values, const LifetimeEndOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> LifetimeEndOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getPtr() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class LifetimeEndOpAdaptor : public LifetimeEndOpGenericAdaptor<::mlir::ValueRange> { public: using LifetimeEndOpGenericAdaptor::LifetimeEndOpGenericAdaptor; LifetimeEndOpAdaptor(LifetimeEndOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class LifetimeEndOp : public ::mlir::Op { public: using Op::Op; using Op::print; using Adaptor = LifetimeEndOpAdaptor; template using GenericAdaptor = LifetimeEndOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_ptr = 0; using Properties = FoldAdaptor::Properties; using ::mlir::PromotableOpInterface::Trait::requiresReplacedValues; using ::mlir::PromotableOpInterface::Trait::visitReplacedValues; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.lifetime.end"); } std::pair 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::LLVM::LLVMPointerType> getPtr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getPtrMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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::Value ptr); static LifetimeEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr); static LifetimeEndOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr); static LifetimeEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr); static LifetimeEndOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LifetimeEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LifetimeEndOp 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 LifetimeEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static LifetimeEndOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); bool canUsesBeRemoved(const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout); ::mlir::DeletionKind removeBlockingUses(const ::llvm::SmallPtrSetImpl &blockingUses, ::mlir::OpBuilder &builder); static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result); void print(::mlir::OpAsmPrinter &_odsPrinter); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::LifetimeEndOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::LifetimeStartOp declarations //===----------------------------------------------------------------------===// namespace detail { class LifetimeStartOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: LifetimeStartOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.lifetime.start", odsAttrs.getContext()); } LifetimeStartOpGenericAdaptorBase(LifetimeStartOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class LifetimeStartOpGenericAdaptor : public detail::LifetimeStartOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::LifetimeStartOpGenericAdaptorBase; static constexpr int odsIndex_ptr = 0; public: LifetimeStartOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} LifetimeStartOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : LifetimeStartOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} LifetimeStartOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : LifetimeStartOpGenericAdaptor(values, attrs, Properties{}, {}) {} LifetimeStartOpGenericAdaptor(RangeT values, const LifetimeStartOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> LifetimeStartOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getPtr() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class LifetimeStartOpAdaptor : public LifetimeStartOpGenericAdaptor<::mlir::ValueRange> { public: using LifetimeStartOpGenericAdaptor::LifetimeStartOpGenericAdaptor; LifetimeStartOpAdaptor(LifetimeStartOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class LifetimeStartOp : public ::mlir::Op { public: using Op::Op; using Op::print; using Adaptor = LifetimeStartOpAdaptor; template using GenericAdaptor = LifetimeStartOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_ptr = 0; using Properties = FoldAdaptor::Properties; using ::mlir::PromotableOpInterface::Trait::requiresReplacedValues; using ::mlir::PromotableOpInterface::Trait::visitReplacedValues; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.lifetime.start"); } std::pair 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::LLVM::LLVMPointerType> getPtr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getPtrMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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::Value ptr); static LifetimeStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr); static LifetimeStartOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr); static LifetimeStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr); static LifetimeStartOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LifetimeStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LifetimeStartOp 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 LifetimeStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static LifetimeStartOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); bool canUsesBeRemoved(const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout); ::mlir::DeletionKind removeBlockingUses(const ::llvm::SmallPtrSetImpl &blockingUses, ::mlir::OpBuilder &builder); static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result); void print(::mlir::OpAsmPrinter &_odsPrinter); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::LifetimeStartOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::LlrintOp declarations //===----------------------------------------------------------------------===// namespace detail { class LlrintOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: LlrintOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.llrint", odsAttrs.getContext()); } LlrintOpGenericAdaptorBase(LlrintOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class LlrintOpGenericAdaptor : public detail::LlrintOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::LlrintOpGenericAdaptorBase; static constexpr int odsIndex_val = 0; public: LlrintOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} LlrintOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : LlrintOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} LlrintOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : LlrintOpGenericAdaptor(values, attrs, Properties{}, {}) {} LlrintOpGenericAdaptor(RangeT values, const LlrintOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> LlrintOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getVal() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class LlrintOpAdaptor : public LlrintOpGenericAdaptor<::mlir::ValueRange> { public: using LlrintOpGenericAdaptor::LlrintOpGenericAdaptor; LlrintOpAdaptor(LlrintOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class LlrintOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = LlrintOpAdaptor; template using GenericAdaptor = LlrintOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_val = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.llrint"); } std::pair 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::Type> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 val); static LlrintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val); static LlrintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val); static LlrintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val); static LlrintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LlrintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LlrintOp 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 LlrintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static LlrintOp 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::LlrintOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::LlroundOp declarations //===----------------------------------------------------------------------===// namespace detail { class LlroundOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: LlroundOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.llround", odsAttrs.getContext()); } LlroundOpGenericAdaptorBase(LlroundOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class LlroundOpGenericAdaptor : public detail::LlroundOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::LlroundOpGenericAdaptorBase; static constexpr int odsIndex_val = 0; public: LlroundOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} LlroundOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : LlroundOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} LlroundOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : LlroundOpGenericAdaptor(values, attrs, Properties{}, {}) {} LlroundOpGenericAdaptor(RangeT values, const LlroundOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> LlroundOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getVal() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class LlroundOpAdaptor : public LlroundOpGenericAdaptor<::mlir::ValueRange> { public: using LlroundOpGenericAdaptor::LlroundOpGenericAdaptor; LlroundOpAdaptor(LlroundOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class LlroundOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = LlroundOpAdaptor; template using GenericAdaptor = LlroundOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_val = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.llround"); } std::pair 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::Type> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 val); static LlroundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val); static LlroundOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val); static LlroundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val); static LlroundOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LlroundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LlroundOp 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 LlroundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static LlroundOp 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::LlroundOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::LoadExpOp declarations //===----------------------------------------------------------------------===// namespace detail { class LoadExpOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: LoadExpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.ldexp", odsAttrs.getContext()); } LoadExpOpGenericAdaptorBase(LoadExpOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class LoadExpOpGenericAdaptor : public detail::LoadExpOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::LoadExpOpGenericAdaptorBase; static constexpr int odsIndex_val = 0; static constexpr int odsIndex_power = 1; public: LoadExpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} LoadExpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : LoadExpOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} LoadExpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : LoadExpOpGenericAdaptor(values, attrs, Properties{}, {}) {} LoadExpOpGenericAdaptor(RangeT values, const LoadExpOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> LoadExpOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getVal() { return (*getODSOperands(0).begin()); } ValueT getPower() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class LoadExpOpAdaptor : public LoadExpOpGenericAdaptor<::mlir::ValueRange> { public: using LoadExpOpGenericAdaptor::LoadExpOpGenericAdaptor; LoadExpOpAdaptor(LoadExpOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class LoadExpOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = LoadExpOpAdaptor; template using GenericAdaptor = LoadExpOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_val = 0; static constexpr int odsIndex_power = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.ldexp"); } std::pair 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::Type> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getPower() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getPowerMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static LoadExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static LoadExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static LoadExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static LoadExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static LoadExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static LoadExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static LoadExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static LoadExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LoadExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LoadExpOp 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 LoadExpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static LoadExpOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::LoadExpOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::LoadExpOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::Log10Op declarations //===----------------------------------------------------------------------===// namespace detail { class Log10OpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: Log10OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.log10", odsAttrs.getContext()); } Log10OpGenericAdaptorBase(Log10Op op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class Log10OpGenericAdaptor : public detail::Log10OpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::Log10OpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: Log10OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} Log10OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Log10OpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} Log10OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Log10OpGenericAdaptor(values, attrs, Properties{}, {}) {} Log10OpGenericAdaptor(RangeT values, const Log10OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> Log10OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class Log10OpAdaptor : public Log10OpGenericAdaptor<::mlir::ValueRange> { public: using Log10OpGenericAdaptor::Log10OpGenericAdaptor; Log10OpAdaptor(Log10Op op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class Log10Op : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = Log10OpAdaptor; template using GenericAdaptor = Log10OpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.log10"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Log10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Log10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Log10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Log10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Log10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Log10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Log10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Log10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Log10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Log10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Log10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Log10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Log10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Log10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Log10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Log10Op create(::mlir::ImplicitLocOpBuilder &builder, ::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 Log10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static Log10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static Log10Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static Log10Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::Log10Op) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::Log10OpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::Log2Op declarations //===----------------------------------------------------------------------===// namespace detail { class Log2OpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: Log2OpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.log2", odsAttrs.getContext()); } Log2OpGenericAdaptorBase(Log2Op op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class Log2OpGenericAdaptor : public detail::Log2OpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::Log2OpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: Log2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} Log2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : Log2OpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} Log2OpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : Log2OpGenericAdaptor(values, attrs, Properties{}, {}) {} Log2OpGenericAdaptor(RangeT values, const Log2OpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> Log2OpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class Log2OpAdaptor : public Log2OpGenericAdaptor<::mlir::ValueRange> { public: using Log2OpGenericAdaptor::Log2OpGenericAdaptor; Log2OpAdaptor(Log2Op op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class Log2Op : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = Log2OpAdaptor; template using GenericAdaptor = Log2OpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.log2"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::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 Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static Log2Op create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static Log2Op create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::Log2Op) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::Log2OpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::LogOp declarations //===----------------------------------------------------------------------===// namespace detail { class LogOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: LogOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.log", odsAttrs.getContext()); } LogOpGenericAdaptorBase(LogOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class LogOpGenericAdaptor : public detail::LogOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::LogOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: LogOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} LogOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : LogOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} LogOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : LogOpGenericAdaptor(values, attrs, Properties{}, {}) {} LogOpGenericAdaptor(RangeT values, const LogOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> LogOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class LogOpAdaptor : public LogOpGenericAdaptor<::mlir::ValueRange> { public: using LogOpGenericAdaptor::LogOpGenericAdaptor; LogOpAdaptor(LogOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class LogOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = LogOpAdaptor; template using GenericAdaptor = LogOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.log"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static LogOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static LogOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static LogOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static LogOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static LogOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static LogOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static LogOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static LogOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static LogOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static LogOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static LogOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static LogOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LogOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LogOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LogOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LogOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 LogOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static LogOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static LogOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static LogOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::LogOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::LogOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::LrintOp declarations //===----------------------------------------------------------------------===// namespace detail { class LrintOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: LrintOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.lrint", odsAttrs.getContext()); } LrintOpGenericAdaptorBase(LrintOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class LrintOpGenericAdaptor : public detail::LrintOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::LrintOpGenericAdaptorBase; static constexpr int odsIndex_val = 0; public: LrintOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} LrintOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : LrintOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} LrintOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : LrintOpGenericAdaptor(values, attrs, Properties{}, {}) {} LrintOpGenericAdaptor(RangeT values, const LrintOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> LrintOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getVal() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class LrintOpAdaptor : public LrintOpGenericAdaptor<::mlir::ValueRange> { public: using LrintOpGenericAdaptor::LrintOpGenericAdaptor; LrintOpAdaptor(LrintOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class LrintOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = LrintOpAdaptor; template using GenericAdaptor = LrintOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_val = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.lrint"); } std::pair 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::Type> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 val); static LrintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val); static LrintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val); static LrintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val); static LrintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LrintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LrintOp 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 LrintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static LrintOp 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::LrintOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::LroundOp declarations //===----------------------------------------------------------------------===// namespace detail { class LroundOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: LroundOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.lround", odsAttrs.getContext()); } LroundOpGenericAdaptorBase(LroundOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class LroundOpGenericAdaptor : public detail::LroundOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::LroundOpGenericAdaptorBase; static constexpr int odsIndex_val = 0; public: LroundOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} LroundOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : LroundOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} LroundOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : LroundOpGenericAdaptor(values, attrs, Properties{}, {}) {} LroundOpGenericAdaptor(RangeT values, const LroundOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> LroundOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getVal() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class LroundOpAdaptor : public LroundOpGenericAdaptor<::mlir::ValueRange> { public: using LroundOpGenericAdaptor::LroundOpGenericAdaptor; LroundOpAdaptor(LroundOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class LroundOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = LroundOpAdaptor; template using GenericAdaptor = LroundOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_val = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.lround"); } std::pair 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::Type> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 val); static LroundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val); static LroundOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val); static LroundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val); static LroundOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LroundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static LroundOp 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 LroundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static LroundOp 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::LroundOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::MaskedLoadOp declarations //===----------------------------------------------------------------------===// namespace detail { class MaskedLoadOpGenericAdaptorBase { public: struct Properties { using alignmentTy = ::mlir::IntegerAttr; alignmentTy alignment; auto getAlignment() const { auto &propStorage = this->alignment; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setAlignment(const ::mlir::IntegerAttr &propValue) { this->alignment = propValue; } using nontemporalTy = ::mlir::UnitAttr; nontemporalTy nontemporal; auto getNontemporal() const { auto &propStorage = this->nontemporal; return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(propStorage); } void setNontemporal(const ::mlir::UnitAttr &propValue) { this->nontemporal = propValue; } bool operator==(const Properties &rhs) const { return rhs.alignment == this->alignment && rhs.nontemporal == this->nontemporal && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: MaskedLoadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.masked.load", odsAttrs.getContext()); } MaskedLoadOpGenericAdaptorBase(MaskedLoadOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize); const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getAlignmentAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().alignment); return attr; } uint32_t getAlignment(); ::mlir::UnitAttr getNontemporalAttr(); bool getNontemporal(); }; } // namespace detail template class MaskedLoadOpGenericAdaptor : public detail::MaskedLoadOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::MaskedLoadOpGenericAdaptorBase; static constexpr int odsIndex_data = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_pass_thru = 2; public: MaskedLoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} MaskedLoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MaskedLoadOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} MaskedLoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MaskedLoadOpGenericAdaptor(values, attrs, Properties{}, {}) {} MaskedLoadOpGenericAdaptor(RangeT values, const MaskedLoadOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> MaskedLoadOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getData() { return (*getODSOperands(0).begin()); } ValueT getMask() { return (*getODSOperands(1).begin()); } ValueT getPassThru() { auto operands = getODSOperands(2); return operands.empty() ? ValueT{} : (*operands.begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class MaskedLoadOpAdaptor : public MaskedLoadOpGenericAdaptor<::mlir::ValueRange> { public: using MaskedLoadOpGenericAdaptor::MaskedLoadOpGenericAdaptor; MaskedLoadOpAdaptor(MaskedLoadOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class MaskedLoadOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = MaskedLoadOpAdaptor; template using GenericAdaptor = MaskedLoadOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_data = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_pass_thru = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("alignment"), ::llvm::StringRef("nontemporal")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getAlignmentAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getAlignmentAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getNontemporalAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getNontemporalAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.masked.load"); } std::pair getODSOperandIndexAndLength(unsigned index); ::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::LLVM::LLVMPointerType> getData() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getPassThru() { auto operands = getODSOperands(2); return operands.empty() ? ::mlir::TypedValue<::mlir::VectorType>{} : ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*operands.begin()); } ::mlir::OpOperand &getDataMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::MutableOperandRange getPassThruMutable(); std::pair 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getAlignmentAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().alignment); } uint32_t getAlignment(); ::mlir::UnitAttr getNontemporalAttr() { return ::llvm::dyn_cast_or_null<::mlir::UnitAttr>(getProperties().nontemporal); } bool getNontemporal(); void setAlignmentAttr(::mlir::IntegerAttr attr) { getProperties().alignment = attr; } void setAlignment(uint32_t attrValue); void setNontemporalAttr(::mlir::UnitAttr attr) { getProperties().nontemporal = attr; } void setNontemporal(bool attrValue); ::mlir::Attribute removeNontemporalAttr() { auto attr = getProperties().nontemporal; getProperties().nontemporal = {}; return attr; } static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, ::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal = nullptr); static MaskedLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, ::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal = nullptr); static MaskedLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, ::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal = nullptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, ::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal = nullptr); static MaskedLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, ::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal = nullptr); static MaskedLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, ::mlir::IntegerAttr alignment, /*optional*/::mlir::UnitAttr nontemporal = nullptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, uint32_t alignment, /*optional*/bool nontemporal = false); static MaskedLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, uint32_t alignment, /*optional*/bool nontemporal = false); static MaskedLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, uint32_t alignment, /*optional*/bool nontemporal = false); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, uint32_t alignment, /*optional*/bool nontemporal = false); static MaskedLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, uint32_t alignment, /*optional*/bool nontemporal = false); static MaskedLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value mask, /*optional*/::mlir::Value pass_thru, uint32_t alignment, /*optional*/bool nontemporal = false); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MaskedLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MaskedLoadOp 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 MaskedLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MaskedLoadOp 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 2 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::MaskedLoadOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MaskedLoadOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::MaskedStoreOp declarations //===----------------------------------------------------------------------===// namespace detail { class MaskedStoreOpGenericAdaptorBase { public: struct Properties { using alignmentTy = ::mlir::IntegerAttr; alignmentTy alignment; auto getAlignment() const { auto &propStorage = this->alignment; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setAlignment(const ::mlir::IntegerAttr &propValue) { this->alignment = propValue; } bool operator==(const Properties &rhs) const { return rhs.alignment == this->alignment && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: MaskedStoreOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.masked.store", odsAttrs.getContext()); } MaskedStoreOpGenericAdaptorBase(MaskedStoreOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getAlignmentAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().alignment); return attr; } uint32_t getAlignment(); }; } // namespace detail template class MaskedStoreOpGenericAdaptor : public detail::MaskedStoreOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::MaskedStoreOpGenericAdaptorBase; static constexpr int odsIndex_value = 0; static constexpr int odsIndex_data = 1; static constexpr int odsIndex_mask = 2; public: MaskedStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} MaskedStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MaskedStoreOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} MaskedStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MaskedStoreOpGenericAdaptor(values, attrs, Properties{}, {}) {} MaskedStoreOpGenericAdaptor(RangeT values, const MaskedStoreOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> MaskedStoreOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getValue() { return (*getODSOperands(0).begin()); } ValueT getData() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class MaskedStoreOpAdaptor : public MaskedStoreOpGenericAdaptor<::mlir::ValueRange> { public: using MaskedStoreOpGenericAdaptor::MaskedStoreOpGenericAdaptor; MaskedStoreOpAdaptor(MaskedStoreOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class MaskedStoreOp : public ::mlir::Op::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = MaskedStoreOpAdaptor; template using GenericAdaptor = MaskedStoreOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_value = 0; static constexpr int odsIndex_data = 1; static constexpr int odsIndex_mask = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("alignment")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getAlignmentAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getAlignmentAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.masked.store"); } std::pair 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> getValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getData() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getDataMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getAlignmentAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().alignment); } uint32_t getAlignment(); void setAlignmentAttr(::mlir::IntegerAttr attr) { getProperties().alignment = attr; } void setAlignment(uint32_t attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operands, ArrayRef attributes = {}); static MaskedStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operands, ArrayRef attributes = {}); static MaskedStoreOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operands, ArrayRef attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ValueRange operands, ArrayRef attributes = {}); static MaskedStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ValueRange operands, ArrayRef attributes = {}); static MaskedStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ValueRange operands, ArrayRef attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, ::mlir::IntegerAttr alignment); static MaskedStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, ::mlir::IntegerAttr alignment); static MaskedStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, ::mlir::IntegerAttr alignment); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, ::mlir::IntegerAttr alignment); static MaskedStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, ::mlir::IntegerAttr alignment); static MaskedStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, ::mlir::IntegerAttr alignment); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, uint32_t alignment); static MaskedStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, uint32_t alignment); static MaskedStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, uint32_t alignment); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, uint32_t alignment); static MaskedStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, uint32_t alignment); static MaskedStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value data, ::mlir::Value mask, uint32_t alignment); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MaskedStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MaskedStoreOp 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 MaskedStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MaskedStoreOp 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::MaskedStoreOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MaskedStoreOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::MatrixColumnMajorLoadOp declarations //===----------------------------------------------------------------------===// namespace detail { class MatrixColumnMajorLoadOpGenericAdaptorBase { public: struct Properties { using columnsTy = ::mlir::IntegerAttr; columnsTy columns; auto getColumns() const { auto &propStorage = this->columns; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setColumns(const ::mlir::IntegerAttr &propValue) { this->columns = propValue; } using isVolatileTy = ::mlir::IntegerAttr; isVolatileTy isVolatile; auto getIsVolatile() const { auto &propStorage = this->isVolatile; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setIsVolatile(const ::mlir::IntegerAttr &propValue) { this->isVolatile = propValue; } using rowsTy = ::mlir::IntegerAttr; rowsTy rows; auto getRows() const { auto &propStorage = this->rows; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setRows(const ::mlir::IntegerAttr &propValue) { this->rows = propValue; } bool operator==(const Properties &rhs) const { return rhs.columns == this->columns && rhs.isVolatile == this->isVolatile && rhs.rows == this->rows && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: MatrixColumnMajorLoadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.matrix.column.major.load", odsAttrs.getContext()); } MatrixColumnMajorLoadOpGenericAdaptorBase(MatrixColumnMajorLoadOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getIsVolatileAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().isVolatile); return attr; } bool getIsVolatile(); ::mlir::IntegerAttr getRowsAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().rows); return attr; } uint32_t getRows(); ::mlir::IntegerAttr getColumnsAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().columns); return attr; } uint32_t getColumns(); }; } // namespace detail template class MatrixColumnMajorLoadOpGenericAdaptor : public detail::MatrixColumnMajorLoadOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::MatrixColumnMajorLoadOpGenericAdaptorBase; static constexpr int odsIndex_data = 0; static constexpr int odsIndex_stride = 1; public: MatrixColumnMajorLoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} MatrixColumnMajorLoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MatrixColumnMajorLoadOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} MatrixColumnMajorLoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MatrixColumnMajorLoadOpGenericAdaptor(values, attrs, Properties{}, {}) {} MatrixColumnMajorLoadOpGenericAdaptor(RangeT values, const MatrixColumnMajorLoadOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> MatrixColumnMajorLoadOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getData() { return (*getODSOperands(0).begin()); } ValueT getStride() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class MatrixColumnMajorLoadOpAdaptor : public MatrixColumnMajorLoadOpGenericAdaptor<::mlir::ValueRange> { public: using MatrixColumnMajorLoadOpGenericAdaptor::MatrixColumnMajorLoadOpGenericAdaptor; MatrixColumnMajorLoadOpAdaptor(MatrixColumnMajorLoadOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class MatrixColumnMajorLoadOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = MatrixColumnMajorLoadOpAdaptor; template using GenericAdaptor = MatrixColumnMajorLoadOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_data = 0; static constexpr int odsIndex_stride = 1; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("columns"), ::llvm::StringRef("isVolatile"), ::llvm::StringRef("rows")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getColumnsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getColumnsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getIsVolatileAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getIsVolatileAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } ::mlir::StringAttr getRowsAttrName() { return getAttributeNameForIndex(2); } static ::mlir::StringAttr getRowsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 2); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.matrix.column.major.load"); } std::pair 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::LLVM::LLVMPointerType> getData() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getStride() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getDataMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getStrideMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getIsVolatileAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().isVolatile); } bool getIsVolatile(); ::mlir::IntegerAttr getRowsAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().rows); } uint32_t getRows(); ::mlir::IntegerAttr getColumnsAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().columns); } uint32_t getColumns(); void setIsVolatileAttr(::mlir::IntegerAttr attr) { getProperties().isVolatile = attr; } void setIsVolatile(bool attrValue); void setRowsAttr(::mlir::IntegerAttr attr) { getProperties().rows = attr; } void setRows(uint32_t attrValue); void setColumnsAttr(::mlir::IntegerAttr attr) { getProperties().columns = attr; } void setColumns(uint32_t attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operands, ArrayRef attributes = {}); static MatrixColumnMajorLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operands, ArrayRef attributes = {}); static MatrixColumnMajorLoadOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operands, ArrayRef attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static MatrixColumnMajorLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static MatrixColumnMajorLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static MatrixColumnMajorLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static MatrixColumnMajorLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns); static MatrixColumnMajorLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns); static MatrixColumnMajorLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns); static MatrixColumnMajorLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns); static MatrixColumnMajorLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MatrixColumnMajorLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MatrixColumnMajorLoadOp 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 MatrixColumnMajorLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MatrixColumnMajorLoadOp 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 3 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::MatrixColumnMajorLoadOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MatrixColumnMajorLoadOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::MatrixColumnMajorStoreOp declarations //===----------------------------------------------------------------------===// namespace detail { class MatrixColumnMajorStoreOpGenericAdaptorBase { public: struct Properties { using columnsTy = ::mlir::IntegerAttr; columnsTy columns; auto getColumns() const { auto &propStorage = this->columns; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setColumns(const ::mlir::IntegerAttr &propValue) { this->columns = propValue; } using isVolatileTy = ::mlir::IntegerAttr; isVolatileTy isVolatile; auto getIsVolatile() const { auto &propStorage = this->isVolatile; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setIsVolatile(const ::mlir::IntegerAttr &propValue) { this->isVolatile = propValue; } using rowsTy = ::mlir::IntegerAttr; rowsTy rows; auto getRows() const { auto &propStorage = this->rows; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setRows(const ::mlir::IntegerAttr &propValue) { this->rows = propValue; } bool operator==(const Properties &rhs) const { return rhs.columns == this->columns && rhs.isVolatile == this->isVolatile && rhs.rows == this->rows && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: MatrixColumnMajorStoreOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.matrix.column.major.store", odsAttrs.getContext()); } MatrixColumnMajorStoreOpGenericAdaptorBase(MatrixColumnMajorStoreOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getIsVolatileAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().isVolatile); return attr; } bool getIsVolatile(); ::mlir::IntegerAttr getRowsAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().rows); return attr; } uint32_t getRows(); ::mlir::IntegerAttr getColumnsAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().columns); return attr; } uint32_t getColumns(); }; } // namespace detail template class MatrixColumnMajorStoreOpGenericAdaptor : public detail::MatrixColumnMajorStoreOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::MatrixColumnMajorStoreOpGenericAdaptorBase; static constexpr int odsIndex_matrix = 0; static constexpr int odsIndex_data = 1; static constexpr int odsIndex_stride = 2; public: MatrixColumnMajorStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} MatrixColumnMajorStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MatrixColumnMajorStoreOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} MatrixColumnMajorStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MatrixColumnMajorStoreOpGenericAdaptor(values, attrs, Properties{}, {}) {} MatrixColumnMajorStoreOpGenericAdaptor(RangeT values, const MatrixColumnMajorStoreOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> MatrixColumnMajorStoreOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getMatrix() { return (*getODSOperands(0).begin()); } ValueT getData() { return (*getODSOperands(1).begin()); } ValueT getStride() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class MatrixColumnMajorStoreOpAdaptor : public MatrixColumnMajorStoreOpGenericAdaptor<::mlir::ValueRange> { public: using MatrixColumnMajorStoreOpGenericAdaptor::MatrixColumnMajorStoreOpGenericAdaptor; MatrixColumnMajorStoreOpAdaptor(MatrixColumnMajorStoreOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class MatrixColumnMajorStoreOp : public ::mlir::Op::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = MatrixColumnMajorStoreOpAdaptor; template using GenericAdaptor = MatrixColumnMajorStoreOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_matrix = 0; static constexpr int odsIndex_data = 1; static constexpr int odsIndex_stride = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("columns"), ::llvm::StringRef("isVolatile"), ::llvm::StringRef("rows")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getColumnsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getColumnsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getIsVolatileAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getIsVolatileAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } ::mlir::StringAttr getRowsAttrName() { return getAttributeNameForIndex(2); } static ::mlir::StringAttr getRowsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 2); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.matrix.column.major.store"); } std::pair 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> getMatrix() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getData() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getStride() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getMatrixMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getDataMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getStrideMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getIsVolatileAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().isVolatile); } bool getIsVolatile(); ::mlir::IntegerAttr getRowsAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().rows); } uint32_t getRows(); ::mlir::IntegerAttr getColumnsAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().columns); } uint32_t getColumns(); void setIsVolatileAttr(::mlir::IntegerAttr attr) { getProperties().isVolatile = attr; } void setIsVolatile(bool attrValue); void setRowsAttr(::mlir::IntegerAttr attr) { getProperties().rows = attr; } void setRows(uint32_t attrValue); void setColumnsAttr(::mlir::IntegerAttr attr) { getProperties().columns = attr; } void setColumns(uint32_t attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operands, ArrayRef attributes = {}); static MatrixColumnMajorStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operands, ArrayRef attributes = {}); static MatrixColumnMajorStoreOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operands, ArrayRef attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ValueRange operands, ArrayRef attributes = {}); static MatrixColumnMajorStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ValueRange operands, ArrayRef attributes = {}); static MatrixColumnMajorStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ValueRange operands, ArrayRef attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static MatrixColumnMajorStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static MatrixColumnMajorStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static MatrixColumnMajorStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static MatrixColumnMajorStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, ::mlir::IntegerAttr isVolatile, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns); static MatrixColumnMajorStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns); static MatrixColumnMajorStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns); static MatrixColumnMajorStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns); static MatrixColumnMajorStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::Value data, ::mlir::Value stride, bool isVolatile, uint32_t rows, uint32_t columns); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MatrixColumnMajorStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MatrixColumnMajorStoreOp 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 MatrixColumnMajorStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MatrixColumnMajorStoreOp 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 3 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::MatrixColumnMajorStoreOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MatrixColumnMajorStoreOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::MatrixMultiplyOp declarations //===----------------------------------------------------------------------===// namespace detail { class MatrixMultiplyOpGenericAdaptorBase { public: struct Properties { using lhs_columnsTy = ::mlir::IntegerAttr; lhs_columnsTy lhs_columns; auto getLhsColumns() const { auto &propStorage = this->lhs_columns; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setLhsColumns(const ::mlir::IntegerAttr &propValue) { this->lhs_columns = propValue; } using lhs_rowsTy = ::mlir::IntegerAttr; lhs_rowsTy lhs_rows; auto getLhsRows() const { auto &propStorage = this->lhs_rows; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setLhsRows(const ::mlir::IntegerAttr &propValue) { this->lhs_rows = propValue; } using rhs_columnsTy = ::mlir::IntegerAttr; rhs_columnsTy rhs_columns; auto getRhsColumns() const { auto &propStorage = this->rhs_columns; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setRhsColumns(const ::mlir::IntegerAttr &propValue) { this->rhs_columns = propValue; } bool operator==(const Properties &rhs) const { return rhs.lhs_columns == this->lhs_columns && rhs.lhs_rows == this->lhs_rows && rhs.rhs_columns == this->rhs_columns && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: MatrixMultiplyOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.matrix.multiply", odsAttrs.getContext()); } MatrixMultiplyOpGenericAdaptorBase(MatrixMultiplyOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getLhsRowsAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().lhs_rows); return attr; } uint32_t getLhsRows(); ::mlir::IntegerAttr getLhsColumnsAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().lhs_columns); return attr; } uint32_t getLhsColumns(); ::mlir::IntegerAttr getRhsColumnsAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().rhs_columns); return attr; } uint32_t getRhsColumns(); }; } // namespace detail template class MatrixMultiplyOpGenericAdaptor : public detail::MatrixMultiplyOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::MatrixMultiplyOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; public: MatrixMultiplyOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} MatrixMultiplyOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MatrixMultiplyOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} MatrixMultiplyOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MatrixMultiplyOpGenericAdaptor(values, attrs, Properties{}, {}) {} MatrixMultiplyOpGenericAdaptor(RangeT values, const MatrixMultiplyOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> MatrixMultiplyOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class MatrixMultiplyOpAdaptor : public MatrixMultiplyOpGenericAdaptor<::mlir::ValueRange> { public: using MatrixMultiplyOpGenericAdaptor::MatrixMultiplyOpGenericAdaptor; MatrixMultiplyOpAdaptor(MatrixMultiplyOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class MatrixMultiplyOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = MatrixMultiplyOpAdaptor; template using GenericAdaptor = MatrixMultiplyOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("lhs_columns"), ::llvm::StringRef("lhs_rows"), ::llvm::StringRef("rhs_columns")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getLhsColumnsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getLhsColumnsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getLhsRowsAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getLhsRowsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } ::mlir::StringAttr getRhsColumnsAttrName() { return getAttributeNameForIndex(2); } static ::mlir::StringAttr getRhsColumnsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 2); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.matrix.multiply"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getLhsRowsAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().lhs_rows); } uint32_t getLhsRows(); ::mlir::IntegerAttr getLhsColumnsAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().lhs_columns); } uint32_t getLhsColumns(); ::mlir::IntegerAttr getRhsColumnsAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().rhs_columns); } uint32_t getRhsColumns(); void setLhsRowsAttr(::mlir::IntegerAttr attr) { getProperties().lhs_rows = attr; } void setLhsRows(uint32_t attrValue); void setLhsColumnsAttr(::mlir::IntegerAttr attr) { getProperties().lhs_columns = attr; } void setLhsColumns(uint32_t attrValue); void setRhsColumnsAttr(::mlir::IntegerAttr attr) { getProperties().rhs_columns = attr; } void setRhsColumns(uint32_t attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operands, ArrayRef attributes = {}); static MatrixMultiplyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operands, ArrayRef attributes = {}); static MatrixMultiplyOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operands, ArrayRef attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::IntegerAttr lhs_rows, ::mlir::IntegerAttr lhs_columns, ::mlir::IntegerAttr rhs_columns); static MatrixMultiplyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::IntegerAttr lhs_rows, ::mlir::IntegerAttr lhs_columns, ::mlir::IntegerAttr rhs_columns); static MatrixMultiplyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::IntegerAttr lhs_rows, ::mlir::IntegerAttr lhs_columns, ::mlir::IntegerAttr rhs_columns); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::IntegerAttr lhs_rows, ::mlir::IntegerAttr lhs_columns, ::mlir::IntegerAttr rhs_columns); static MatrixMultiplyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::IntegerAttr lhs_rows, ::mlir::IntegerAttr lhs_columns, ::mlir::IntegerAttr rhs_columns); static MatrixMultiplyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::IntegerAttr lhs_rows, ::mlir::IntegerAttr lhs_columns, ::mlir::IntegerAttr rhs_columns); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, uint32_t lhs_rows, uint32_t lhs_columns, uint32_t rhs_columns); static MatrixMultiplyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, uint32_t lhs_rows, uint32_t lhs_columns, uint32_t rhs_columns); static MatrixMultiplyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, uint32_t lhs_rows, uint32_t lhs_columns, uint32_t rhs_columns); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, uint32_t lhs_rows, uint32_t lhs_columns, uint32_t rhs_columns); static MatrixMultiplyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, uint32_t lhs_rows, uint32_t lhs_columns, uint32_t rhs_columns); static MatrixMultiplyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, uint32_t lhs_rows, uint32_t lhs_columns, uint32_t rhs_columns); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MatrixMultiplyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MatrixMultiplyOp 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 MatrixMultiplyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MatrixMultiplyOp 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 3 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::MatrixMultiplyOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MatrixMultiplyOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::MatrixTransposeOp declarations //===----------------------------------------------------------------------===// namespace detail { class MatrixTransposeOpGenericAdaptorBase { public: struct Properties { using columnsTy = ::mlir::IntegerAttr; columnsTy columns; auto getColumns() const { auto &propStorage = this->columns; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setColumns(const ::mlir::IntegerAttr &propValue) { this->columns = propValue; } using rowsTy = ::mlir::IntegerAttr; rowsTy rows; auto getRows() const { auto &propStorage = this->rows; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setRows(const ::mlir::IntegerAttr &propValue) { this->rows = propValue; } bool operator==(const Properties &rhs) const { return rhs.columns == this->columns && rhs.rows == this->rows && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: MatrixTransposeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.matrix.transpose", odsAttrs.getContext()); } MatrixTransposeOpGenericAdaptorBase(MatrixTransposeOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getRowsAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().rows); return attr; } uint32_t getRows(); ::mlir::IntegerAttr getColumnsAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().columns); return attr; } uint32_t getColumns(); }; } // namespace detail template class MatrixTransposeOpGenericAdaptor : public detail::MatrixTransposeOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::MatrixTransposeOpGenericAdaptorBase; static constexpr int odsIndex_matrix = 0; public: MatrixTransposeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} MatrixTransposeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MatrixTransposeOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} MatrixTransposeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MatrixTransposeOpGenericAdaptor(values, attrs, Properties{}, {}) {} MatrixTransposeOpGenericAdaptor(RangeT values, const MatrixTransposeOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> MatrixTransposeOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getMatrix() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class MatrixTransposeOpAdaptor : public MatrixTransposeOpGenericAdaptor<::mlir::ValueRange> { public: using MatrixTransposeOpGenericAdaptor::MatrixTransposeOpGenericAdaptor; MatrixTransposeOpAdaptor(MatrixTransposeOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class MatrixTransposeOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = MatrixTransposeOpAdaptor; template using GenericAdaptor = MatrixTransposeOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_matrix = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("columns"), ::llvm::StringRef("rows")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getColumnsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getColumnsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getRowsAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getRowsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.matrix.transpose"); } std::pair 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> getMatrix() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getMatrixMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getRowsAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().rows); } uint32_t getRows(); ::mlir::IntegerAttr getColumnsAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().columns); } uint32_t getColumns(); void setRowsAttr(::mlir::IntegerAttr attr) { getProperties().rows = attr; } void setRows(uint32_t attrValue); void setColumnsAttr(::mlir::IntegerAttr attr) { getProperties().columns = attr; } void setColumns(uint32_t attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operands, ArrayRef attributes = {}); static MatrixTransposeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operands, ArrayRef attributes = {}); static MatrixTransposeOp create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operands, ArrayRef attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value matrix, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static MatrixTransposeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value matrix, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static MatrixTransposeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value matrix, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static MatrixTransposeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static MatrixTransposeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, ::mlir::IntegerAttr rows, ::mlir::IntegerAttr columns); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value matrix, uint32_t rows, uint32_t columns); static MatrixTransposeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value matrix, uint32_t rows, uint32_t columns); static MatrixTransposeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value matrix, uint32_t rows, uint32_t columns); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, uint32_t rows, uint32_t columns); static MatrixTransposeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, uint32_t rows, uint32_t columns); static MatrixTransposeOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value matrix, uint32_t rows, uint32_t columns); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MatrixTransposeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MatrixTransposeOp 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 MatrixTransposeOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MatrixTransposeOp 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 2 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::MatrixTransposeOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MatrixTransposeOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::MaxNumOp declarations //===----------------------------------------------------------------------===// namespace detail { class MaxNumOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: MaxNumOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.maxnum", odsAttrs.getContext()); } MaxNumOpGenericAdaptorBase(MaxNumOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class MaxNumOpGenericAdaptor : public detail::MaxNumOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::MaxNumOpGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: MaxNumOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} MaxNumOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MaxNumOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} MaxNumOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MaxNumOpGenericAdaptor(values, attrs, Properties{}, {}) {} MaxNumOpGenericAdaptor(RangeT values, const MaxNumOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> MaxNumOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 MaxNumOpAdaptor : public MaxNumOpGenericAdaptor<::mlir::ValueRange> { public: using MaxNumOpGenericAdaptor::MaxNumOpGenericAdaptor; MaxNumOpAdaptor(MaxNumOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class MaxNumOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = MaxNumOpAdaptor; template using GenericAdaptor = MaxNumOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.maxnum"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MaxNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MaxNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MaxNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MaxNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MaxNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MaxNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MaxNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MaxNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MaxNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MaxNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MaxNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MaxNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MaxNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MaxNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MaxNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MaxNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 MaxNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MaxNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MaxNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MaxNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::MaxNumOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MaxNumOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::MaximumOp declarations //===----------------------------------------------------------------------===// namespace detail { class MaximumOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: MaximumOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.maximum", odsAttrs.getContext()); } MaximumOpGenericAdaptorBase(MaximumOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class MaximumOpGenericAdaptor : public detail::MaximumOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::MaximumOpGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: MaximumOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} MaximumOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MaximumOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} MaximumOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MaximumOpGenericAdaptor(values, attrs, Properties{}, {}) {} MaximumOpGenericAdaptor(RangeT values, const MaximumOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> MaximumOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 MaximumOpAdaptor : public MaximumOpGenericAdaptor<::mlir::ValueRange> { public: using MaximumOpGenericAdaptor::MaximumOpGenericAdaptor; MaximumOpAdaptor(MaximumOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class MaximumOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = MaximumOpAdaptor; template using GenericAdaptor = MaximumOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.maximum"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MaximumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MaximumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MaximumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MaximumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MaximumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MaximumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MaximumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MaximumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MaximumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MaximumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MaximumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MaximumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MaximumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MaximumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MaximumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MaximumOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 MaximumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MaximumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MaximumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MaximumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::MaximumOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MaximumOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::MemcpyInlineOp declarations //===----------------------------------------------------------------------===// namespace detail { class MemcpyInlineOpGenericAdaptorBase { public: struct Properties { using access_groupsTy = ::mlir::ArrayAttr; access_groupsTy access_groups; auto getAccessGroups() const { auto &propStorage = this->access_groups; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setAccessGroups(const ::mlir::ArrayAttr &propValue) { this->access_groups = propValue; } using alias_scopesTy = ::mlir::ArrayAttr; alias_scopesTy alias_scopes; auto getAliasScopes() const { auto &propStorage = this->alias_scopes; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setAliasScopes(const ::mlir::ArrayAttr &propValue) { this->alias_scopes = propValue; } using arg_attrsTy = ::mlir::ArrayAttr; arg_attrsTy arg_attrs; auto getArgAttrs() const { auto &propStorage = this->arg_attrs; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setArgAttrs(const ::mlir::ArrayAttr &propValue) { this->arg_attrs = propValue; } using isVolatileTy = ::mlir::IntegerAttr; isVolatileTy isVolatile; auto getIsVolatile() const { auto &propStorage = this->isVolatile; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setIsVolatile(const ::mlir::IntegerAttr &propValue) { this->isVolatile = propValue; } using lenTy = ::mlir::IntegerAttr; lenTy len; auto getLen() const { auto &propStorage = this->len; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setLen(const ::mlir::IntegerAttr &propValue) { this->len = propValue; } using noalias_scopesTy = ::mlir::ArrayAttr; noalias_scopesTy noalias_scopes; auto getNoaliasScopes() const { auto &propStorage = this->noalias_scopes; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setNoaliasScopes(const ::mlir::ArrayAttr &propValue) { this->noalias_scopes = propValue; } using res_attrsTy = ::mlir::ArrayAttr; res_attrsTy res_attrs; auto getResAttrs() const { auto &propStorage = this->res_attrs; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setResAttrs(const ::mlir::ArrayAttr &propValue) { this->res_attrs = propValue; } using tbaaTy = ::mlir::ArrayAttr; tbaaTy tbaa; auto getTbaa() const { auto &propStorage = this->tbaa; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setTbaa(const ::mlir::ArrayAttr &propValue) { this->tbaa = propValue; } bool operator==(const Properties &rhs) const { return rhs.access_groups == this->access_groups && rhs.alias_scopes == this->alias_scopes && rhs.arg_attrs == this->arg_attrs && rhs.isVolatile == this->isVolatile && rhs.len == this->len && rhs.noalias_scopes == this->noalias_scopes && rhs.res_attrs == this->res_attrs && rhs.tbaa == this->tbaa && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: MemcpyInlineOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.memcpy.inline", odsAttrs.getContext()); } MemcpyInlineOpGenericAdaptorBase(MemcpyInlineOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getLenAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().len); return attr; } ::mlir::APInt getLen(); ::mlir::IntegerAttr getIsVolatileAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().isVolatile); return attr; } bool getIsVolatile(); ::mlir::ArrayAttr getAccessGroupsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().access_groups); return attr; } ::std::optional< ::mlir::ArrayAttr > getAccessGroups(); ::mlir::ArrayAttr getAliasScopesAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().alias_scopes); return attr; } ::std::optional< ::mlir::ArrayAttr > getAliasScopes(); ::mlir::ArrayAttr getNoaliasScopesAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().noalias_scopes); return attr; } ::std::optional< ::mlir::ArrayAttr > getNoaliasScopes(); ::mlir::ArrayAttr getTbaaAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().tbaa); return attr; } ::std::optional< ::mlir::ArrayAttr > getTbaa(); ::mlir::ArrayAttr getArgAttrsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs); return attr; } ::std::optional< ::mlir::ArrayAttr > getArgAttrs(); ::mlir::ArrayAttr getResAttrsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs); return attr; } ::std::optional< ::mlir::ArrayAttr > getResAttrs(); }; } // namespace detail template class MemcpyInlineOpGenericAdaptor : public detail::MemcpyInlineOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::MemcpyInlineOpGenericAdaptorBase; static constexpr int odsIndex_dst = 0; static constexpr int odsIndex_src = 1; public: MemcpyInlineOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} MemcpyInlineOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MemcpyInlineOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} MemcpyInlineOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MemcpyInlineOpGenericAdaptor(values, attrs, Properties{}, {}) {} MemcpyInlineOpGenericAdaptor(RangeT values, const MemcpyInlineOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> MemcpyInlineOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getDst() { return (*getODSOperands(0).begin()); } ValueT getSrc() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class MemcpyInlineOpAdaptor : public MemcpyInlineOpGenericAdaptor<::mlir::ValueRange> { public: using MemcpyInlineOpGenericAdaptor::MemcpyInlineOpGenericAdaptor; MemcpyInlineOpAdaptor(MemcpyInlineOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class MemcpyInlineOp : public ::mlir::Op::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::AccessGroupOpInterface::Trait, ::mlir::LLVM::AliasAnalysisOpInterface::Trait, ::mlir::ArgAndResultAttrsOpInterface::Trait, ::mlir::PromotableMemOpInterface::Trait, ::mlir::DestructurableAccessorOpInterface::Trait, ::mlir::SafeMemorySlotAccessOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = MemcpyInlineOpAdaptor; template using GenericAdaptor = MemcpyInlineOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_dst = 0; static constexpr int odsIndex_src = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::AccessGroupOpInterface::Trait::getAccessGroupsOrNull; using ::mlir::LLVM::AccessGroupOpInterface::Trait::setAccessGroups; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::getAliasScopesOrNull; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::setAliasScopes; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::getNoAliasScopesOrNull; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::setNoAliasScopes; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::getTBAATagsOrNull; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::setTBAATags; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("access_groups"), ::llvm::StringRef("alias_scopes"), ::llvm::StringRef("arg_attrs"), ::llvm::StringRef("isVolatile"), ::llvm::StringRef("len"), ::llvm::StringRef("noalias_scopes"), ::llvm::StringRef("res_attrs"), ::llvm::StringRef("tbaa")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getAccessGroupsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getAccessGroupsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getAliasScopesAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getAliasScopesAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } ::mlir::StringAttr getArgAttrsAttrName() { return getAttributeNameForIndex(2); } static ::mlir::StringAttr getArgAttrsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 2); } ::mlir::StringAttr getIsVolatileAttrName() { return getAttributeNameForIndex(3); } static ::mlir::StringAttr getIsVolatileAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 3); } ::mlir::StringAttr getLenAttrName() { return getAttributeNameForIndex(4); } static ::mlir::StringAttr getLenAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 4); } ::mlir::StringAttr getNoaliasScopesAttrName() { return getAttributeNameForIndex(5); } static ::mlir::StringAttr getNoaliasScopesAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 5); } ::mlir::StringAttr getResAttrsAttrName() { return getAttributeNameForIndex(6); } static ::mlir::StringAttr getResAttrsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 6); } ::mlir::StringAttr getTbaaAttrName() { return getAttributeNameForIndex(7); } static ::mlir::StringAttr getTbaaAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 7); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.memcpy.inline"); } std::pair 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::LLVM::LLVMPointerType> getDst() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getSrc() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getDstMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getSrcMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getLenAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().len); } ::mlir::APInt getLen(); ::mlir::IntegerAttr getIsVolatileAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().isVolatile); } bool getIsVolatile(); ::mlir::ArrayAttr getAccessGroupsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().access_groups); } ::std::optional< ::mlir::ArrayAttr > getAccessGroups(); ::mlir::ArrayAttr getAliasScopesAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().alias_scopes); } ::std::optional< ::mlir::ArrayAttr > getAliasScopes(); ::mlir::ArrayAttr getNoaliasScopesAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().noalias_scopes); } ::std::optional< ::mlir::ArrayAttr > getNoaliasScopes(); ::mlir::ArrayAttr getTbaaAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().tbaa); } ::std::optional< ::mlir::ArrayAttr > getTbaa(); ::mlir::ArrayAttr getArgAttrsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs); } ::std::optional< ::mlir::ArrayAttr > getArgAttrs(); ::mlir::ArrayAttr getResAttrsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs); } ::std::optional< ::mlir::ArrayAttr > getResAttrs(); void setLenAttr(::mlir::IntegerAttr attr) { getProperties().len = attr; } void setIsVolatileAttr(::mlir::IntegerAttr attr) { getProperties().isVolatile = attr; } void setIsVolatile(bool attrValue); void setAccessGroupsAttr(::mlir::ArrayAttr attr) { getProperties().access_groups = attr; } void setAliasScopesAttr(::mlir::ArrayAttr attr) { getProperties().alias_scopes = attr; } void setNoaliasScopesAttr(::mlir::ArrayAttr attr) { getProperties().noalias_scopes = attr; } void setTbaaAttr(::mlir::ArrayAttr attr) { getProperties().tbaa = attr; } void setArgAttrsAttr(::mlir::ArrayAttr attr) { getProperties().arg_attrs = attr; } void setResAttrsAttr(::mlir::ArrayAttr attr) { getProperties().res_attrs = attr; } ::mlir::Attribute removeAccessGroupsAttr() { auto attr = getProperties().access_groups; getProperties().access_groups = {}; return attr; } ::mlir::Attribute removeAliasScopesAttr() { auto attr = getProperties().alias_scopes; getProperties().alias_scopes = {}; return attr; } ::mlir::Attribute removeNoaliasScopesAttr() { auto attr = getProperties().noalias_scopes; getProperties().noalias_scopes = {}; return attr; } ::mlir::Attribute removeTbaaAttr() { auto attr = getProperties().tbaa; getProperties().tbaa = {}; return attr; } ::mlir::Attribute removeArgAttrsAttr() { auto attr = getProperties().arg_attrs; getProperties().arg_attrs = {}; return attr; } ::mlir::Attribute removeResAttrsAttr() { auto attr = getProperties().res_attrs; getProperties().res_attrs = {}; return attr; } static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value dst, Value src, IntegerAttr len, bool isVolatile); static MemcpyInlineOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value dst, Value src, IntegerAttr len, bool isVolatile); static MemcpyInlineOp create(::mlir::ImplicitLocOpBuilder &builder, Value dst, Value src, IntegerAttr len, bool isVolatile); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value dst, Value src, IntegerAttr len, IntegerAttr isVolatile); static MemcpyInlineOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value dst, Value src, IntegerAttr len, IntegerAttr isVolatile); static MemcpyInlineOp create(::mlir::ImplicitLocOpBuilder &builder, Value dst, Value src, IntegerAttr len, IntegerAttr isVolatile); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemcpyInlineOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemcpyInlineOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemcpyInlineOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemcpyInlineOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemcpyInlineOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemcpyInlineOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemcpyInlineOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemcpyInlineOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::IntegerAttr len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MemcpyInlineOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MemcpyInlineOp 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 MemcpyInlineOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MemcpyInlineOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); ::llvm::SmallVector<::mlir::Value> getAccessedOperands(); bool loadsFrom(const ::mlir::MemorySlot &slot); bool storesTo(const ::mlir::MemorySlot &slot); ::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout); bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout); ::mlir::DeletionKind removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout); bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout); ::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout); ::llvm::LogicalResult ensureOnlySafeAccesses(const ::mlir::MemorySlot &slot, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout); static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 8 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::MemcpyInlineOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MemcpyInlineOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::MemcpyOp declarations //===----------------------------------------------------------------------===// namespace detail { class MemcpyOpGenericAdaptorBase { public: struct Properties { using access_groupsTy = ::mlir::ArrayAttr; access_groupsTy access_groups; auto getAccessGroups() const { auto &propStorage = this->access_groups; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setAccessGroups(const ::mlir::ArrayAttr &propValue) { this->access_groups = propValue; } using alias_scopesTy = ::mlir::ArrayAttr; alias_scopesTy alias_scopes; auto getAliasScopes() const { auto &propStorage = this->alias_scopes; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setAliasScopes(const ::mlir::ArrayAttr &propValue) { this->alias_scopes = propValue; } using arg_attrsTy = ::mlir::ArrayAttr; arg_attrsTy arg_attrs; auto getArgAttrs() const { auto &propStorage = this->arg_attrs; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setArgAttrs(const ::mlir::ArrayAttr &propValue) { this->arg_attrs = propValue; } using isVolatileTy = ::mlir::IntegerAttr; isVolatileTy isVolatile; auto getIsVolatile() const { auto &propStorage = this->isVolatile; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setIsVolatile(const ::mlir::IntegerAttr &propValue) { this->isVolatile = propValue; } using noalias_scopesTy = ::mlir::ArrayAttr; noalias_scopesTy noalias_scopes; auto getNoaliasScopes() const { auto &propStorage = this->noalias_scopes; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setNoaliasScopes(const ::mlir::ArrayAttr &propValue) { this->noalias_scopes = propValue; } using res_attrsTy = ::mlir::ArrayAttr; res_attrsTy res_attrs; auto getResAttrs() const { auto &propStorage = this->res_attrs; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setResAttrs(const ::mlir::ArrayAttr &propValue) { this->res_attrs = propValue; } using tbaaTy = ::mlir::ArrayAttr; tbaaTy tbaa; auto getTbaa() const { auto &propStorage = this->tbaa; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setTbaa(const ::mlir::ArrayAttr &propValue) { this->tbaa = propValue; } bool operator==(const Properties &rhs) const { return rhs.access_groups == this->access_groups && rhs.alias_scopes == this->alias_scopes && rhs.arg_attrs == this->arg_attrs && rhs.isVolatile == this->isVolatile && rhs.noalias_scopes == this->noalias_scopes && rhs.res_attrs == this->res_attrs && rhs.tbaa == this->tbaa && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: MemcpyOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.memcpy", odsAttrs.getContext()); } MemcpyOpGenericAdaptorBase(MemcpyOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getIsVolatileAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().isVolatile); return attr; } bool getIsVolatile(); ::mlir::ArrayAttr getAccessGroupsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().access_groups); return attr; } ::std::optional< ::mlir::ArrayAttr > getAccessGroups(); ::mlir::ArrayAttr getAliasScopesAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().alias_scopes); return attr; } ::std::optional< ::mlir::ArrayAttr > getAliasScopes(); ::mlir::ArrayAttr getNoaliasScopesAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().noalias_scopes); return attr; } ::std::optional< ::mlir::ArrayAttr > getNoaliasScopes(); ::mlir::ArrayAttr getTbaaAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().tbaa); return attr; } ::std::optional< ::mlir::ArrayAttr > getTbaa(); ::mlir::ArrayAttr getArgAttrsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs); return attr; } ::std::optional< ::mlir::ArrayAttr > getArgAttrs(); ::mlir::ArrayAttr getResAttrsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs); return attr; } ::std::optional< ::mlir::ArrayAttr > getResAttrs(); }; } // namespace detail template class MemcpyOpGenericAdaptor : public detail::MemcpyOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::MemcpyOpGenericAdaptorBase; static constexpr int odsIndex_dst = 0; static constexpr int odsIndex_src = 1; static constexpr int odsIndex_len = 2; public: MemcpyOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} MemcpyOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MemcpyOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} MemcpyOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MemcpyOpGenericAdaptor(values, attrs, Properties{}, {}) {} MemcpyOpGenericAdaptor(RangeT values, const MemcpyOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> MemcpyOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getDst() { return (*getODSOperands(0).begin()); } ValueT getSrc() { return (*getODSOperands(1).begin()); } ValueT getLen() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class MemcpyOpAdaptor : public MemcpyOpGenericAdaptor<::mlir::ValueRange> { public: using MemcpyOpGenericAdaptor::MemcpyOpGenericAdaptor; MemcpyOpAdaptor(MemcpyOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class MemcpyOp : public ::mlir::Op::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::AccessGroupOpInterface::Trait, ::mlir::LLVM::AliasAnalysisOpInterface::Trait, ::mlir::ArgAndResultAttrsOpInterface::Trait, ::mlir::PromotableMemOpInterface::Trait, ::mlir::DestructurableAccessorOpInterface::Trait, ::mlir::SafeMemorySlotAccessOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = MemcpyOpAdaptor; template using GenericAdaptor = MemcpyOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_dst = 0; static constexpr int odsIndex_src = 1; static constexpr int odsIndex_len = 2; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::AccessGroupOpInterface::Trait::getAccessGroupsOrNull; using ::mlir::LLVM::AccessGroupOpInterface::Trait::setAccessGroups; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::getAliasScopesOrNull; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::setAliasScopes; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::getNoAliasScopesOrNull; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::setNoAliasScopes; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::getTBAATagsOrNull; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::setTBAATags; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("access_groups"), ::llvm::StringRef("alias_scopes"), ::llvm::StringRef("arg_attrs"), ::llvm::StringRef("isVolatile"), ::llvm::StringRef("noalias_scopes"), ::llvm::StringRef("res_attrs"), ::llvm::StringRef("tbaa")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getAccessGroupsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getAccessGroupsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getAliasScopesAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getAliasScopesAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } ::mlir::StringAttr getArgAttrsAttrName() { return getAttributeNameForIndex(2); } static ::mlir::StringAttr getArgAttrsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 2); } ::mlir::StringAttr getIsVolatileAttrName() { return getAttributeNameForIndex(3); } static ::mlir::StringAttr getIsVolatileAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 3); } ::mlir::StringAttr getNoaliasScopesAttrName() { return getAttributeNameForIndex(4); } static ::mlir::StringAttr getNoaliasScopesAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 4); } ::mlir::StringAttr getResAttrsAttrName() { return getAttributeNameForIndex(5); } static ::mlir::StringAttr getResAttrsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 5); } ::mlir::StringAttr getTbaaAttrName() { return getAttributeNameForIndex(6); } static ::mlir::StringAttr getTbaaAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 6); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.memcpy"); } std::pair 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::LLVM::LLVMPointerType> getDst() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getSrc() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getLen() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getDstMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getSrcMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getLenMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getIsVolatileAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().isVolatile); } bool getIsVolatile(); ::mlir::ArrayAttr getAccessGroupsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().access_groups); } ::std::optional< ::mlir::ArrayAttr > getAccessGroups(); ::mlir::ArrayAttr getAliasScopesAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().alias_scopes); } ::std::optional< ::mlir::ArrayAttr > getAliasScopes(); ::mlir::ArrayAttr getNoaliasScopesAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().noalias_scopes); } ::std::optional< ::mlir::ArrayAttr > getNoaliasScopes(); ::mlir::ArrayAttr getTbaaAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().tbaa); } ::std::optional< ::mlir::ArrayAttr > getTbaa(); ::mlir::ArrayAttr getArgAttrsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs); } ::std::optional< ::mlir::ArrayAttr > getArgAttrs(); ::mlir::ArrayAttr getResAttrsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs); } ::std::optional< ::mlir::ArrayAttr > getResAttrs(); void setIsVolatileAttr(::mlir::IntegerAttr attr) { getProperties().isVolatile = attr; } void setIsVolatile(bool attrValue); void setAccessGroupsAttr(::mlir::ArrayAttr attr) { getProperties().access_groups = attr; } void setAliasScopesAttr(::mlir::ArrayAttr attr) { getProperties().alias_scopes = attr; } void setNoaliasScopesAttr(::mlir::ArrayAttr attr) { getProperties().noalias_scopes = attr; } void setTbaaAttr(::mlir::ArrayAttr attr) { getProperties().tbaa = attr; } void setArgAttrsAttr(::mlir::ArrayAttr attr) { getProperties().arg_attrs = attr; } void setResAttrsAttr(::mlir::ArrayAttr attr) { getProperties().res_attrs = attr; } ::mlir::Attribute removeAccessGroupsAttr() { auto attr = getProperties().access_groups; getProperties().access_groups = {}; return attr; } ::mlir::Attribute removeAliasScopesAttr() { auto attr = getProperties().alias_scopes; getProperties().alias_scopes = {}; return attr; } ::mlir::Attribute removeNoaliasScopesAttr() { auto attr = getProperties().noalias_scopes; getProperties().noalias_scopes = {}; return attr; } ::mlir::Attribute removeTbaaAttr() { auto attr = getProperties().tbaa; getProperties().tbaa = {}; return attr; } ::mlir::Attribute removeArgAttrsAttr() { auto attr = getProperties().arg_attrs; getProperties().arg_attrs = {}; return attr; } ::mlir::Attribute removeResAttrsAttr() { auto attr = getProperties().res_attrs; getProperties().res_attrs = {}; return attr; } static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value dst, Value src, Value len, bool isVolatile); static MemcpyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value dst, Value src, Value len, bool isVolatile); static MemcpyOp create(::mlir::ImplicitLocOpBuilder &builder, Value dst, Value src, Value len, bool isVolatile); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value dst, Value src, Value len, IntegerAttr isVolatile); static MemcpyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value dst, Value src, Value len, IntegerAttr isVolatile); static MemcpyOp create(::mlir::ImplicitLocOpBuilder &builder, Value dst, Value src, Value len, IntegerAttr isVolatile); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemcpyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemcpyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemcpyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemcpyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemcpyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemcpyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemcpyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemcpyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MemcpyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MemcpyOp 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 MemcpyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MemcpyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); ::llvm::SmallVector<::mlir::Value> getAccessedOperands(); bool loadsFrom(const ::mlir::MemorySlot &slot); bool storesTo(const ::mlir::MemorySlot &slot); ::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout); bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout); ::mlir::DeletionKind removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout); bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout); ::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout); ::llvm::LogicalResult ensureOnlySafeAccesses(const ::mlir::MemorySlot &slot, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout); static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 7 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::MemcpyOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MemcpyOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::MemmoveOp declarations //===----------------------------------------------------------------------===// namespace detail { class MemmoveOpGenericAdaptorBase { public: struct Properties { using access_groupsTy = ::mlir::ArrayAttr; access_groupsTy access_groups; auto getAccessGroups() const { auto &propStorage = this->access_groups; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setAccessGroups(const ::mlir::ArrayAttr &propValue) { this->access_groups = propValue; } using alias_scopesTy = ::mlir::ArrayAttr; alias_scopesTy alias_scopes; auto getAliasScopes() const { auto &propStorage = this->alias_scopes; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setAliasScopes(const ::mlir::ArrayAttr &propValue) { this->alias_scopes = propValue; } using arg_attrsTy = ::mlir::ArrayAttr; arg_attrsTy arg_attrs; auto getArgAttrs() const { auto &propStorage = this->arg_attrs; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setArgAttrs(const ::mlir::ArrayAttr &propValue) { this->arg_attrs = propValue; } using isVolatileTy = ::mlir::IntegerAttr; isVolatileTy isVolatile; auto getIsVolatile() const { auto &propStorage = this->isVolatile; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setIsVolatile(const ::mlir::IntegerAttr &propValue) { this->isVolatile = propValue; } using noalias_scopesTy = ::mlir::ArrayAttr; noalias_scopesTy noalias_scopes; auto getNoaliasScopes() const { auto &propStorage = this->noalias_scopes; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setNoaliasScopes(const ::mlir::ArrayAttr &propValue) { this->noalias_scopes = propValue; } using res_attrsTy = ::mlir::ArrayAttr; res_attrsTy res_attrs; auto getResAttrs() const { auto &propStorage = this->res_attrs; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setResAttrs(const ::mlir::ArrayAttr &propValue) { this->res_attrs = propValue; } using tbaaTy = ::mlir::ArrayAttr; tbaaTy tbaa; auto getTbaa() const { auto &propStorage = this->tbaa; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setTbaa(const ::mlir::ArrayAttr &propValue) { this->tbaa = propValue; } bool operator==(const Properties &rhs) const { return rhs.access_groups == this->access_groups && rhs.alias_scopes == this->alias_scopes && rhs.arg_attrs == this->arg_attrs && rhs.isVolatile == this->isVolatile && rhs.noalias_scopes == this->noalias_scopes && rhs.res_attrs == this->res_attrs && rhs.tbaa == this->tbaa && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: MemmoveOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.memmove", odsAttrs.getContext()); } MemmoveOpGenericAdaptorBase(MemmoveOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getIsVolatileAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().isVolatile); return attr; } bool getIsVolatile(); ::mlir::ArrayAttr getAccessGroupsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().access_groups); return attr; } ::std::optional< ::mlir::ArrayAttr > getAccessGroups(); ::mlir::ArrayAttr getAliasScopesAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().alias_scopes); return attr; } ::std::optional< ::mlir::ArrayAttr > getAliasScopes(); ::mlir::ArrayAttr getNoaliasScopesAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().noalias_scopes); return attr; } ::std::optional< ::mlir::ArrayAttr > getNoaliasScopes(); ::mlir::ArrayAttr getTbaaAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().tbaa); return attr; } ::std::optional< ::mlir::ArrayAttr > getTbaa(); ::mlir::ArrayAttr getArgAttrsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs); return attr; } ::std::optional< ::mlir::ArrayAttr > getArgAttrs(); ::mlir::ArrayAttr getResAttrsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs); return attr; } ::std::optional< ::mlir::ArrayAttr > getResAttrs(); }; } // namespace detail template class MemmoveOpGenericAdaptor : public detail::MemmoveOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::MemmoveOpGenericAdaptorBase; static constexpr int odsIndex_dst = 0; static constexpr int odsIndex_src = 1; static constexpr int odsIndex_len = 2; public: MemmoveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} MemmoveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MemmoveOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} MemmoveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MemmoveOpGenericAdaptor(values, attrs, Properties{}, {}) {} MemmoveOpGenericAdaptor(RangeT values, const MemmoveOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> MemmoveOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getDst() { return (*getODSOperands(0).begin()); } ValueT getSrc() { return (*getODSOperands(1).begin()); } ValueT getLen() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class MemmoveOpAdaptor : public MemmoveOpGenericAdaptor<::mlir::ValueRange> { public: using MemmoveOpGenericAdaptor::MemmoveOpGenericAdaptor; MemmoveOpAdaptor(MemmoveOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class MemmoveOp : public ::mlir::Op::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::AccessGroupOpInterface::Trait, ::mlir::LLVM::AliasAnalysisOpInterface::Trait, ::mlir::ArgAndResultAttrsOpInterface::Trait, ::mlir::PromotableMemOpInterface::Trait, ::mlir::DestructurableAccessorOpInterface::Trait, ::mlir::SafeMemorySlotAccessOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = MemmoveOpAdaptor; template using GenericAdaptor = MemmoveOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_dst = 0; static constexpr int odsIndex_src = 1; static constexpr int odsIndex_len = 2; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::AccessGroupOpInterface::Trait::getAccessGroupsOrNull; using ::mlir::LLVM::AccessGroupOpInterface::Trait::setAccessGroups; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::getAliasScopesOrNull; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::setAliasScopes; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::getNoAliasScopesOrNull; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::setNoAliasScopes; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::getTBAATagsOrNull; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::setTBAATags; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("access_groups"), ::llvm::StringRef("alias_scopes"), ::llvm::StringRef("arg_attrs"), ::llvm::StringRef("isVolatile"), ::llvm::StringRef("noalias_scopes"), ::llvm::StringRef("res_attrs"), ::llvm::StringRef("tbaa")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getAccessGroupsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getAccessGroupsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getAliasScopesAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getAliasScopesAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } ::mlir::StringAttr getArgAttrsAttrName() { return getAttributeNameForIndex(2); } static ::mlir::StringAttr getArgAttrsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 2); } ::mlir::StringAttr getIsVolatileAttrName() { return getAttributeNameForIndex(3); } static ::mlir::StringAttr getIsVolatileAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 3); } ::mlir::StringAttr getNoaliasScopesAttrName() { return getAttributeNameForIndex(4); } static ::mlir::StringAttr getNoaliasScopesAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 4); } ::mlir::StringAttr getResAttrsAttrName() { return getAttributeNameForIndex(5); } static ::mlir::StringAttr getResAttrsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 5); } ::mlir::StringAttr getTbaaAttrName() { return getAttributeNameForIndex(6); } static ::mlir::StringAttr getTbaaAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 6); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.memmove"); } std::pair 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::LLVM::LLVMPointerType> getDst() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getSrc() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getLen() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getDstMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getSrcMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getLenMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getIsVolatileAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().isVolatile); } bool getIsVolatile(); ::mlir::ArrayAttr getAccessGroupsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().access_groups); } ::std::optional< ::mlir::ArrayAttr > getAccessGroups(); ::mlir::ArrayAttr getAliasScopesAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().alias_scopes); } ::std::optional< ::mlir::ArrayAttr > getAliasScopes(); ::mlir::ArrayAttr getNoaliasScopesAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().noalias_scopes); } ::std::optional< ::mlir::ArrayAttr > getNoaliasScopes(); ::mlir::ArrayAttr getTbaaAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().tbaa); } ::std::optional< ::mlir::ArrayAttr > getTbaa(); ::mlir::ArrayAttr getArgAttrsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs); } ::std::optional< ::mlir::ArrayAttr > getArgAttrs(); ::mlir::ArrayAttr getResAttrsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs); } ::std::optional< ::mlir::ArrayAttr > getResAttrs(); void setIsVolatileAttr(::mlir::IntegerAttr attr) { getProperties().isVolatile = attr; } void setIsVolatile(bool attrValue); void setAccessGroupsAttr(::mlir::ArrayAttr attr) { getProperties().access_groups = attr; } void setAliasScopesAttr(::mlir::ArrayAttr attr) { getProperties().alias_scopes = attr; } void setNoaliasScopesAttr(::mlir::ArrayAttr attr) { getProperties().noalias_scopes = attr; } void setTbaaAttr(::mlir::ArrayAttr attr) { getProperties().tbaa = attr; } void setArgAttrsAttr(::mlir::ArrayAttr attr) { getProperties().arg_attrs = attr; } void setResAttrsAttr(::mlir::ArrayAttr attr) { getProperties().res_attrs = attr; } ::mlir::Attribute removeAccessGroupsAttr() { auto attr = getProperties().access_groups; getProperties().access_groups = {}; return attr; } ::mlir::Attribute removeAliasScopesAttr() { auto attr = getProperties().alias_scopes; getProperties().alias_scopes = {}; return attr; } ::mlir::Attribute removeNoaliasScopesAttr() { auto attr = getProperties().noalias_scopes; getProperties().noalias_scopes = {}; return attr; } ::mlir::Attribute removeTbaaAttr() { auto attr = getProperties().tbaa; getProperties().tbaa = {}; return attr; } ::mlir::Attribute removeArgAttrsAttr() { auto attr = getProperties().arg_attrs; getProperties().arg_attrs = {}; return attr; } ::mlir::Attribute removeResAttrsAttr() { auto attr = getProperties().res_attrs; getProperties().res_attrs = {}; return attr; } static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value dst, Value src, Value len, bool isVolatile); static MemmoveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value dst, Value src, Value len, bool isVolatile); static MemmoveOp create(::mlir::ImplicitLocOpBuilder &builder, Value dst, Value src, Value len, bool isVolatile); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value dst, Value src, Value len, IntegerAttr isVolatile); static MemmoveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value dst, Value src, Value len, IntegerAttr isVolatile); static MemmoveOp create(::mlir::ImplicitLocOpBuilder &builder, Value dst, Value src, Value len, IntegerAttr isVolatile); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemmoveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemmoveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemmoveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemmoveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemmoveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemmoveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemmoveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemmoveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value src, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MemmoveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MemmoveOp 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 MemmoveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MemmoveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); ::llvm::SmallVector<::mlir::Value> getAccessedOperands(); bool loadsFrom(const ::mlir::MemorySlot &slot); bool storesTo(const ::mlir::MemorySlot &slot); ::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout); bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout); ::mlir::DeletionKind removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout); bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout); ::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout); ::llvm::LogicalResult ensureOnlySafeAccesses(const ::mlir::MemorySlot &slot, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout); static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 7 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::MemmoveOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MemmoveOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::MemsetInlineOp declarations //===----------------------------------------------------------------------===// namespace detail { class MemsetInlineOpGenericAdaptorBase { public: struct Properties { using access_groupsTy = ::mlir::ArrayAttr; access_groupsTy access_groups; auto getAccessGroups() const { auto &propStorage = this->access_groups; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setAccessGroups(const ::mlir::ArrayAttr &propValue) { this->access_groups = propValue; } using alias_scopesTy = ::mlir::ArrayAttr; alias_scopesTy alias_scopes; auto getAliasScopes() const { auto &propStorage = this->alias_scopes; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setAliasScopes(const ::mlir::ArrayAttr &propValue) { this->alias_scopes = propValue; } using arg_attrsTy = ::mlir::ArrayAttr; arg_attrsTy arg_attrs; auto getArgAttrs() const { auto &propStorage = this->arg_attrs; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setArgAttrs(const ::mlir::ArrayAttr &propValue) { this->arg_attrs = propValue; } using isVolatileTy = ::mlir::IntegerAttr; isVolatileTy isVolatile; auto getIsVolatile() const { auto &propStorage = this->isVolatile; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setIsVolatile(const ::mlir::IntegerAttr &propValue) { this->isVolatile = propValue; } using lenTy = ::mlir::IntegerAttr; lenTy len; auto getLen() const { auto &propStorage = this->len; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setLen(const ::mlir::IntegerAttr &propValue) { this->len = propValue; } using noalias_scopesTy = ::mlir::ArrayAttr; noalias_scopesTy noalias_scopes; auto getNoaliasScopes() const { auto &propStorage = this->noalias_scopes; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setNoaliasScopes(const ::mlir::ArrayAttr &propValue) { this->noalias_scopes = propValue; } using res_attrsTy = ::mlir::ArrayAttr; res_attrsTy res_attrs; auto getResAttrs() const { auto &propStorage = this->res_attrs; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setResAttrs(const ::mlir::ArrayAttr &propValue) { this->res_attrs = propValue; } using tbaaTy = ::mlir::ArrayAttr; tbaaTy tbaa; auto getTbaa() const { auto &propStorage = this->tbaa; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setTbaa(const ::mlir::ArrayAttr &propValue) { this->tbaa = propValue; } bool operator==(const Properties &rhs) const { return rhs.access_groups == this->access_groups && rhs.alias_scopes == this->alias_scopes && rhs.arg_attrs == this->arg_attrs && rhs.isVolatile == this->isVolatile && rhs.len == this->len && rhs.noalias_scopes == this->noalias_scopes && rhs.res_attrs == this->res_attrs && rhs.tbaa == this->tbaa && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: MemsetInlineOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.memset.inline", odsAttrs.getContext()); } MemsetInlineOpGenericAdaptorBase(MemsetInlineOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getLenAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().len); return attr; } ::mlir::APInt getLen(); ::mlir::IntegerAttr getIsVolatileAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().isVolatile); return attr; } bool getIsVolatile(); ::mlir::ArrayAttr getAccessGroupsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().access_groups); return attr; } ::std::optional< ::mlir::ArrayAttr > getAccessGroups(); ::mlir::ArrayAttr getAliasScopesAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().alias_scopes); return attr; } ::std::optional< ::mlir::ArrayAttr > getAliasScopes(); ::mlir::ArrayAttr getNoaliasScopesAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().noalias_scopes); return attr; } ::std::optional< ::mlir::ArrayAttr > getNoaliasScopes(); ::mlir::ArrayAttr getTbaaAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().tbaa); return attr; } ::std::optional< ::mlir::ArrayAttr > getTbaa(); ::mlir::ArrayAttr getArgAttrsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs); return attr; } ::std::optional< ::mlir::ArrayAttr > getArgAttrs(); ::mlir::ArrayAttr getResAttrsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs); return attr; } ::std::optional< ::mlir::ArrayAttr > getResAttrs(); }; } // namespace detail template class MemsetInlineOpGenericAdaptor : public detail::MemsetInlineOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::MemsetInlineOpGenericAdaptorBase; static constexpr int odsIndex_dst = 0; static constexpr int odsIndex_val = 1; public: MemsetInlineOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} MemsetInlineOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MemsetInlineOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} MemsetInlineOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MemsetInlineOpGenericAdaptor(values, attrs, Properties{}, {}) {} MemsetInlineOpGenericAdaptor(RangeT values, const MemsetInlineOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> MemsetInlineOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getDst() { return (*getODSOperands(0).begin()); } ValueT getVal() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class MemsetInlineOpAdaptor : public MemsetInlineOpGenericAdaptor<::mlir::ValueRange> { public: using MemsetInlineOpGenericAdaptor::MemsetInlineOpGenericAdaptor; MemsetInlineOpAdaptor(MemsetInlineOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class MemsetInlineOp : public ::mlir::Op::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::AccessGroupOpInterface::Trait, ::mlir::LLVM::AliasAnalysisOpInterface::Trait, ::mlir::ArgAndResultAttrsOpInterface::Trait, ::mlir::PromotableMemOpInterface::Trait, ::mlir::DestructurableAccessorOpInterface::Trait, ::mlir::SafeMemorySlotAccessOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = MemsetInlineOpAdaptor; template using GenericAdaptor = MemsetInlineOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_dst = 0; static constexpr int odsIndex_val = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::AccessGroupOpInterface::Trait::getAccessGroupsOrNull; using ::mlir::LLVM::AccessGroupOpInterface::Trait::setAccessGroups; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::getAliasScopesOrNull; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::setAliasScopes; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::getNoAliasScopesOrNull; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::setNoAliasScopes; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::getTBAATagsOrNull; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::setTBAATags; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("access_groups"), ::llvm::StringRef("alias_scopes"), ::llvm::StringRef("arg_attrs"), ::llvm::StringRef("isVolatile"), ::llvm::StringRef("len"), ::llvm::StringRef("noalias_scopes"), ::llvm::StringRef("res_attrs"), ::llvm::StringRef("tbaa")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getAccessGroupsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getAccessGroupsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getAliasScopesAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getAliasScopesAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } ::mlir::StringAttr getArgAttrsAttrName() { return getAttributeNameForIndex(2); } static ::mlir::StringAttr getArgAttrsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 2); } ::mlir::StringAttr getIsVolatileAttrName() { return getAttributeNameForIndex(3); } static ::mlir::StringAttr getIsVolatileAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 3); } ::mlir::StringAttr getLenAttrName() { return getAttributeNameForIndex(4); } static ::mlir::StringAttr getLenAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 4); } ::mlir::StringAttr getNoaliasScopesAttrName() { return getAttributeNameForIndex(5); } static ::mlir::StringAttr getNoaliasScopesAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 5); } ::mlir::StringAttr getResAttrsAttrName() { return getAttributeNameForIndex(6); } static ::mlir::StringAttr getResAttrsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 6); } ::mlir::StringAttr getTbaaAttrName() { return getAttributeNameForIndex(7); } static ::mlir::StringAttr getTbaaAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 7); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.memset.inline"); } std::pair 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::LLVM::LLVMPointerType> getDst() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getDstMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getLenAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().len); } ::mlir::APInt getLen(); ::mlir::IntegerAttr getIsVolatileAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().isVolatile); } bool getIsVolatile(); ::mlir::ArrayAttr getAccessGroupsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().access_groups); } ::std::optional< ::mlir::ArrayAttr > getAccessGroups(); ::mlir::ArrayAttr getAliasScopesAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().alias_scopes); } ::std::optional< ::mlir::ArrayAttr > getAliasScopes(); ::mlir::ArrayAttr getNoaliasScopesAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().noalias_scopes); } ::std::optional< ::mlir::ArrayAttr > getNoaliasScopes(); ::mlir::ArrayAttr getTbaaAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().tbaa); } ::std::optional< ::mlir::ArrayAttr > getTbaa(); ::mlir::ArrayAttr getArgAttrsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs); } ::std::optional< ::mlir::ArrayAttr > getArgAttrs(); ::mlir::ArrayAttr getResAttrsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs); } ::std::optional< ::mlir::ArrayAttr > getResAttrs(); void setLenAttr(::mlir::IntegerAttr attr) { getProperties().len = attr; } void setIsVolatileAttr(::mlir::IntegerAttr attr) { getProperties().isVolatile = attr; } void setIsVolatile(bool attrValue); void setAccessGroupsAttr(::mlir::ArrayAttr attr) { getProperties().access_groups = attr; } void setAliasScopesAttr(::mlir::ArrayAttr attr) { getProperties().alias_scopes = attr; } void setNoaliasScopesAttr(::mlir::ArrayAttr attr) { getProperties().noalias_scopes = attr; } void setTbaaAttr(::mlir::ArrayAttr attr) { getProperties().tbaa = attr; } void setArgAttrsAttr(::mlir::ArrayAttr attr) { getProperties().arg_attrs = attr; } void setResAttrsAttr(::mlir::ArrayAttr attr) { getProperties().res_attrs = attr; } ::mlir::Attribute removeAccessGroupsAttr() { auto attr = getProperties().access_groups; getProperties().access_groups = {}; return attr; } ::mlir::Attribute removeAliasScopesAttr() { auto attr = getProperties().alias_scopes; getProperties().alias_scopes = {}; return attr; } ::mlir::Attribute removeNoaliasScopesAttr() { auto attr = getProperties().noalias_scopes; getProperties().noalias_scopes = {}; return attr; } ::mlir::Attribute removeTbaaAttr() { auto attr = getProperties().tbaa; getProperties().tbaa = {}; return attr; } ::mlir::Attribute removeArgAttrsAttr() { auto attr = getProperties().arg_attrs; getProperties().arg_attrs = {}; return attr; } ::mlir::Attribute removeResAttrsAttr() { auto attr = getProperties().res_attrs; getProperties().res_attrs = {}; return attr; } static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value dst, Value val, IntegerAttr len, bool isVolatile); static MemsetInlineOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value dst, Value val, IntegerAttr len, bool isVolatile); static MemsetInlineOp create(::mlir::ImplicitLocOpBuilder &builder, Value dst, Value val, IntegerAttr len, bool isVolatile); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value dst, Value val, IntegerAttr len, IntegerAttr isVolatile); static MemsetInlineOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value dst, Value val, IntegerAttr len, IntegerAttr isVolatile); static MemsetInlineOp create(::mlir::ImplicitLocOpBuilder &builder, Value dst, Value val, IntegerAttr len, IntegerAttr isVolatile); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dst, ::mlir::Value val, ::mlir::IntegerAttr len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemsetInlineOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dst, ::mlir::Value val, ::mlir::IntegerAttr len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemsetInlineOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dst, ::mlir::Value val, ::mlir::IntegerAttr len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value val, ::mlir::IntegerAttr len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemsetInlineOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value val, ::mlir::IntegerAttr len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemsetInlineOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value val, ::mlir::IntegerAttr len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dst, ::mlir::Value val, ::mlir::IntegerAttr len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemsetInlineOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dst, ::mlir::Value val, ::mlir::IntegerAttr len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemsetInlineOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dst, ::mlir::Value val, ::mlir::IntegerAttr len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value val, ::mlir::IntegerAttr len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemsetInlineOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value val, ::mlir::IntegerAttr len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemsetInlineOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value val, ::mlir::IntegerAttr len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MemsetInlineOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MemsetInlineOp 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 MemsetInlineOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MemsetInlineOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); ::llvm::SmallVector<::mlir::Value> getAccessedOperands(); bool loadsFrom(const ::mlir::MemorySlot &slot); bool storesTo(const ::mlir::MemorySlot &slot); ::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout); bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout); ::mlir::DeletionKind removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout); bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout); ::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout); ::llvm::LogicalResult ensureOnlySafeAccesses(const ::mlir::MemorySlot &slot, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout); static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 8 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::MemsetInlineOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MemsetInlineOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::MemsetOp declarations //===----------------------------------------------------------------------===// namespace detail { class MemsetOpGenericAdaptorBase { public: struct Properties { using access_groupsTy = ::mlir::ArrayAttr; access_groupsTy access_groups; auto getAccessGroups() const { auto &propStorage = this->access_groups; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setAccessGroups(const ::mlir::ArrayAttr &propValue) { this->access_groups = propValue; } using alias_scopesTy = ::mlir::ArrayAttr; alias_scopesTy alias_scopes; auto getAliasScopes() const { auto &propStorage = this->alias_scopes; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setAliasScopes(const ::mlir::ArrayAttr &propValue) { this->alias_scopes = propValue; } using arg_attrsTy = ::mlir::ArrayAttr; arg_attrsTy arg_attrs; auto getArgAttrs() const { auto &propStorage = this->arg_attrs; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setArgAttrs(const ::mlir::ArrayAttr &propValue) { this->arg_attrs = propValue; } using isVolatileTy = ::mlir::IntegerAttr; isVolatileTy isVolatile; auto getIsVolatile() const { auto &propStorage = this->isVolatile; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setIsVolatile(const ::mlir::IntegerAttr &propValue) { this->isVolatile = propValue; } using noalias_scopesTy = ::mlir::ArrayAttr; noalias_scopesTy noalias_scopes; auto getNoaliasScopes() const { auto &propStorage = this->noalias_scopes; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setNoaliasScopes(const ::mlir::ArrayAttr &propValue) { this->noalias_scopes = propValue; } using res_attrsTy = ::mlir::ArrayAttr; res_attrsTy res_attrs; auto getResAttrs() const { auto &propStorage = this->res_attrs; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setResAttrs(const ::mlir::ArrayAttr &propValue) { this->res_attrs = propValue; } using tbaaTy = ::mlir::ArrayAttr; tbaaTy tbaa; auto getTbaa() const { auto &propStorage = this->tbaa; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setTbaa(const ::mlir::ArrayAttr &propValue) { this->tbaa = propValue; } bool operator==(const Properties &rhs) const { return rhs.access_groups == this->access_groups && rhs.alias_scopes == this->alias_scopes && rhs.arg_attrs == this->arg_attrs && rhs.isVolatile == this->isVolatile && rhs.noalias_scopes == this->noalias_scopes && rhs.res_attrs == this->res_attrs && rhs.tbaa == this->tbaa && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: MemsetOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.memset", odsAttrs.getContext()); } MemsetOpGenericAdaptorBase(MemsetOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getIsVolatileAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().isVolatile); return attr; } bool getIsVolatile(); ::mlir::ArrayAttr getAccessGroupsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().access_groups); return attr; } ::std::optional< ::mlir::ArrayAttr > getAccessGroups(); ::mlir::ArrayAttr getAliasScopesAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().alias_scopes); return attr; } ::std::optional< ::mlir::ArrayAttr > getAliasScopes(); ::mlir::ArrayAttr getNoaliasScopesAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().noalias_scopes); return attr; } ::std::optional< ::mlir::ArrayAttr > getNoaliasScopes(); ::mlir::ArrayAttr getTbaaAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().tbaa); return attr; } ::std::optional< ::mlir::ArrayAttr > getTbaa(); ::mlir::ArrayAttr getArgAttrsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs); return attr; } ::std::optional< ::mlir::ArrayAttr > getArgAttrs(); ::mlir::ArrayAttr getResAttrsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs); return attr; } ::std::optional< ::mlir::ArrayAttr > getResAttrs(); }; } // namespace detail template class MemsetOpGenericAdaptor : public detail::MemsetOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::MemsetOpGenericAdaptorBase; static constexpr int odsIndex_dst = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_len = 2; public: MemsetOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} MemsetOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MemsetOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} MemsetOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MemsetOpGenericAdaptor(values, attrs, Properties{}, {}) {} MemsetOpGenericAdaptor(RangeT values, const MemsetOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> MemsetOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getDst() { return (*getODSOperands(0).begin()); } ValueT getVal() { return (*getODSOperands(1).begin()); } ValueT getLen() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class MemsetOpAdaptor : public MemsetOpGenericAdaptor<::mlir::ValueRange> { public: using MemsetOpGenericAdaptor::MemsetOpGenericAdaptor; MemsetOpAdaptor(MemsetOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class MemsetOp : public ::mlir::Op::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::AccessGroupOpInterface::Trait, ::mlir::LLVM::AliasAnalysisOpInterface::Trait, ::mlir::ArgAndResultAttrsOpInterface::Trait, ::mlir::PromotableMemOpInterface::Trait, ::mlir::DestructurableAccessorOpInterface::Trait, ::mlir::SafeMemorySlotAccessOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = MemsetOpAdaptor; template using GenericAdaptor = MemsetOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_dst = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_len = 2; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::AccessGroupOpInterface::Trait::getAccessGroupsOrNull; using ::mlir::LLVM::AccessGroupOpInterface::Trait::setAccessGroups; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::getAliasScopesOrNull; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::setAliasScopes; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::getNoAliasScopesOrNull; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::setNoAliasScopes; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::getTBAATagsOrNull; using ::mlir::LLVM::AliasAnalysisOpInterface::Trait::setTBAATags; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("access_groups"), ::llvm::StringRef("alias_scopes"), ::llvm::StringRef("arg_attrs"), ::llvm::StringRef("isVolatile"), ::llvm::StringRef("noalias_scopes"), ::llvm::StringRef("res_attrs"), ::llvm::StringRef("tbaa")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getAccessGroupsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getAccessGroupsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getAliasScopesAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getAliasScopesAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } ::mlir::StringAttr getArgAttrsAttrName() { return getAttributeNameForIndex(2); } static ::mlir::StringAttr getArgAttrsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 2); } ::mlir::StringAttr getIsVolatileAttrName() { return getAttributeNameForIndex(3); } static ::mlir::StringAttr getIsVolatileAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 3); } ::mlir::StringAttr getNoaliasScopesAttrName() { return getAttributeNameForIndex(4); } static ::mlir::StringAttr getNoaliasScopesAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 4); } ::mlir::StringAttr getResAttrsAttrName() { return getAttributeNameForIndex(5); } static ::mlir::StringAttr getResAttrsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 5); } ::mlir::StringAttr getTbaaAttrName() { return getAttributeNameForIndex(6); } static ::mlir::StringAttr getTbaaAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 6); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.memset"); } std::pair 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::LLVM::LLVMPointerType> getDst() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getLen() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getDstMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getLenMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getIsVolatileAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().isVolatile); } bool getIsVolatile(); ::mlir::ArrayAttr getAccessGroupsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().access_groups); } ::std::optional< ::mlir::ArrayAttr > getAccessGroups(); ::mlir::ArrayAttr getAliasScopesAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().alias_scopes); } ::std::optional< ::mlir::ArrayAttr > getAliasScopes(); ::mlir::ArrayAttr getNoaliasScopesAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().noalias_scopes); } ::std::optional< ::mlir::ArrayAttr > getNoaliasScopes(); ::mlir::ArrayAttr getTbaaAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().tbaa); } ::std::optional< ::mlir::ArrayAttr > getTbaa(); ::mlir::ArrayAttr getArgAttrsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs); } ::std::optional< ::mlir::ArrayAttr > getArgAttrs(); ::mlir::ArrayAttr getResAttrsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs); } ::std::optional< ::mlir::ArrayAttr > getResAttrs(); void setIsVolatileAttr(::mlir::IntegerAttr attr) { getProperties().isVolatile = attr; } void setIsVolatile(bool attrValue); void setAccessGroupsAttr(::mlir::ArrayAttr attr) { getProperties().access_groups = attr; } void setAliasScopesAttr(::mlir::ArrayAttr attr) { getProperties().alias_scopes = attr; } void setNoaliasScopesAttr(::mlir::ArrayAttr attr) { getProperties().noalias_scopes = attr; } void setTbaaAttr(::mlir::ArrayAttr attr) { getProperties().tbaa = attr; } void setArgAttrsAttr(::mlir::ArrayAttr attr) { getProperties().arg_attrs = attr; } void setResAttrsAttr(::mlir::ArrayAttr attr) { getProperties().res_attrs = attr; } ::mlir::Attribute removeAccessGroupsAttr() { auto attr = getProperties().access_groups; getProperties().access_groups = {}; return attr; } ::mlir::Attribute removeAliasScopesAttr() { auto attr = getProperties().alias_scopes; getProperties().alias_scopes = {}; return attr; } ::mlir::Attribute removeNoaliasScopesAttr() { auto attr = getProperties().noalias_scopes; getProperties().noalias_scopes = {}; return attr; } ::mlir::Attribute removeTbaaAttr() { auto attr = getProperties().tbaa; getProperties().tbaa = {}; return attr; } ::mlir::Attribute removeArgAttrsAttr() { auto attr = getProperties().arg_attrs; getProperties().arg_attrs = {}; return attr; } ::mlir::Attribute removeResAttrsAttr() { auto attr = getProperties().res_attrs; getProperties().res_attrs = {}; return attr; } static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value dst, Value val, Value len, bool isVolatile); static MemsetOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value dst, Value val, Value len, bool isVolatile); static MemsetOp create(::mlir::ImplicitLocOpBuilder &builder, Value dst, Value val, Value len, bool isVolatile); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value dst, Value val, Value len, IntegerAttr isVolatile); static MemsetOp create(::mlir::OpBuilder &builder, ::mlir::Location location, Value dst, Value val, Value len, IntegerAttr isVolatile); static MemsetOp create(::mlir::ImplicitLocOpBuilder &builder, Value dst, Value val, Value len, IntegerAttr isVolatile); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dst, ::mlir::Value val, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemsetOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dst, ::mlir::Value val, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemsetOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dst, ::mlir::Value val, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value val, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemsetOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value val, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemsetOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value val, ::mlir::Value len, ::mlir::IntegerAttr isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dst, ::mlir::Value val, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemsetOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dst, ::mlir::Value val, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemsetOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dst, ::mlir::Value val, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value val, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemsetOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value val, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static MemsetOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dst, ::mlir::Value val, ::mlir::Value len, bool isVolatile, /*optional*/::mlir::ArrayAttr access_groups, /*optional*/::mlir::ArrayAttr alias_scopes, /*optional*/::mlir::ArrayAttr noalias_scopes, /*optional*/::mlir::ArrayAttr tbaa, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MemsetOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MemsetOp 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 MemsetOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MemsetOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); ::llvm::SmallVector<::mlir::Value> getAccessedOperands(); bool loadsFrom(const ::mlir::MemorySlot &slot); bool storesTo(const ::mlir::MemorySlot &slot); ::mlir::Value getStored(const ::mlir::MemorySlot &slot, ::mlir::OpBuilder &builder, ::mlir::Value reachingDef, const ::mlir::DataLayout &dataLayout); bool canUsesBeRemoved(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout); ::mlir::DeletionKind removeBlockingUses(const ::mlir::MemorySlot &slot, const ::llvm::SmallPtrSetImpl &blockingUses, ::mlir::OpBuilder &builder, ::mlir::Value reachingDefinition, const ::mlir::DataLayout &dataLayout); bool canRewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::SmallPtrSetImpl<::mlir::Attribute> &usedIndices, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout); ::mlir::DeletionKind rewire(const ::mlir::DestructurableMemorySlot &slot, ::llvm::DenseMap<::mlir::Attribute, ::mlir::MemorySlot> &subslots, ::mlir::OpBuilder &builder, const ::mlir::DataLayout &dataLayout); ::llvm::LogicalResult ensureOnlySafeAccesses(const ::mlir::MemorySlot &slot, ::mlir::SmallVectorImpl<::mlir::MemorySlot> &mustBeSafelyUsed, const ::mlir::DataLayout &dataLayout); static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 7 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::MemsetOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MemsetOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::MinNumOp declarations //===----------------------------------------------------------------------===// namespace detail { class MinNumOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: MinNumOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.minnum", odsAttrs.getContext()); } MinNumOpGenericAdaptorBase(MinNumOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class MinNumOpGenericAdaptor : public detail::MinNumOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::MinNumOpGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: MinNumOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} MinNumOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MinNumOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} MinNumOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MinNumOpGenericAdaptor(values, attrs, Properties{}, {}) {} MinNumOpGenericAdaptor(RangeT values, const MinNumOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> MinNumOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 MinNumOpAdaptor : public MinNumOpGenericAdaptor<::mlir::ValueRange> { public: using MinNumOpGenericAdaptor::MinNumOpGenericAdaptor; MinNumOpAdaptor(MinNumOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class MinNumOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = MinNumOpAdaptor; template using GenericAdaptor = MinNumOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.minnum"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MinNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MinNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MinNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MinNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MinNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MinNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MinNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MinNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MinNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MinNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MinNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MinNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MinNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MinNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MinNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MinNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 MinNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MinNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MinNumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MinNumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::MinNumOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MinNumOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::MinimumOp declarations //===----------------------------------------------------------------------===// namespace detail { class MinimumOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: MinimumOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.minimum", odsAttrs.getContext()); } MinimumOpGenericAdaptorBase(MinimumOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class MinimumOpGenericAdaptor : public detail::MinimumOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::MinimumOpGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: MinimumOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} MinimumOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : MinimumOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} MinimumOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : MinimumOpGenericAdaptor(values, attrs, Properties{}, {}) {} MinimumOpGenericAdaptor(RangeT values, const MinimumOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> MinimumOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 MinimumOpAdaptor : public MinimumOpGenericAdaptor<::mlir::ValueRange> { public: using MinimumOpGenericAdaptor::MinimumOpGenericAdaptor; MinimumOpAdaptor(MinimumOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class MinimumOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = MinimumOpAdaptor; template using GenericAdaptor = MinimumOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.minimum"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MinimumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MinimumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MinimumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MinimumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MinimumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static MinimumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MinimumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MinimumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MinimumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MinimumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MinimumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static MinimumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MinimumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MinimumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MinimumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static MinimumOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 MinimumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MinimumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MinimumOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static MinimumOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::MinimumOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::MinimumOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::NearbyintOp declarations //===----------------------------------------------------------------------===// namespace detail { class NearbyintOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: NearbyintOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.nearbyint", odsAttrs.getContext()); } NearbyintOpGenericAdaptorBase(NearbyintOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class NearbyintOpGenericAdaptor : public detail::NearbyintOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::NearbyintOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: NearbyintOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} NearbyintOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : NearbyintOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} NearbyintOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : NearbyintOpGenericAdaptor(values, attrs, Properties{}, {}) {} NearbyintOpGenericAdaptor(RangeT values, const NearbyintOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> NearbyintOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class NearbyintOpAdaptor : public NearbyintOpGenericAdaptor<::mlir::ValueRange> { public: using NearbyintOpGenericAdaptor::NearbyintOpGenericAdaptor; NearbyintOpAdaptor(NearbyintOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class NearbyintOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = NearbyintOpAdaptor; template using GenericAdaptor = NearbyintOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.nearbyint"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static NearbyintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static NearbyintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static NearbyintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static NearbyintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static NearbyintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static NearbyintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static NearbyintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static NearbyintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static NearbyintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static NearbyintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static NearbyintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static NearbyintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static NearbyintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static NearbyintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static NearbyintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static NearbyintOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 NearbyintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static NearbyintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static NearbyintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static NearbyintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::NearbyintOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::NearbyintOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::NoAliasScopeDeclOp declarations //===----------------------------------------------------------------------===// namespace detail { class NoAliasScopeDeclOpGenericAdaptorBase { public: struct Properties { using scopeTy = ::mlir::LLVM::AliasScopeAttr; scopeTy scope; auto getScope() const { auto &propStorage = this->scope; return ::llvm::cast<::mlir::LLVM::AliasScopeAttr>(propStorage); } void setScope(const ::mlir::LLVM::AliasScopeAttr &propValue) { this->scope = propValue; } bool operator==(const Properties &rhs) const { return rhs.scope == this->scope && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: NoAliasScopeDeclOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.experimental.noalias.scope.decl", odsAttrs.getContext()); } NoAliasScopeDeclOpGenericAdaptorBase(NoAliasScopeDeclOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::AliasScopeAttr getScopeAttr() { auto attr = ::llvm::cast<::mlir::LLVM::AliasScopeAttr>(getProperties().scope); return attr; } ::mlir::LLVM::AliasScopeAttr getScope(); }; } // namespace detail template class NoAliasScopeDeclOpGenericAdaptor : public detail::NoAliasScopeDeclOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::NoAliasScopeDeclOpGenericAdaptorBase; public: NoAliasScopeDeclOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} NoAliasScopeDeclOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : NoAliasScopeDeclOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} NoAliasScopeDeclOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : NoAliasScopeDeclOpGenericAdaptor(values, attrs, Properties{}, {}) {} NoAliasScopeDeclOpGenericAdaptor(RangeT values, const NoAliasScopeDeclOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> NoAliasScopeDeclOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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)}; } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class NoAliasScopeDeclOpAdaptor : public NoAliasScopeDeclOpGenericAdaptor<::mlir::ValueRange> { public: using NoAliasScopeDeclOpGenericAdaptor::NoAliasScopeDeclOpGenericAdaptor; NoAliasScopeDeclOpAdaptor(NoAliasScopeDeclOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class NoAliasScopeDeclOp : public ::mlir::Op { public: using Op::Op; using Op::print; using Adaptor = NoAliasScopeDeclOpAdaptor; template using GenericAdaptor = NoAliasScopeDeclOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("scope")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getScopeAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getScopeAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.experimental.noalias.scope.decl"); } std::pair 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)}; } std::pair 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)}; } 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::AliasScopeAttr getScopeAttr() { return ::llvm::cast<::mlir::LLVM::AliasScopeAttr>(getProperties().scope); } ::mlir::LLVM::AliasScopeAttr getScope(); void setScopeAttr(::mlir::LLVM::AliasScopeAttr attr) { getProperties().scope = attr; } static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::LLVM::AliasScopeAttr scope); static NoAliasScopeDeclOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::LLVM::AliasScopeAttr scope); static NoAliasScopeDeclOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::LLVM::AliasScopeAttr scope); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::LLVM::AliasScopeAttr scope); static NoAliasScopeDeclOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::LLVM::AliasScopeAttr scope); static NoAliasScopeDeclOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::LLVM::AliasScopeAttr scope); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static NoAliasScopeDeclOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static NoAliasScopeDeclOp 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 NoAliasScopeDeclOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static NoAliasScopeDeclOp 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::NoAliasScopeDeclOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::NoAliasScopeDeclOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::PowIOp declarations //===----------------------------------------------------------------------===// namespace detail { class PowIOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: PowIOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.powi", odsAttrs.getContext()); } PowIOpGenericAdaptorBase(PowIOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class PowIOpGenericAdaptor : public detail::PowIOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::PowIOpGenericAdaptorBase; static constexpr int odsIndex_val = 0; static constexpr int odsIndex_power = 1; public: PowIOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} PowIOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : PowIOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} PowIOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : PowIOpGenericAdaptor(values, attrs, Properties{}, {}) {} PowIOpGenericAdaptor(RangeT values, const PowIOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> PowIOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getVal() { return (*getODSOperands(0).begin()); } ValueT getPower() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class PowIOpAdaptor : public PowIOpGenericAdaptor<::mlir::ValueRange> { public: using PowIOpGenericAdaptor::PowIOpGenericAdaptor; PowIOpAdaptor(PowIOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class PowIOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = PowIOpAdaptor; template using GenericAdaptor = PowIOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_val = 0; static constexpr int odsIndex_power = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.powi"); } std::pair 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::Type> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getPower() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getPowerMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static PowIOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static PowIOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static PowIOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static PowIOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static PowIOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static PowIOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static PowIOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static PowIOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value power, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static PowIOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static PowIOp 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 PowIOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static PowIOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::PowIOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::PowIOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::PowOp declarations //===----------------------------------------------------------------------===// namespace detail { class PowOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: PowOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.pow", odsAttrs.getContext()); } PowOpGenericAdaptorBase(PowOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class PowOpGenericAdaptor : public detail::PowOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::PowOpGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: PowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} PowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : PowOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} PowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : PowOpGenericAdaptor(values, attrs, Properties{}, {}) {} PowOpGenericAdaptor(RangeT values, const PowOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> PowOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 PowOpAdaptor : public PowOpGenericAdaptor<::mlir::ValueRange> { public: using PowOpGenericAdaptor::PowOpGenericAdaptor; PowOpAdaptor(PowOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class PowOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = PowOpAdaptor; template using GenericAdaptor = PowOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.pow"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static PowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static PowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static PowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static PowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static PowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static PowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static PowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static PowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static PowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static PowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static PowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static PowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static PowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static PowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static PowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static PowOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 PowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static PowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static PowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static PowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::PowOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::PowOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::Prefetch declarations //===----------------------------------------------------------------------===// namespace detail { class PrefetchGenericAdaptorBase { public: struct Properties { using cacheTy = ::mlir::IntegerAttr; cacheTy cache; auto getCache() const { auto &propStorage = this->cache; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setCache(const ::mlir::IntegerAttr &propValue) { this->cache = propValue; } using hintTy = ::mlir::IntegerAttr; hintTy hint; auto getHint() const { auto &propStorage = this->hint; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setHint(const ::mlir::IntegerAttr &propValue) { this->hint = propValue; } using rwTy = ::mlir::IntegerAttr; rwTy rw; auto getRw() const { auto &propStorage = this->rw; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setRw(const ::mlir::IntegerAttr &propValue) { this->rw = propValue; } bool operator==(const Properties &rhs) const { return rhs.cache == this->cache && rhs.hint == this->hint && rhs.rw == this->rw && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: PrefetchGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.prefetch", odsAttrs.getContext()); } PrefetchGenericAdaptorBase(Prefetch op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getRwAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().rw); return attr; } uint32_t getRw(); ::mlir::IntegerAttr getHintAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().hint); return attr; } uint32_t getHint(); ::mlir::IntegerAttr getCacheAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().cache); return attr; } uint32_t getCache(); }; } // namespace detail template class PrefetchGenericAdaptor : public detail::PrefetchGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::PrefetchGenericAdaptorBase; static constexpr int odsIndex_addr = 0; public: PrefetchGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} PrefetchGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : PrefetchGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} PrefetchGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : PrefetchGenericAdaptor(values, attrs, Properties{}, {}) {} PrefetchGenericAdaptor(RangeT values, const PrefetchGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> PrefetchGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getAddr() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class PrefetchAdaptor : public PrefetchGenericAdaptor<::mlir::ValueRange> { public: using PrefetchGenericAdaptor::PrefetchGenericAdaptor; PrefetchAdaptor(Prefetch op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class Prefetch : public ::mlir::Op { public: using Op::Op; using Op::print; using Adaptor = PrefetchAdaptor; template using GenericAdaptor = PrefetchGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_addr = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("cache"), ::llvm::StringRef("hint"), ::llvm::StringRef("rw")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getCacheAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getCacheAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getHintAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getHintAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } ::mlir::StringAttr getRwAttrName() { return getAttributeNameForIndex(2); } static ::mlir::StringAttr getRwAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 2); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.prefetch"); } std::pair 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::LLVM::LLVMPointerType> getAddr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getAddrMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getRwAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().rw); } uint32_t getRw(); ::mlir::IntegerAttr getHintAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().hint); } uint32_t getHint(); ::mlir::IntegerAttr getCacheAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().cache); } uint32_t getCache(); void setRwAttr(::mlir::IntegerAttr attr) { getProperties().rw = attr; } void setRw(uint32_t attrValue); void setHintAttr(::mlir::IntegerAttr attr) { getProperties().hint = attr; } void setHint(uint32_t attrValue); void setCacheAttr(::mlir::IntegerAttr attr) { getProperties().cache = attr; } void setCache(uint32_t attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, ::mlir::IntegerAttr rw, ::mlir::IntegerAttr hint, ::mlir::IntegerAttr cache); static Prefetch create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, ::mlir::IntegerAttr rw, ::mlir::IntegerAttr hint, ::mlir::IntegerAttr cache); static Prefetch create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, ::mlir::IntegerAttr rw, ::mlir::IntegerAttr hint, ::mlir::IntegerAttr cache); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::IntegerAttr rw, ::mlir::IntegerAttr hint, ::mlir::IntegerAttr cache); static Prefetch create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::IntegerAttr rw, ::mlir::IntegerAttr hint, ::mlir::IntegerAttr cache); static Prefetch create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, ::mlir::IntegerAttr rw, ::mlir::IntegerAttr hint, ::mlir::IntegerAttr cache); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value addr, uint32_t rw, uint32_t hint, uint32_t cache); static Prefetch create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value addr, uint32_t rw, uint32_t hint, uint32_t cache); static Prefetch create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value addr, uint32_t rw, uint32_t hint, uint32_t cache); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value addr, uint32_t rw, uint32_t hint, uint32_t cache); static Prefetch create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value addr, uint32_t rw, uint32_t hint, uint32_t cache); static Prefetch create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value addr, uint32_t rw, uint32_t hint, uint32_t cache); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Prefetch create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Prefetch 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 Prefetch create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static Prefetch 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 3 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::Prefetch) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::PrefetchGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::PtrAnnotation declarations //===----------------------------------------------------------------------===// namespace detail { class PtrAnnotationGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: PtrAnnotationGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.ptr.annotation", odsAttrs.getContext()); } PtrAnnotationGenericAdaptorBase(PtrAnnotation op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class PtrAnnotationGenericAdaptor : public detail::PtrAnnotationGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::PtrAnnotationGenericAdaptorBase; static constexpr int odsIndex_ptr = 0; static constexpr int odsIndex_annotation = 1; static constexpr int odsIndex_fileName = 2; static constexpr int odsIndex_line = 3; static constexpr int odsIndex_attr = 4; public: PtrAnnotationGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} PtrAnnotationGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : PtrAnnotationGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} PtrAnnotationGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : PtrAnnotationGenericAdaptor(values, attrs, Properties{}, {}) {} PtrAnnotationGenericAdaptor(RangeT values, const PtrAnnotationGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> PtrAnnotationGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getPtr() { return (*getODSOperands(0).begin()); } ValueT getAnnotation() { return (*getODSOperands(1).begin()); } ValueT getFileName() { return (*getODSOperands(2).begin()); } ValueT getLine() { return (*getODSOperands(3).begin()); } ValueT getAttr() { return (*getODSOperands(4).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class PtrAnnotationAdaptor : public PtrAnnotationGenericAdaptor<::mlir::ValueRange> { public: using PtrAnnotationGenericAdaptor::PtrAnnotationGenericAdaptor; PtrAnnotationAdaptor(PtrAnnotation op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class PtrAnnotation : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<5>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = PtrAnnotationAdaptor; template using GenericAdaptor = PtrAnnotationGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_ptr = 0; static constexpr int odsIndex_annotation = 1; static constexpr int odsIndex_fileName = 2; static constexpr int odsIndex_line = 3; static constexpr int odsIndex_attr = 4; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.ptr.annotation"); } std::pair 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::LLVM::LLVMPointerType> getPtr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getAnnotation() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getFileName() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getLine() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getAttr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(4).begin()); } ::mlir::OpOperand &getPtrMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getAnnotationMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getFileNameMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getLineMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getAttrMutable() { auto range = getODSOperandIndexAndLength(4); return getOperation()->getOpOperand(range.first); } std::pair 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::LLVM::LLVMPointerType> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*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 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 ptr, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line, ::mlir::Value attr); static PtrAnnotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line, ::mlir::Value attr); static PtrAnnotation create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line, ::mlir::Value attr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value ptr, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line, ::mlir::Value attr); static PtrAnnotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line, ::mlir::Value attr); static PtrAnnotation create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line, ::mlir::Value attr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line, ::mlir::Value attr); static PtrAnnotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line, ::mlir::Value attr); static PtrAnnotation create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line, ::mlir::Value attr); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static PtrAnnotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static PtrAnnotation create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static PtrAnnotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static PtrAnnotation create(::mlir::ImplicitLocOpBuilder &builder, ::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 PtrAnnotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static PtrAnnotation create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static PtrAnnotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static PtrAnnotation create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::PtrAnnotation) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::PtrMaskOp declarations //===----------------------------------------------------------------------===// namespace detail { class PtrMaskOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: PtrMaskOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.ptrmask", odsAttrs.getContext()); } PtrMaskOpGenericAdaptorBase(PtrMaskOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class PtrMaskOpGenericAdaptor : public detail::PtrMaskOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::PtrMaskOpGenericAdaptorBase; static constexpr int odsIndex_ptr = 0; static constexpr int odsIndex_mask = 1; public: PtrMaskOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} PtrMaskOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : PtrMaskOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} PtrMaskOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : PtrMaskOpGenericAdaptor(values, attrs, Properties{}, {}) {} PtrMaskOpGenericAdaptor(RangeT values, const PtrMaskOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> PtrMaskOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getPtr() { return (*getODSOperands(0).begin()); } ValueT getMask() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class PtrMaskOpAdaptor : public PtrMaskOpGenericAdaptor<::mlir::ValueRange> { public: using PtrMaskOpGenericAdaptor::PtrMaskOpGenericAdaptor; PtrMaskOpAdaptor(PtrMaskOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class PtrMaskOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = PtrMaskOpAdaptor; template using GenericAdaptor = PtrMaskOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_ptr = 0; static constexpr int odsIndex_mask = 1; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.ptrmask"); } std::pair 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::Type> getPtr() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getPtrMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ptr, ::mlir::Value mask); static PtrMaskOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value mask); static PtrMaskOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value mask); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value ptr, ::mlir::Value mask); static PtrMaskOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr, ::mlir::Value mask); static PtrMaskOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr, ::mlir::Value mask); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value mask); static PtrMaskOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value mask); static PtrMaskOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value mask); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static PtrMaskOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static PtrMaskOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static PtrMaskOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static PtrMaskOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 PtrMaskOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static PtrMaskOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static PtrMaskOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static PtrMaskOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::PtrMaskOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::RintOp declarations //===----------------------------------------------------------------------===// namespace detail { class RintOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: RintOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.rint", odsAttrs.getContext()); } RintOpGenericAdaptorBase(RintOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class RintOpGenericAdaptor : public detail::RintOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::RintOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: RintOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} RintOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : RintOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} RintOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : RintOpGenericAdaptor(values, attrs, Properties{}, {}) {} RintOpGenericAdaptor(RangeT values, const RintOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> RintOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class RintOpAdaptor : public RintOpGenericAdaptor<::mlir::ValueRange> { public: using RintOpGenericAdaptor::RintOpGenericAdaptor; RintOpAdaptor(RintOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class RintOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = RintOpAdaptor; template using GenericAdaptor = RintOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.rint"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static RintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static RintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static RintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static RintOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 RintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static RintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static RintOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static RintOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::RintOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::RintOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::RoundEvenOp declarations //===----------------------------------------------------------------------===// namespace detail { class RoundEvenOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: RoundEvenOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.roundeven", odsAttrs.getContext()); } RoundEvenOpGenericAdaptorBase(RoundEvenOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class RoundEvenOpGenericAdaptor : public detail::RoundEvenOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::RoundEvenOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: RoundEvenOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} RoundEvenOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : RoundEvenOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} RoundEvenOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : RoundEvenOpGenericAdaptor(values, attrs, Properties{}, {}) {} RoundEvenOpGenericAdaptor(RangeT values, const RoundEvenOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> RoundEvenOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class RoundEvenOpAdaptor : public RoundEvenOpGenericAdaptor<::mlir::ValueRange> { public: using RoundEvenOpGenericAdaptor::RoundEvenOpGenericAdaptor; RoundEvenOpAdaptor(RoundEvenOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class RoundEvenOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = RoundEvenOpAdaptor; template using GenericAdaptor = RoundEvenOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.roundeven"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RoundEvenOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RoundEvenOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RoundEvenOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RoundEvenOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RoundEvenOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RoundEvenOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RoundEvenOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RoundEvenOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RoundEvenOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RoundEvenOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RoundEvenOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RoundEvenOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static RoundEvenOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static RoundEvenOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static RoundEvenOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static RoundEvenOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 RoundEvenOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static RoundEvenOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static RoundEvenOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static RoundEvenOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::RoundEvenOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::RoundEvenOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::RoundOp declarations //===----------------------------------------------------------------------===// namespace detail { class RoundOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: RoundOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.round", odsAttrs.getContext()); } RoundOpGenericAdaptorBase(RoundOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class RoundOpGenericAdaptor : public detail::RoundOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::RoundOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: RoundOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} RoundOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : RoundOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} RoundOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : RoundOpGenericAdaptor(values, attrs, Properties{}, {}) {} RoundOpGenericAdaptor(RangeT values, const RoundOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> RoundOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class RoundOpAdaptor : public RoundOpGenericAdaptor<::mlir::ValueRange> { public: using RoundOpGenericAdaptor::RoundOpGenericAdaptor; RoundOpAdaptor(RoundOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class RoundOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = RoundOpAdaptor; template using GenericAdaptor = RoundOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.round"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RoundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RoundOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RoundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RoundOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RoundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static RoundOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RoundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RoundOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RoundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RoundOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RoundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static RoundOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static RoundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static RoundOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static RoundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static RoundOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 RoundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static RoundOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static RoundOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static RoundOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::RoundOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::RoundOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::SAddSat declarations //===----------------------------------------------------------------------===// namespace detail { class SAddSatGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: SAddSatGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.sadd.sat", odsAttrs.getContext()); } SAddSatGenericAdaptorBase(SAddSat op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class SAddSatGenericAdaptor : public detail::SAddSatGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::SAddSatGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: SAddSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} SAddSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SAddSatGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} SAddSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SAddSatGenericAdaptor(values, attrs, Properties{}, {}) {} SAddSatGenericAdaptor(RangeT values, const SAddSatGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> SAddSatGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 SAddSatAdaptor : public SAddSatGenericAdaptor<::mlir::ValueRange> { public: using SAddSatGenericAdaptor::SAddSatGenericAdaptor; SAddSatAdaptor(SAddSat op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class SAddSat : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = SAddSatAdaptor; template using GenericAdaptor = SAddSatGenericAdaptor; 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("llvm.intr.sadd.sat"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 SAddSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static SAddSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b); static SAddSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b); static SAddSat create(::mlir::ImplicitLocOpBuilder &builder, ::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 SAddSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b); static SAddSat 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 SAddSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SAddSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SAddSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SAddSat create(::mlir::ImplicitLocOpBuilder &builder, ::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 SAddSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SAddSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SAddSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SAddSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::SAddSat) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::SAddWithOverflowOp declarations //===----------------------------------------------------------------------===// namespace detail { class SAddWithOverflowOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: SAddWithOverflowOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.sadd.with.overflow", odsAttrs.getContext()); } SAddWithOverflowOpGenericAdaptorBase(SAddWithOverflowOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class SAddWithOverflowOpGenericAdaptor : public detail::SAddWithOverflowOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::SAddWithOverflowOpGenericAdaptorBase; public: SAddWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} SAddWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SAddWithOverflowOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} SAddWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SAddWithOverflowOpGenericAdaptor(values, attrs, Properties{}, {}) {} SAddWithOverflowOpGenericAdaptor(RangeT values, const SAddWithOverflowOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> SAddWithOverflowOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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)}; } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class SAddWithOverflowOpAdaptor : public SAddWithOverflowOpGenericAdaptor<::mlir::ValueRange> { public: using SAddWithOverflowOpGenericAdaptor::SAddWithOverflowOpGenericAdaptor; SAddWithOverflowOpAdaptor(SAddWithOverflowOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class SAddWithOverflowOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsElementType> { public: using Op::Op; using Op::print; using Adaptor = SAddWithOverflowOpAdaptor; template using GenericAdaptor = SAddWithOverflowOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.sadd.with.overflow"); } std::pair 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)}; } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 odsArg_0, ::mlir::Value odsArg_1); static SAddWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static SAddWithOverflowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static SAddWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static SAddWithOverflowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SAddWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SAddWithOverflowOp 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 SAddWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SAddWithOverflowOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::SAddWithOverflowOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::SCmpOp declarations //===----------------------------------------------------------------------===// namespace detail { class SCmpOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: SCmpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.scmp", odsAttrs.getContext()); } SCmpOpGenericAdaptorBase(SCmpOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class SCmpOpGenericAdaptor : public detail::SCmpOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::SCmpOpGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: SCmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} SCmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SCmpOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} SCmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SCmpOpGenericAdaptor(values, attrs, Properties{}, {}) {} SCmpOpGenericAdaptor(RangeT values, const SCmpOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> SCmpOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 SCmpOpAdaptor : public SCmpOpGenericAdaptor<::mlir::ValueRange> { public: using SCmpOpGenericAdaptor::SCmpOpGenericAdaptor; SCmpOpAdaptor(SCmpOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class SCmpOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameTypeOperands> { public: using Op::Op; using Op::print; using Adaptor = SCmpOpAdaptor; template using GenericAdaptor = SCmpOpGenericAdaptor; 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("llvm.intr.scmp"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 SCmpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static SCmpOp 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 SCmpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b); static SCmpOp 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 SCmpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SCmpOp 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 SCmpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SCmpOp 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::SCmpOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::SMaxOp declarations //===----------------------------------------------------------------------===// namespace detail { class SMaxOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: SMaxOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.smax", odsAttrs.getContext()); } SMaxOpGenericAdaptorBase(SMaxOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class SMaxOpGenericAdaptor : public detail::SMaxOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::SMaxOpGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: SMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} SMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SMaxOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} SMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SMaxOpGenericAdaptor(values, attrs, Properties{}, {}) {} SMaxOpGenericAdaptor(RangeT values, const SMaxOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> SMaxOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 SMaxOpAdaptor : public SMaxOpGenericAdaptor<::mlir::ValueRange> { public: using SMaxOpGenericAdaptor::SMaxOpGenericAdaptor; SMaxOpAdaptor(SMaxOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class SMaxOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = SMaxOpAdaptor; template using GenericAdaptor = SMaxOpGenericAdaptor; 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("llvm.intr.smax"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 SMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static SMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b); static SMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b); static SMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 SMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b); static SMaxOp 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 SMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 SMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::SMaxOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::SMinOp declarations //===----------------------------------------------------------------------===// namespace detail { class SMinOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: SMinOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.smin", odsAttrs.getContext()); } SMinOpGenericAdaptorBase(SMinOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class SMinOpGenericAdaptor : public detail::SMinOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::SMinOpGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: SMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} SMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SMinOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} SMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SMinOpGenericAdaptor(values, attrs, Properties{}, {}) {} SMinOpGenericAdaptor(RangeT values, const SMinOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> SMinOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 SMinOpAdaptor : public SMinOpGenericAdaptor<::mlir::ValueRange> { public: using SMinOpGenericAdaptor::SMinOpGenericAdaptor; SMinOpAdaptor(SMinOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class SMinOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = SMinOpAdaptor; template using GenericAdaptor = SMinOpGenericAdaptor; 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("llvm.intr.smin"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 SMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static SMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b); static SMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b); static SMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 SMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b); static SMinOp 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 SMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 SMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::SMinOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::SMulWithOverflowOp declarations //===----------------------------------------------------------------------===// namespace detail { class SMulWithOverflowOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: SMulWithOverflowOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.smul.with.overflow", odsAttrs.getContext()); } SMulWithOverflowOpGenericAdaptorBase(SMulWithOverflowOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class SMulWithOverflowOpGenericAdaptor : public detail::SMulWithOverflowOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::SMulWithOverflowOpGenericAdaptorBase; public: SMulWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} SMulWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SMulWithOverflowOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} SMulWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SMulWithOverflowOpGenericAdaptor(values, attrs, Properties{}, {}) {} SMulWithOverflowOpGenericAdaptor(RangeT values, const SMulWithOverflowOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> SMulWithOverflowOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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)}; } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class SMulWithOverflowOpAdaptor : public SMulWithOverflowOpGenericAdaptor<::mlir::ValueRange> { public: using SMulWithOverflowOpGenericAdaptor::SMulWithOverflowOpGenericAdaptor; SMulWithOverflowOpAdaptor(SMulWithOverflowOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class SMulWithOverflowOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsElementType> { public: using Op::Op; using Op::print; using Adaptor = SMulWithOverflowOpAdaptor; template using GenericAdaptor = SMulWithOverflowOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.smul.with.overflow"); } std::pair 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)}; } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 odsArg_0, ::mlir::Value odsArg_1); static SMulWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static SMulWithOverflowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static SMulWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static SMulWithOverflowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SMulWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SMulWithOverflowOp 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 SMulWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SMulWithOverflowOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::SMulWithOverflowOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::SSACopyOp declarations //===----------------------------------------------------------------------===// namespace detail { class SSACopyOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: SSACopyOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.ssa.copy", odsAttrs.getContext()); } SSACopyOpGenericAdaptorBase(SSACopyOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class SSACopyOpGenericAdaptor : public detail::SSACopyOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::SSACopyOpGenericAdaptorBase; static constexpr int odsIndex_operand = 0; public: SSACopyOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} SSACopyOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SSACopyOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} SSACopyOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SSACopyOpGenericAdaptor(values, attrs, Properties{}, {}) {} SSACopyOpGenericAdaptor(RangeT values, const SSACopyOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> SSACopyOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getOperand() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class SSACopyOpAdaptor : public SSACopyOpGenericAdaptor<::mlir::ValueRange> { public: using SSACopyOpGenericAdaptor::SSACopyOpGenericAdaptor; SSACopyOpAdaptor(SSACopyOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class SSACopyOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = SSACopyOpAdaptor; template using GenericAdaptor = SSACopyOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_operand = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.ssa.copy"); } std::pair 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::Type> getOperand() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getOperandMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 operand); static SSACopyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value operand); static SSACopyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value operand); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value operand); static SSACopyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value operand); static SSACopyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value operand); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value operand); static SSACopyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value operand); static SSACopyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value operand); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SSACopyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SSACopyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SSACopyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SSACopyOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 SSACopyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SSACopyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SSACopyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SSACopyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::SSACopyOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::SSHLSat declarations //===----------------------------------------------------------------------===// namespace detail { class SSHLSatGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: SSHLSatGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.sshl.sat", odsAttrs.getContext()); } SSHLSatGenericAdaptorBase(SSHLSat op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class SSHLSatGenericAdaptor : public detail::SSHLSatGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::SSHLSatGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: SSHLSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} SSHLSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SSHLSatGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} SSHLSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SSHLSatGenericAdaptor(values, attrs, Properties{}, {}) {} SSHLSatGenericAdaptor(RangeT values, const SSHLSatGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> SSHLSatGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 SSHLSatAdaptor : public SSHLSatGenericAdaptor<::mlir::ValueRange> { public: using SSHLSatGenericAdaptor::SSHLSatGenericAdaptor; SSHLSatAdaptor(SSHLSat op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class SSHLSat : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = SSHLSatAdaptor; template using GenericAdaptor = SSHLSatGenericAdaptor; 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("llvm.intr.sshl.sat"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 SSHLSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static SSHLSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b); static SSHLSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b); static SSHLSat create(::mlir::ImplicitLocOpBuilder &builder, ::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 SSHLSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b); static SSHLSat 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 SSHLSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SSHLSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SSHLSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SSHLSat create(::mlir::ImplicitLocOpBuilder &builder, ::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 SSHLSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SSHLSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SSHLSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SSHLSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::SSHLSat) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::SSubSat declarations //===----------------------------------------------------------------------===// namespace detail { class SSubSatGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: SSubSatGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.ssub.sat", odsAttrs.getContext()); } SSubSatGenericAdaptorBase(SSubSat op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class SSubSatGenericAdaptor : public detail::SSubSatGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::SSubSatGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: SSubSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} SSubSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SSubSatGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} SSubSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SSubSatGenericAdaptor(values, attrs, Properties{}, {}) {} SSubSatGenericAdaptor(RangeT values, const SSubSatGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> SSubSatGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 SSubSatAdaptor : public SSubSatGenericAdaptor<::mlir::ValueRange> { public: using SSubSatGenericAdaptor::SSubSatGenericAdaptor; SSubSatAdaptor(SSubSat op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class SSubSat : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = SSubSatAdaptor; template using GenericAdaptor = SSubSatGenericAdaptor; 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("llvm.intr.ssub.sat"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 SSubSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static SSubSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b); static SSubSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b); static SSubSat create(::mlir::ImplicitLocOpBuilder &builder, ::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 SSubSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b); static SSubSat 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 SSubSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SSubSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SSubSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SSubSat create(::mlir::ImplicitLocOpBuilder &builder, ::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 SSubSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SSubSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SSubSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SSubSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::SSubSat) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::SSubWithOverflowOp declarations //===----------------------------------------------------------------------===// namespace detail { class SSubWithOverflowOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: SSubWithOverflowOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.ssub.with.overflow", odsAttrs.getContext()); } SSubWithOverflowOpGenericAdaptorBase(SSubWithOverflowOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class SSubWithOverflowOpGenericAdaptor : public detail::SSubWithOverflowOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::SSubWithOverflowOpGenericAdaptorBase; public: SSubWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} SSubWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SSubWithOverflowOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} SSubWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SSubWithOverflowOpGenericAdaptor(values, attrs, Properties{}, {}) {} SSubWithOverflowOpGenericAdaptor(RangeT values, const SSubWithOverflowOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> SSubWithOverflowOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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)}; } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class SSubWithOverflowOpAdaptor : public SSubWithOverflowOpGenericAdaptor<::mlir::ValueRange> { public: using SSubWithOverflowOpGenericAdaptor::SSubWithOverflowOpGenericAdaptor; SSubWithOverflowOpAdaptor(SSubWithOverflowOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class SSubWithOverflowOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsElementType> { public: using Op::Op; using Op::print; using Adaptor = SSubWithOverflowOpAdaptor; template using GenericAdaptor = SSubWithOverflowOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.ssub.with.overflow"); } std::pair 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)}; } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 odsArg_0, ::mlir::Value odsArg_1); static SSubWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static SSubWithOverflowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static SSubWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static SSubWithOverflowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SSubWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SSubWithOverflowOp 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 SSubWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SSubWithOverflowOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::SSubWithOverflowOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::SinOp declarations //===----------------------------------------------------------------------===// namespace detail { class SinOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: SinOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.sin", odsAttrs.getContext()); } SinOpGenericAdaptorBase(SinOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class SinOpGenericAdaptor : public detail::SinOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::SinOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: SinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} SinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SinOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} SinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SinOpGenericAdaptor(values, attrs, Properties{}, {}) {} SinOpGenericAdaptor(RangeT values, const SinOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> SinOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class SinOpAdaptor : public SinOpGenericAdaptor<::mlir::ValueRange> { public: using SinOpGenericAdaptor::SinOpGenericAdaptor; SinOpAdaptor(SinOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class SinOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = SinOpAdaptor; template using GenericAdaptor = SinOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.sin"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::SinOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::SinOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::SincosOp declarations //===----------------------------------------------------------------------===// namespace detail { class SincosOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: SincosOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.sincos", odsAttrs.getContext()); } SincosOpGenericAdaptorBase(SincosOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class SincosOpGenericAdaptor : public detail::SincosOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::SincosOpGenericAdaptorBase; static constexpr int odsIndex_val = 0; public: SincosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} SincosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SincosOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} SincosOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SincosOpGenericAdaptor(values, attrs, Properties{}, {}) {} SincosOpGenericAdaptor(RangeT values, const SincosOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> SincosOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getVal() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class SincosOpAdaptor : public SincosOpGenericAdaptor<::mlir::ValueRange> { public: using SincosOpGenericAdaptor::SincosOpGenericAdaptor; SincosOpAdaptor(SincosOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class SincosOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = SincosOpAdaptor; template using GenericAdaptor = SincosOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_val = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.sincos"); } std::pair 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::Type> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value val, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SincosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SincosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SincosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SincosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value val, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SincosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value val, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SincosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value val, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SincosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SincosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SincosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SincosOp 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 SincosOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SincosOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); ::llvm::LogicalResult verify(); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::SincosOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::SincosOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::SinhOp declarations //===----------------------------------------------------------------------===// namespace detail { class SinhOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: SinhOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.sinh", odsAttrs.getContext()); } SinhOpGenericAdaptorBase(SinhOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class SinhOpGenericAdaptor : public detail::SinhOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::SinhOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: SinhOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} SinhOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SinhOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} SinhOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SinhOpGenericAdaptor(values, attrs, Properties{}, {}) {} SinhOpGenericAdaptor(RangeT values, const SinhOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> SinhOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class SinhOpAdaptor : public SinhOpGenericAdaptor<::mlir::ValueRange> { public: using SinhOpGenericAdaptor::SinhOpGenericAdaptor; SinhOpAdaptor(SinhOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class SinhOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = SinhOpAdaptor; template using GenericAdaptor = SinhOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.sinh"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SinhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SinhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SinhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SinhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SinhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SinhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SinhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SinhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SinhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SinhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SinhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SinhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SinhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SinhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SinhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SinhOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 SinhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SinhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SinhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SinhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::SinhOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::SinhOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::SqrtOp declarations //===----------------------------------------------------------------------===// namespace detail { class SqrtOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: SqrtOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.sqrt", odsAttrs.getContext()); } SqrtOpGenericAdaptorBase(SqrtOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class SqrtOpGenericAdaptor : public detail::SqrtOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::SqrtOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: SqrtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} SqrtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : SqrtOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} SqrtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : SqrtOpGenericAdaptor(values, attrs, Properties{}, {}) {} SqrtOpGenericAdaptor(RangeT values, const SqrtOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> SqrtOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class SqrtOpAdaptor : public SqrtOpGenericAdaptor<::mlir::ValueRange> { public: using SqrtOpGenericAdaptor::SqrtOpGenericAdaptor; SqrtOpAdaptor(SqrtOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class SqrtOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = SqrtOpAdaptor; template using GenericAdaptor = SqrtOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.sqrt"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SqrtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static SqrtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::SqrtOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::SqrtOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::StackRestoreOp declarations //===----------------------------------------------------------------------===// namespace detail { class StackRestoreOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: StackRestoreOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.stackrestore", odsAttrs.getContext()); } StackRestoreOpGenericAdaptorBase(StackRestoreOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class StackRestoreOpGenericAdaptor : public detail::StackRestoreOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::StackRestoreOpGenericAdaptorBase; static constexpr int odsIndex_ptr = 0; public: StackRestoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} StackRestoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : StackRestoreOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} StackRestoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : StackRestoreOpGenericAdaptor(values, attrs, Properties{}, {}) {} StackRestoreOpGenericAdaptor(RangeT values, const StackRestoreOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> StackRestoreOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getPtr() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class StackRestoreOpAdaptor : public StackRestoreOpGenericAdaptor<::mlir::ValueRange> { public: using StackRestoreOpGenericAdaptor::StackRestoreOpGenericAdaptor; StackRestoreOpAdaptor(StackRestoreOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class StackRestoreOp : public ::mlir::Op { public: using Op::Op; using Op::print; using Adaptor = StackRestoreOpAdaptor; template using GenericAdaptor = StackRestoreOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_ptr = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.stackrestore"); } std::pair 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::LLVM::LLVMPointerType> getPtr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getPtrMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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::Value ptr); static StackRestoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr); static StackRestoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr); static StackRestoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr); static StackRestoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static StackRestoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static StackRestoreOp 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 StackRestoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static StackRestoreOp 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::StackRestoreOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::StackSaveOp declarations //===----------------------------------------------------------------------===// namespace detail { class StackSaveOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: StackSaveOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.stacksave", odsAttrs.getContext()); } StackSaveOpGenericAdaptorBase(StackSaveOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class StackSaveOpGenericAdaptor : public detail::StackSaveOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::StackSaveOpGenericAdaptorBase; public: StackSaveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} StackSaveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : StackSaveOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} StackSaveOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : StackSaveOpGenericAdaptor(values, attrs, Properties{}, {}) {} StackSaveOpGenericAdaptor(RangeT values, const StackSaveOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> StackSaveOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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)}; } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class StackSaveOpAdaptor : public StackSaveOpGenericAdaptor<::mlir::ValueRange> { public: using StackSaveOpGenericAdaptor::StackSaveOpGenericAdaptor; StackSaveOpAdaptor(StackSaveOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class StackSaveOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants> { public: using Op::Op; using Op::print; using Adaptor = StackSaveOpAdaptor; template using GenericAdaptor = StackSaveOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.stacksave"); } std::pair 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)}; } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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); static StackSaveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res); static StackSaveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes); static StackSaveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes); static StackSaveOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static StackSaveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static StackSaveOp 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 StackSaveOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static StackSaveOp 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::StackSaveOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::StepVectorOp declarations //===----------------------------------------------------------------------===// namespace detail { class StepVectorOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: StepVectorOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.stepvector", odsAttrs.getContext()); } StepVectorOpGenericAdaptorBase(StepVectorOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class StepVectorOpGenericAdaptor : public detail::StepVectorOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::StepVectorOpGenericAdaptorBase; public: StepVectorOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} StepVectorOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : StepVectorOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} StepVectorOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : StepVectorOpGenericAdaptor(values, attrs, Properties{}, {}) {} StepVectorOpGenericAdaptor(RangeT values, const StepVectorOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> StepVectorOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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)}; } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class StepVectorOpAdaptor : public StepVectorOpGenericAdaptor<::mlir::ValueRange> { public: using StepVectorOpGenericAdaptor::StepVectorOpGenericAdaptor; StepVectorOpAdaptor(StepVectorOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class StepVectorOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = StepVectorOpAdaptor; template using GenericAdaptor = StepVectorOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.stepvector"); } std::pair 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)}; } std::pair 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 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); static StepVectorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res); static StepVectorOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes); static StepVectorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes); static StepVectorOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static StepVectorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static StepVectorOp 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 StepVectorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static StepVectorOp 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::StepVectorOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::StripInvariantGroupOp declarations //===----------------------------------------------------------------------===// namespace detail { class StripInvariantGroupOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: StripInvariantGroupOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.strip.invariant.group", odsAttrs.getContext()); } StripInvariantGroupOpGenericAdaptorBase(StripInvariantGroupOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class StripInvariantGroupOpGenericAdaptor : public detail::StripInvariantGroupOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::StripInvariantGroupOpGenericAdaptorBase; static constexpr int odsIndex_ptr = 0; public: StripInvariantGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} StripInvariantGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : StripInvariantGroupOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} StripInvariantGroupOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : StripInvariantGroupOpGenericAdaptor(values, attrs, Properties{}, {}) {} StripInvariantGroupOpGenericAdaptor(RangeT values, const StripInvariantGroupOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> StripInvariantGroupOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getPtr() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class StripInvariantGroupOpAdaptor : public StripInvariantGroupOpGenericAdaptor<::mlir::ValueRange> { public: using StripInvariantGroupOpGenericAdaptor::StripInvariantGroupOpGenericAdaptor; StripInvariantGroupOpAdaptor(StripInvariantGroupOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class StripInvariantGroupOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::PromotableOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = StripInvariantGroupOpAdaptor; template using GenericAdaptor = StripInvariantGroupOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_ptr = 0; using Properties = FoldAdaptor::Properties; using ::mlir::PromotableOpInterface::Trait::requiresReplacedValues; using ::mlir::PromotableOpInterface::Trait::visitReplacedValues; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.strip.invariant.group"); } std::pair 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::LLVM::LLVMPointerType> getPtr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getPtrMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::LLVM::LLVMPointerType> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*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 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 ptr); static StripInvariantGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr); static StripInvariantGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value ptr); static StripInvariantGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value ptr); static StripInvariantGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value ptr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr); static StripInvariantGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr); static StripInvariantGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static StripInvariantGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static StripInvariantGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static StripInvariantGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static StripInvariantGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 StripInvariantGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static StripInvariantGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static StripInvariantGroupOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static StripInvariantGroupOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); bool canUsesBeRemoved(const ::llvm::SmallPtrSetImpl<::mlir::OpOperand *> &blockingUses, ::llvm::SmallVectorImpl<::mlir::OpOperand *> &newBlockingUses, const ::mlir::DataLayout &datalayout); ::mlir::DeletionKind removeBlockingUses(const ::llvm::SmallPtrSetImpl &blockingUses, ::mlir::OpBuilder &builder); static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result); void print(::mlir::OpAsmPrinter &_odsPrinter); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::StripInvariantGroupOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::TanOp declarations //===----------------------------------------------------------------------===// namespace detail { class TanOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: TanOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.tan", odsAttrs.getContext()); } TanOpGenericAdaptorBase(TanOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class TanOpGenericAdaptor : public detail::TanOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::TanOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: TanOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} TanOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : TanOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} TanOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : TanOpGenericAdaptor(values, attrs, Properties{}, {}) {} TanOpGenericAdaptor(RangeT values, const TanOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> TanOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class TanOpAdaptor : public TanOpGenericAdaptor<::mlir::ValueRange> { public: using TanOpGenericAdaptor::TanOpGenericAdaptor; TanOpAdaptor(TanOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class TanOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = TanOpAdaptor; template using GenericAdaptor = TanOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.tan"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static TanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static TanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static TanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static TanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static TanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static TanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static TanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static TanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static TanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static TanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static TanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static TanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static TanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static TanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static TanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static TanOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 TanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static TanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static TanOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static TanOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::TanOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::TanOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::TanhOp declarations //===----------------------------------------------------------------------===// namespace detail { class TanhOpGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: TanhOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.tanh", odsAttrs.getContext()); } TanhOpGenericAdaptorBase(TanhOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class TanhOpGenericAdaptor : public detail::TanhOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::TanhOpGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: TanhOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} TanhOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : TanhOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} TanhOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : TanhOpGenericAdaptor(values, attrs, Properties{}, {}) {} TanhOpGenericAdaptor(RangeT values, const TanhOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> TanhOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class TanhOpAdaptor : public TanhOpGenericAdaptor<::mlir::ValueRange> { public: using TanhOpGenericAdaptor::TanhOpGenericAdaptor; TanhOpAdaptor(TanhOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class TanhOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = TanhOpAdaptor; template using GenericAdaptor = TanhOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.tanh"); } std::pair 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::Type> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static TanhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static TanhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static TanhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static TanhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static TanhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static TanhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static TanhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static TanhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static TanhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static TanhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static TanhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static TanhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static TanhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static TanhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static TanhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static TanhOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 TanhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static TanhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static TanhOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static TanhOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::TanhOp) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::TanhOpGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::ThreadlocalAddressOp declarations //===----------------------------------------------------------------------===// namespace detail { class ThreadlocalAddressOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: ThreadlocalAddressOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.threadlocal.address", odsAttrs.getContext()); } ThreadlocalAddressOpGenericAdaptorBase(ThreadlocalAddressOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class ThreadlocalAddressOpGenericAdaptor : public detail::ThreadlocalAddressOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::ThreadlocalAddressOpGenericAdaptorBase; static constexpr int odsIndex_global = 0; public: ThreadlocalAddressOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} ThreadlocalAddressOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : ThreadlocalAddressOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} ThreadlocalAddressOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : ThreadlocalAddressOpGenericAdaptor(values, attrs, Properties{}, {}) {} ThreadlocalAddressOpGenericAdaptor(RangeT values, const ThreadlocalAddressOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> ThreadlocalAddressOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getGlobal() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class ThreadlocalAddressOpAdaptor : public ThreadlocalAddressOpGenericAdaptor<::mlir::ValueRange> { public: using ThreadlocalAddressOpGenericAdaptor::ThreadlocalAddressOpGenericAdaptor; ThreadlocalAddressOpAdaptor(ThreadlocalAddressOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class ThreadlocalAddressOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = ThreadlocalAddressOpAdaptor; template using GenericAdaptor = ThreadlocalAddressOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_global = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.threadlocal.address"); } std::pair 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::LLVM::LLVMPointerType> getGlobal() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getGlobalMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 global); static ThreadlocalAddressOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value global); static ThreadlocalAddressOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value global); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value global); static ThreadlocalAddressOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value global); static ThreadlocalAddressOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value global); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ThreadlocalAddressOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static ThreadlocalAddressOp 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 ThreadlocalAddressOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static ThreadlocalAddressOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::ThreadlocalAddressOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::Trap declarations //===----------------------------------------------------------------------===// namespace detail { class TrapGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: TrapGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.trap", odsAttrs.getContext()); } TrapGenericAdaptorBase(Trap op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class TrapGenericAdaptor : public detail::TrapGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::TrapGenericAdaptorBase; public: TrapGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} TrapGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : TrapGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} TrapGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : TrapGenericAdaptor(values, attrs, Properties{}, {}) {} TrapGenericAdaptor(RangeT values, const TrapGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> TrapGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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)}; } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class TrapAdaptor : public TrapGenericAdaptor<::mlir::ValueRange> { public: using TrapGenericAdaptor::TrapGenericAdaptor; TrapAdaptor(Trap op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class Trap : public ::mlir::Op { public: using Op::Op; using Op::print; using Adaptor = TrapAdaptor; template using GenericAdaptor = TrapGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.trap"); } std::pair 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)}; } std::pair 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)}; } 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 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); static Trap create(::mlir::OpBuilder &builder, ::mlir::Location location); static Trap create(::mlir::ImplicitLocOpBuilder &builder); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes); static Trap create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes); static Trap create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Trap create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static Trap 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 Trap create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static Trap 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::Trap) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::UAddSat declarations //===----------------------------------------------------------------------===// namespace detail { class UAddSatGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: UAddSatGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.uadd.sat", odsAttrs.getContext()); } UAddSatGenericAdaptorBase(UAddSat op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class UAddSatGenericAdaptor : public detail::UAddSatGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::UAddSatGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: UAddSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} UAddSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UAddSatGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} UAddSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : UAddSatGenericAdaptor(values, attrs, Properties{}, {}) {} UAddSatGenericAdaptor(RangeT values, const UAddSatGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> UAddSatGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 UAddSatAdaptor : public UAddSatGenericAdaptor<::mlir::ValueRange> { public: using UAddSatGenericAdaptor::UAddSatGenericAdaptor; UAddSatAdaptor(UAddSat op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class UAddSat : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = UAddSatAdaptor; template using GenericAdaptor = UAddSatGenericAdaptor; 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("llvm.intr.uadd.sat"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 UAddSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static UAddSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b); static UAddSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b); static UAddSat create(::mlir::ImplicitLocOpBuilder &builder, ::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 UAddSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b); static UAddSat 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 UAddSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static UAddSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static UAddSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static UAddSat create(::mlir::ImplicitLocOpBuilder &builder, ::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 UAddSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static UAddSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static UAddSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static UAddSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::UAddSat) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::UAddWithOverflowOp declarations //===----------------------------------------------------------------------===// namespace detail { class UAddWithOverflowOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: UAddWithOverflowOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.uadd.with.overflow", odsAttrs.getContext()); } UAddWithOverflowOpGenericAdaptorBase(UAddWithOverflowOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class UAddWithOverflowOpGenericAdaptor : public detail::UAddWithOverflowOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::UAddWithOverflowOpGenericAdaptorBase; public: UAddWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} UAddWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UAddWithOverflowOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} UAddWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : UAddWithOverflowOpGenericAdaptor(values, attrs, Properties{}, {}) {} UAddWithOverflowOpGenericAdaptor(RangeT values, const UAddWithOverflowOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> UAddWithOverflowOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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)}; } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class UAddWithOverflowOpAdaptor : public UAddWithOverflowOpGenericAdaptor<::mlir::ValueRange> { public: using UAddWithOverflowOpGenericAdaptor::UAddWithOverflowOpGenericAdaptor; UAddWithOverflowOpAdaptor(UAddWithOverflowOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class UAddWithOverflowOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsElementType> { public: using Op::Op; using Op::print; using Adaptor = UAddWithOverflowOpAdaptor; template using GenericAdaptor = UAddWithOverflowOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.uadd.with.overflow"); } std::pair 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)}; } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 odsArg_0, ::mlir::Value odsArg_1); static UAddWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static UAddWithOverflowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static UAddWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static UAddWithOverflowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static UAddWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static UAddWithOverflowOp 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 UAddWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static UAddWithOverflowOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::UAddWithOverflowOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::UBSanTrap declarations //===----------------------------------------------------------------------===// namespace detail { class UBSanTrapGenericAdaptorBase { public: struct Properties { using failureKindTy = ::mlir::IntegerAttr; failureKindTy failureKind; auto getFailureKind() const { auto &propStorage = this->failureKind; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setFailureKind(const ::mlir::IntegerAttr &propValue) { this->failureKind = propValue; } bool operator==(const Properties &rhs) const { return rhs.failureKind == this->failureKind && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: UBSanTrapGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.ubsantrap", odsAttrs.getContext()); } UBSanTrapGenericAdaptorBase(UBSanTrap op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getFailureKindAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().failureKind); return attr; } uint8_t getFailureKind(); }; } // namespace detail template class UBSanTrapGenericAdaptor : public detail::UBSanTrapGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::UBSanTrapGenericAdaptorBase; public: UBSanTrapGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} UBSanTrapGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UBSanTrapGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} UBSanTrapGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : UBSanTrapGenericAdaptor(values, attrs, Properties{}, {}) {} UBSanTrapGenericAdaptor(RangeT values, const UBSanTrapGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> UBSanTrapGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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)}; } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class UBSanTrapAdaptor : public UBSanTrapGenericAdaptor<::mlir::ValueRange> { public: using UBSanTrapGenericAdaptor::UBSanTrapGenericAdaptor; UBSanTrapAdaptor(UBSanTrap op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class UBSanTrap : public ::mlir::Op { public: using Op::Op; using Op::print; using Adaptor = UBSanTrapAdaptor; template using GenericAdaptor = UBSanTrapGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("failureKind")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFailureKindAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFailureKindAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.ubsantrap"); } std::pair 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)}; } std::pair 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)}; } 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getFailureKindAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().failureKind); } uint8_t getFailureKind(); void setFailureKindAttr(::mlir::IntegerAttr attr) { getProperties().failureKind = attr; } void setFailureKind(uint8_t attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr failureKind); static UBSanTrap create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr failureKind); static UBSanTrap create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr failureKind); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr failureKind); static UBSanTrap create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr failureKind); static UBSanTrap create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr failureKind); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint8_t failureKind); static UBSanTrap create(::mlir::OpBuilder &builder, ::mlir::Location location, uint8_t failureKind); static UBSanTrap create(::mlir::ImplicitLocOpBuilder &builder, uint8_t failureKind); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint8_t failureKind); static UBSanTrap create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint8_t failureKind); static UBSanTrap create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint8_t failureKind); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static UBSanTrap create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static UBSanTrap 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 UBSanTrap create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static UBSanTrap 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); static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void print(::mlir::OpAsmPrinter &_odsPrinter); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::UBSanTrap) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::UBSanTrapGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::UCmpOp declarations //===----------------------------------------------------------------------===// namespace detail { class UCmpOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: UCmpOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.ucmp", odsAttrs.getContext()); } UCmpOpGenericAdaptorBase(UCmpOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class UCmpOpGenericAdaptor : public detail::UCmpOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::UCmpOpGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: UCmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} UCmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UCmpOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} UCmpOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : UCmpOpGenericAdaptor(values, attrs, Properties{}, {}) {} UCmpOpGenericAdaptor(RangeT values, const UCmpOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> UCmpOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 UCmpOpAdaptor : public UCmpOpGenericAdaptor<::mlir::ValueRange> { public: using UCmpOpGenericAdaptor::UCmpOpGenericAdaptor; UCmpOpAdaptor(UCmpOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class UCmpOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameTypeOperands> { public: using Op::Op; using Op::print; using Adaptor = UCmpOpAdaptor; template using GenericAdaptor = UCmpOpGenericAdaptor; 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("llvm.intr.ucmp"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 UCmpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static UCmpOp 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 UCmpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b); static UCmpOp 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 UCmpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static UCmpOp 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 UCmpOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static UCmpOp 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::UCmpOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::UMaxOp declarations //===----------------------------------------------------------------------===// namespace detail { class UMaxOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: UMaxOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.umax", odsAttrs.getContext()); } UMaxOpGenericAdaptorBase(UMaxOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class UMaxOpGenericAdaptor : public detail::UMaxOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::UMaxOpGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: UMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} UMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UMaxOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} UMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : UMaxOpGenericAdaptor(values, attrs, Properties{}, {}) {} UMaxOpGenericAdaptor(RangeT values, const UMaxOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> UMaxOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 UMaxOpAdaptor : public UMaxOpGenericAdaptor<::mlir::ValueRange> { public: using UMaxOpGenericAdaptor::UMaxOpGenericAdaptor; UMaxOpAdaptor(UMaxOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class UMaxOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = UMaxOpAdaptor; template using GenericAdaptor = UMaxOpGenericAdaptor; 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("llvm.intr.umax"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 UMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static UMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b); static UMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b); static UMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 UMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b); static UMaxOp 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 UMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static UMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static UMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static UMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 UMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static UMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static UMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static UMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::UMaxOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::UMinOp declarations //===----------------------------------------------------------------------===// namespace detail { class UMinOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: UMinOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.umin", odsAttrs.getContext()); } UMinOpGenericAdaptorBase(UMinOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class UMinOpGenericAdaptor : public detail::UMinOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::UMinOpGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: UMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} UMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UMinOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} UMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : UMinOpGenericAdaptor(values, attrs, Properties{}, {}) {} UMinOpGenericAdaptor(RangeT values, const UMinOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> UMinOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 UMinOpAdaptor : public UMinOpGenericAdaptor<::mlir::ValueRange> { public: using UMinOpGenericAdaptor::UMinOpGenericAdaptor; UMinOpAdaptor(UMinOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class UMinOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = UMinOpAdaptor; template using GenericAdaptor = UMinOpGenericAdaptor; 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("llvm.intr.umin"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 UMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static UMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b); static UMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b); static UMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 UMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b); static UMinOp 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 UMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static UMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static UMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static UMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::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 UMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static UMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static UMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static UMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::UMinOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::UMulWithOverflowOp declarations //===----------------------------------------------------------------------===// namespace detail { class UMulWithOverflowOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: UMulWithOverflowOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.umul.with.overflow", odsAttrs.getContext()); } UMulWithOverflowOpGenericAdaptorBase(UMulWithOverflowOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class UMulWithOverflowOpGenericAdaptor : public detail::UMulWithOverflowOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::UMulWithOverflowOpGenericAdaptorBase; public: UMulWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} UMulWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : UMulWithOverflowOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} UMulWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : UMulWithOverflowOpGenericAdaptor(values, attrs, Properties{}, {}) {} UMulWithOverflowOpGenericAdaptor(RangeT values, const UMulWithOverflowOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> UMulWithOverflowOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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)}; } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class UMulWithOverflowOpAdaptor : public UMulWithOverflowOpGenericAdaptor<::mlir::ValueRange> { public: using UMulWithOverflowOpGenericAdaptor::UMulWithOverflowOpGenericAdaptor; UMulWithOverflowOpAdaptor(UMulWithOverflowOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class UMulWithOverflowOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsElementType> { public: using Op::Op; using Op::print; using Adaptor = UMulWithOverflowOpAdaptor; template using GenericAdaptor = UMulWithOverflowOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.umul.with.overflow"); } std::pair 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)}; } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 odsArg_0, ::mlir::Value odsArg_1); static UMulWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static UMulWithOverflowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static UMulWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static UMulWithOverflowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static UMulWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static UMulWithOverflowOp 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 UMulWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static UMulWithOverflowOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::UMulWithOverflowOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::USHLSat declarations //===----------------------------------------------------------------------===// namespace detail { class USHLSatGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: USHLSatGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.ushl.sat", odsAttrs.getContext()); } USHLSatGenericAdaptorBase(USHLSat op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class USHLSatGenericAdaptor : public detail::USHLSatGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::USHLSatGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: USHLSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} USHLSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : USHLSatGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} USHLSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : USHLSatGenericAdaptor(values, attrs, Properties{}, {}) {} USHLSatGenericAdaptor(RangeT values, const USHLSatGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> USHLSatGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 USHLSatAdaptor : public USHLSatGenericAdaptor<::mlir::ValueRange> { public: using USHLSatGenericAdaptor::USHLSatGenericAdaptor; USHLSatAdaptor(USHLSat op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class USHLSat : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = USHLSatAdaptor; template using GenericAdaptor = USHLSatGenericAdaptor; 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("llvm.intr.ushl.sat"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 USHLSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static USHLSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b); static USHLSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b); static USHLSat create(::mlir::ImplicitLocOpBuilder &builder, ::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 USHLSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b); static USHLSat 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 USHLSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static USHLSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static USHLSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static USHLSat create(::mlir::ImplicitLocOpBuilder &builder, ::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 USHLSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static USHLSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static USHLSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static USHLSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::USHLSat) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::USubSat declarations //===----------------------------------------------------------------------===// namespace detail { class USubSatGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: USubSatGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.usub.sat", odsAttrs.getContext()); } USubSatGenericAdaptorBase(USubSat op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class USubSatGenericAdaptor : public detail::USubSatGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::USubSatGenericAdaptorBase; static constexpr int odsIndex_a = 0; static constexpr int odsIndex_b = 1; public: USubSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} USubSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : USubSatGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} USubSatGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : USubSatGenericAdaptor(values, attrs, Properties{}, {}) {} USubSatGenericAdaptor(RangeT values, const USubSatGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> USubSatGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 USubSatAdaptor : public USubSatGenericAdaptor<::mlir::ValueRange> { public: using USubSatGenericAdaptor::USubSatGenericAdaptor; USubSatAdaptor(USubSat op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class USubSat : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultType, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = USubSatAdaptor; template using GenericAdaptor = USubSatGenericAdaptor; 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("llvm.intr.usub.sat"); } std::pair 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::Type> getA() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::Type> getB() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 USubSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static USubSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value a, ::mlir::Value b); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value a, ::mlir::Value b); static USubSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value a, ::mlir::Value b); static USubSat create(::mlir::ImplicitLocOpBuilder &builder, ::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 USubSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value a, ::mlir::Value b); static USubSat 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 USubSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static USubSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static USubSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static USubSat create(::mlir::ImplicitLocOpBuilder &builder, ::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 USubSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static USubSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static USubSat create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static USubSat create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::USubSat) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::USubWithOverflowOp declarations //===----------------------------------------------------------------------===// namespace detail { class USubWithOverflowOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: USubWithOverflowOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.usub.with.overflow", odsAttrs.getContext()); } USubWithOverflowOpGenericAdaptorBase(USubWithOverflowOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class USubWithOverflowOpGenericAdaptor : public detail::USubWithOverflowOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::USubWithOverflowOpGenericAdaptorBase; public: USubWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} USubWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : USubWithOverflowOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} USubWithOverflowOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : USubWithOverflowOpGenericAdaptor(values, attrs, Properties{}, {}) {} USubWithOverflowOpGenericAdaptor(RangeT values, const USubWithOverflowOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> USubWithOverflowOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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)}; } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class USubWithOverflowOpAdaptor : public USubWithOverflowOpGenericAdaptor<::mlir::ValueRange> { public: using USubWithOverflowOpGenericAdaptor::USubWithOverflowOpGenericAdaptor; USubWithOverflowOpAdaptor(USubWithOverflowOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class USubWithOverflowOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsElementType> { public: using Op::Op; using Op::print; using Adaptor = USubWithOverflowOpAdaptor; template using GenericAdaptor = USubWithOverflowOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.usub.with.overflow"); } std::pair 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)}; } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 odsArg_0, ::mlir::Value odsArg_1); static USubWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static USubWithOverflowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static USubWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static USubWithOverflowOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value odsArg_0, ::mlir::Value odsArg_1); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static USubWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static USubWithOverflowOp 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 USubWithOverflowOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static USubWithOverflowOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::USubWithOverflowOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPAShrOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPAShrOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPAShrOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.ashr", odsAttrs.getContext()); } VPAShrOpGenericAdaptorBase(VPAShrOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPAShrOpGenericAdaptor : public detail::VPAShrOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPAShrOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPAShrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPAShrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPAShrOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPAShrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPAShrOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPAShrOpGenericAdaptor(RangeT values, const VPAShrOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPAShrOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPAShrOpAdaptor : public VPAShrOpGenericAdaptor<::mlir::ValueRange> { public: using VPAShrOpGenericAdaptor::VPAShrOpGenericAdaptor; VPAShrOpAdaptor(VPAShrOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPAShrOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPAShrOpAdaptor; template using GenericAdaptor = VPAShrOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.ashr"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPAShrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPAShrOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPAShrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPAShrOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPAShrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPAShrOp 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 VPAShrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPAShrOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPAShrOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPAddOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPAddOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPAddOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.add", odsAttrs.getContext()); } VPAddOpGenericAdaptorBase(VPAddOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPAddOpGenericAdaptor : public detail::VPAddOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPAddOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPAddOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPAddOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPAddOpGenericAdaptor(RangeT values, const VPAddOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPAddOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPAddOpAdaptor : public VPAddOpGenericAdaptor<::mlir::ValueRange> { public: using VPAddOpGenericAdaptor::VPAddOpGenericAdaptor; VPAddOpAdaptor(VPAddOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPAddOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPAddOpAdaptor; template using GenericAdaptor = VPAddOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.add"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPAddOp 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 VPAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPAddOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPAddOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPAndOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPAndOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPAndOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.and", odsAttrs.getContext()); } VPAndOpGenericAdaptorBase(VPAndOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPAndOpGenericAdaptor : public detail::VPAndOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPAndOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPAndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPAndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPAndOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPAndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPAndOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPAndOpGenericAdaptor(RangeT values, const VPAndOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPAndOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPAndOpAdaptor : public VPAndOpGenericAdaptor<::mlir::ValueRange> { public: using VPAndOpGenericAdaptor::VPAndOpGenericAdaptor; VPAndOpAdaptor(VPAndOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPAndOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPAndOpAdaptor; template using GenericAdaptor = VPAndOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.and"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPAndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPAndOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPAndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPAndOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPAndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPAndOp 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 VPAndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPAndOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPAndOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPFAddOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPFAddOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPFAddOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.fadd", odsAttrs.getContext()); } VPFAddOpGenericAdaptorBase(VPFAddOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPFAddOpGenericAdaptor : public detail::VPFAddOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPFAddOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPFAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPFAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPFAddOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPFAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPFAddOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPFAddOpGenericAdaptor(RangeT values, const VPFAddOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPFAddOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPFAddOpAdaptor : public VPFAddOpGenericAdaptor<::mlir::ValueRange> { public: using VPFAddOpGenericAdaptor::VPFAddOpGenericAdaptor; VPFAddOpAdaptor(VPFAddOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPFAddOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPFAddOpAdaptor; template using GenericAdaptor = VPFAddOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.fadd"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFAddOp 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 VPFAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPFAddOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPFAddOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPFDivOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPFDivOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPFDivOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.fdiv", odsAttrs.getContext()); } VPFDivOpGenericAdaptorBase(VPFDivOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPFDivOpGenericAdaptor : public detail::VPFDivOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPFDivOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPFDivOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPFDivOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPFDivOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPFDivOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPFDivOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPFDivOpGenericAdaptor(RangeT values, const VPFDivOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPFDivOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPFDivOpAdaptor : public VPFDivOpGenericAdaptor<::mlir::ValueRange> { public: using VPFDivOpGenericAdaptor::VPFDivOpGenericAdaptor; VPFDivOpAdaptor(VPFDivOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPFDivOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPFDivOpAdaptor; template using GenericAdaptor = VPFDivOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.fdiv"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFDivOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFDivOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFDivOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFDivOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFDivOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFDivOp 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 VPFDivOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPFDivOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPFDivOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPFMulAddOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPFMulAddOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPFMulAddOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.fmuladd", odsAttrs.getContext()); } VPFMulAddOpGenericAdaptorBase(VPFMulAddOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPFMulAddOpGenericAdaptor : public detail::VPFMulAddOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPFMulAddOpGenericAdaptorBase; static constexpr int odsIndex_op1 = 0; static constexpr int odsIndex_op2 = 1; static constexpr int odsIndex_op3 = 2; static constexpr int odsIndex_mask = 3; static constexpr int odsIndex_evl = 4; public: VPFMulAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPFMulAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPFMulAddOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPFMulAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPFMulAddOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPFMulAddOpGenericAdaptor(RangeT values, const VPFMulAddOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPFMulAddOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getOp1() { return (*getODSOperands(0).begin()); } ValueT getOp2() { return (*getODSOperands(1).begin()); } ValueT getOp3() { return (*getODSOperands(2).begin()); } ValueT getMask() { return (*getODSOperands(3).begin()); } ValueT getEvl() { return (*getODSOperands(4).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPFMulAddOpAdaptor : public VPFMulAddOpGenericAdaptor<::mlir::ValueRange> { public: using VPFMulAddOpGenericAdaptor::VPFMulAddOpGenericAdaptor; VPFMulAddOpAdaptor(VPFMulAddOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPFMulAddOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<5>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPFMulAddOpAdaptor; template using GenericAdaptor = VPFMulAddOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_op1 = 0; static constexpr int odsIndex_op2 = 1; static constexpr int odsIndex_op3 = 2; static constexpr int odsIndex_mask = 3; static constexpr int odsIndex_evl = 4; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.fmuladd"); } std::pair 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> getOp1() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getOp2() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getOp3() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(3).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(4).begin()); } ::mlir::OpOperand &getOp1Mutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getOp2Mutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getOp3Mutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(4); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 op1, ::mlir::Value op2, ::mlir::Value op3, ::mlir::Value mask, ::mlir::Value evl); static VPFMulAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value op1, ::mlir::Value op2, ::mlir::Value op3, ::mlir::Value mask, ::mlir::Value evl); static VPFMulAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value op1, ::mlir::Value op2, ::mlir::Value op3, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value op1, ::mlir::Value op2, ::mlir::Value op3, ::mlir::Value mask, ::mlir::Value evl); static VPFMulAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value op1, ::mlir::Value op2, ::mlir::Value op3, ::mlir::Value mask, ::mlir::Value evl); static VPFMulAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value op1, ::mlir::Value op2, ::mlir::Value op3, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFMulAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFMulAddOp 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 VPFMulAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPFMulAddOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPFMulAddOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPFMulOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPFMulOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPFMulOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.fmul", odsAttrs.getContext()); } VPFMulOpGenericAdaptorBase(VPFMulOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPFMulOpGenericAdaptor : public detail::VPFMulOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPFMulOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPFMulOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPFMulOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPFMulOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPFMulOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPFMulOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPFMulOpGenericAdaptor(RangeT values, const VPFMulOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPFMulOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPFMulOpAdaptor : public VPFMulOpGenericAdaptor<::mlir::ValueRange> { public: using VPFMulOpGenericAdaptor::VPFMulOpGenericAdaptor; VPFMulOpAdaptor(VPFMulOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPFMulOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPFMulOpAdaptor; template using GenericAdaptor = VPFMulOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.fmul"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFMulOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFMulOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFMulOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFMulOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFMulOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFMulOp 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 VPFMulOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPFMulOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPFMulOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPFNegOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPFNegOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPFNegOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.fneg", odsAttrs.getContext()); } VPFNegOpGenericAdaptorBase(VPFNegOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPFNegOpGenericAdaptor : public detail::VPFNegOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPFNegOpGenericAdaptorBase; static constexpr int odsIndex_op = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; public: VPFNegOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPFNegOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPFNegOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPFNegOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPFNegOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPFNegOpGenericAdaptor(RangeT values, const VPFNegOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPFNegOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getOp() { return (*getODSOperands(0).begin()); } ValueT getMask() { return (*getODSOperands(1).begin()); } ValueT getEvl() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPFNegOpAdaptor : public VPFNegOpGenericAdaptor<::mlir::ValueRange> { public: using VPFNegOpGenericAdaptor::VPFNegOpGenericAdaptor; VPFNegOpAdaptor(VPFNegOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPFNegOp : public ::mlir::Op::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 = VPFNegOpAdaptor; template using GenericAdaptor = VPFNegOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_op = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.fneg"); } std::pair 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> getOp() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getOpMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 op, ::mlir::Value mask, ::mlir::Value evl); static VPFNegOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value op, ::mlir::Value mask, ::mlir::Value evl); static VPFNegOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value op, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value op, ::mlir::Value mask, ::mlir::Value evl); static VPFNegOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value op, ::mlir::Value mask, ::mlir::Value evl); static VPFNegOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value op, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFNegOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFNegOp 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 VPFNegOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPFNegOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPFNegOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPFPExtOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPFPExtOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPFPExtOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.fpext", odsAttrs.getContext()); } VPFPExtOpGenericAdaptorBase(VPFPExtOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPFPExtOpGenericAdaptor : public detail::VPFPExtOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPFPExtOpGenericAdaptorBase; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; public: VPFPExtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPFPExtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPFPExtOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPFPExtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPFPExtOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPFPExtOpGenericAdaptor(RangeT values, const VPFPExtOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPFPExtOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSrc() { return (*getODSOperands(0).begin()); } ValueT getMask() { return (*getODSOperands(1).begin()); } ValueT getEvl() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPFPExtOpAdaptor : public VPFPExtOpGenericAdaptor<::mlir::ValueRange> { public: using VPFPExtOpGenericAdaptor::VPFPExtOpGenericAdaptor; VPFPExtOpAdaptor(VPFPExtOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPFPExtOp : public ::mlir::Op::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 = VPFPExtOpAdaptor; template using GenericAdaptor = VPFPExtOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.fpext"); } std::pair 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> getSrc() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getSrcMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 src, ::mlir::Value mask, ::mlir::Value evl); static VPFPExtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPFPExtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPFPExtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPFPExtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFPExtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFPExtOp 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 VPFPExtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPFPExtOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPFPExtOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPFPToSIOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPFPToSIOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPFPToSIOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.fptosi", odsAttrs.getContext()); } VPFPToSIOpGenericAdaptorBase(VPFPToSIOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPFPToSIOpGenericAdaptor : public detail::VPFPToSIOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPFPToSIOpGenericAdaptorBase; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; public: VPFPToSIOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPFPToSIOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPFPToSIOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPFPToSIOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPFPToSIOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPFPToSIOpGenericAdaptor(RangeT values, const VPFPToSIOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPFPToSIOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSrc() { return (*getODSOperands(0).begin()); } ValueT getMask() { return (*getODSOperands(1).begin()); } ValueT getEvl() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPFPToSIOpAdaptor : public VPFPToSIOpGenericAdaptor<::mlir::ValueRange> { public: using VPFPToSIOpGenericAdaptor::VPFPToSIOpGenericAdaptor; VPFPToSIOpAdaptor(VPFPToSIOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPFPToSIOp : public ::mlir::Op::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 = VPFPToSIOpAdaptor; template using GenericAdaptor = VPFPToSIOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.fptosi"); } std::pair 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> getSrc() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getSrcMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 src, ::mlir::Value mask, ::mlir::Value evl); static VPFPToSIOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPFPToSIOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPFPToSIOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPFPToSIOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFPToSIOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFPToSIOp 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 VPFPToSIOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPFPToSIOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPFPToSIOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPFPToUIOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPFPToUIOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPFPToUIOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.fptoui", odsAttrs.getContext()); } VPFPToUIOpGenericAdaptorBase(VPFPToUIOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPFPToUIOpGenericAdaptor : public detail::VPFPToUIOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPFPToUIOpGenericAdaptorBase; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; public: VPFPToUIOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPFPToUIOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPFPToUIOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPFPToUIOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPFPToUIOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPFPToUIOpGenericAdaptor(RangeT values, const VPFPToUIOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPFPToUIOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSrc() { return (*getODSOperands(0).begin()); } ValueT getMask() { return (*getODSOperands(1).begin()); } ValueT getEvl() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPFPToUIOpAdaptor : public VPFPToUIOpGenericAdaptor<::mlir::ValueRange> { public: using VPFPToUIOpGenericAdaptor::VPFPToUIOpGenericAdaptor; VPFPToUIOpAdaptor(VPFPToUIOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPFPToUIOp : public ::mlir::Op::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 = VPFPToUIOpAdaptor; template using GenericAdaptor = VPFPToUIOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.fptoui"); } std::pair 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> getSrc() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getSrcMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 src, ::mlir::Value mask, ::mlir::Value evl); static VPFPToUIOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPFPToUIOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPFPToUIOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPFPToUIOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFPToUIOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFPToUIOp 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 VPFPToUIOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPFPToUIOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPFPToUIOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPFPTruncOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPFPTruncOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPFPTruncOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.fptrunc", odsAttrs.getContext()); } VPFPTruncOpGenericAdaptorBase(VPFPTruncOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPFPTruncOpGenericAdaptor : public detail::VPFPTruncOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPFPTruncOpGenericAdaptorBase; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; public: VPFPTruncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPFPTruncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPFPTruncOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPFPTruncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPFPTruncOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPFPTruncOpGenericAdaptor(RangeT values, const VPFPTruncOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPFPTruncOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSrc() { return (*getODSOperands(0).begin()); } ValueT getMask() { return (*getODSOperands(1).begin()); } ValueT getEvl() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPFPTruncOpAdaptor : public VPFPTruncOpGenericAdaptor<::mlir::ValueRange> { public: using VPFPTruncOpGenericAdaptor::VPFPTruncOpGenericAdaptor; VPFPTruncOpAdaptor(VPFPTruncOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPFPTruncOp : public ::mlir::Op::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 = VPFPTruncOpAdaptor; template using GenericAdaptor = VPFPTruncOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.fptrunc"); } std::pair 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> getSrc() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getSrcMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 src, ::mlir::Value mask, ::mlir::Value evl); static VPFPTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPFPTruncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPFPTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPFPTruncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFPTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFPTruncOp 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 VPFPTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPFPTruncOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPFPTruncOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPFRemOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPFRemOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPFRemOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.frem", odsAttrs.getContext()); } VPFRemOpGenericAdaptorBase(VPFRemOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPFRemOpGenericAdaptor : public detail::VPFRemOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPFRemOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPFRemOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPFRemOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPFRemOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPFRemOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPFRemOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPFRemOpGenericAdaptor(RangeT values, const VPFRemOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPFRemOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPFRemOpAdaptor : public VPFRemOpGenericAdaptor<::mlir::ValueRange> { public: using VPFRemOpGenericAdaptor::VPFRemOpGenericAdaptor; VPFRemOpAdaptor(VPFRemOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPFRemOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPFRemOpAdaptor; template using GenericAdaptor = VPFRemOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.frem"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFRemOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFRemOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFRemOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFRemOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFRemOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFRemOp 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 VPFRemOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPFRemOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPFRemOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPFSubOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPFSubOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPFSubOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.fsub", odsAttrs.getContext()); } VPFSubOpGenericAdaptorBase(VPFSubOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPFSubOpGenericAdaptor : public detail::VPFSubOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPFSubOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPFSubOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPFSubOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPFSubOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPFSubOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPFSubOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPFSubOpGenericAdaptor(RangeT values, const VPFSubOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPFSubOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPFSubOpAdaptor : public VPFSubOpGenericAdaptor<::mlir::ValueRange> { public: using VPFSubOpGenericAdaptor::VPFSubOpGenericAdaptor; VPFSubOpAdaptor(VPFSubOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPFSubOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPFSubOpAdaptor; template using GenericAdaptor = VPFSubOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.fsub"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFSubOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFSubOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFSubOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPFSubOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFSubOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFSubOp 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 VPFSubOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPFSubOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPFSubOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPFmaOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPFmaOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPFmaOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.fma", odsAttrs.getContext()); } VPFmaOpGenericAdaptorBase(VPFmaOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPFmaOpGenericAdaptor : public detail::VPFmaOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPFmaOpGenericAdaptorBase; static constexpr int odsIndex_op1 = 0; static constexpr int odsIndex_op2 = 1; static constexpr int odsIndex_op3 = 2; static constexpr int odsIndex_mask = 3; static constexpr int odsIndex_evl = 4; public: VPFmaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPFmaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPFmaOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPFmaOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPFmaOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPFmaOpGenericAdaptor(RangeT values, const VPFmaOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPFmaOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getOp1() { return (*getODSOperands(0).begin()); } ValueT getOp2() { return (*getODSOperands(1).begin()); } ValueT getOp3() { return (*getODSOperands(2).begin()); } ValueT getMask() { return (*getODSOperands(3).begin()); } ValueT getEvl() { return (*getODSOperands(4).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPFmaOpAdaptor : public VPFmaOpGenericAdaptor<::mlir::ValueRange> { public: using VPFmaOpGenericAdaptor::VPFmaOpGenericAdaptor; VPFmaOpAdaptor(VPFmaOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPFmaOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<5>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPFmaOpAdaptor; template using GenericAdaptor = VPFmaOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_op1 = 0; static constexpr int odsIndex_op2 = 1; static constexpr int odsIndex_op3 = 2; static constexpr int odsIndex_mask = 3; static constexpr int odsIndex_evl = 4; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.fma"); } std::pair 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> getOp1() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getOp2() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getOp3() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(3).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(4).begin()); } ::mlir::OpOperand &getOp1Mutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getOp2Mutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getOp3Mutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(4); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 op1, ::mlir::Value op2, ::mlir::Value op3, ::mlir::Value mask, ::mlir::Value evl); static VPFmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value op1, ::mlir::Value op2, ::mlir::Value op3, ::mlir::Value mask, ::mlir::Value evl); static VPFmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value op1, ::mlir::Value op2, ::mlir::Value op3, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value op1, ::mlir::Value op2, ::mlir::Value op3, ::mlir::Value mask, ::mlir::Value evl); static VPFmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value op1, ::mlir::Value op2, ::mlir::Value op3, ::mlir::Value mask, ::mlir::Value evl); static VPFmaOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value op1, ::mlir::Value op2, ::mlir::Value op3, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPFmaOp 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 VPFmaOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPFmaOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPFmaOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPIntToPtrOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPIntToPtrOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPIntToPtrOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.inttoptr", odsAttrs.getContext()); } VPIntToPtrOpGenericAdaptorBase(VPIntToPtrOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPIntToPtrOpGenericAdaptor : public detail::VPIntToPtrOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPIntToPtrOpGenericAdaptorBase; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; public: VPIntToPtrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPIntToPtrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPIntToPtrOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPIntToPtrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPIntToPtrOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPIntToPtrOpGenericAdaptor(RangeT values, const VPIntToPtrOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPIntToPtrOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSrc() { return (*getODSOperands(0).begin()); } ValueT getMask() { return (*getODSOperands(1).begin()); } ValueT getEvl() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPIntToPtrOpAdaptor : public VPIntToPtrOpGenericAdaptor<::mlir::ValueRange> { public: using VPIntToPtrOpGenericAdaptor::VPIntToPtrOpGenericAdaptor; VPIntToPtrOpAdaptor(VPIntToPtrOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPIntToPtrOp : public ::mlir::Op::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 = VPIntToPtrOpAdaptor; template using GenericAdaptor = VPIntToPtrOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.inttoptr"); } std::pair 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> getSrc() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getSrcMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 src, ::mlir::Value mask, ::mlir::Value evl); static VPIntToPtrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPIntToPtrOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPIntToPtrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPIntToPtrOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPIntToPtrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPIntToPtrOp 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 VPIntToPtrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPIntToPtrOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPIntToPtrOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPLShrOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPLShrOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPLShrOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.lshr", odsAttrs.getContext()); } VPLShrOpGenericAdaptorBase(VPLShrOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPLShrOpGenericAdaptor : public detail::VPLShrOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPLShrOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPLShrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPLShrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPLShrOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPLShrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPLShrOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPLShrOpGenericAdaptor(RangeT values, const VPLShrOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPLShrOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPLShrOpAdaptor : public VPLShrOpGenericAdaptor<::mlir::ValueRange> { public: using VPLShrOpGenericAdaptor::VPLShrOpGenericAdaptor; VPLShrOpAdaptor(VPLShrOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPLShrOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPLShrOpAdaptor; template using GenericAdaptor = VPLShrOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.lshr"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPLShrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPLShrOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPLShrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPLShrOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPLShrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPLShrOp 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 VPLShrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPLShrOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPLShrOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPLoadOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPLoadOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPLoadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.load", odsAttrs.getContext()); } VPLoadOpGenericAdaptorBase(VPLoadOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPLoadOpGenericAdaptor : public detail::VPLoadOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPLoadOpGenericAdaptorBase; static constexpr int odsIndex_ptr = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; public: VPLoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPLoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPLoadOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPLoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPLoadOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPLoadOpGenericAdaptor(RangeT values, const VPLoadOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPLoadOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getPtr() { return (*getODSOperands(0).begin()); } ValueT getMask() { return (*getODSOperands(1).begin()); } ValueT getEvl() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPLoadOpAdaptor : public VPLoadOpGenericAdaptor<::mlir::ValueRange> { public: using VPLoadOpGenericAdaptor::VPLoadOpGenericAdaptor; VPLoadOpAdaptor(VPLoadOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPLoadOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants> { public: using Op::Op; using Op::print; using Adaptor = VPLoadOpAdaptor; template using GenericAdaptor = VPLoadOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_ptr = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.load"); } std::pair 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::LLVM::LLVMPointerType> getPtr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getPtrMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ptr, ::mlir::Value mask, ::mlir::Value evl); static VPLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value evl); static VPLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value evl); static VPLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value evl); static VPLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPLoadOp 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 VPLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPLoadOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPLoadOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPMergeMinOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPMergeMinOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPMergeMinOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.merge", odsAttrs.getContext()); } VPMergeMinOpGenericAdaptorBase(VPMergeMinOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPMergeMinOpGenericAdaptor : public detail::VPMergeMinOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPMergeMinOpGenericAdaptorBase; static constexpr int odsIndex_cond = 0; static constexpr int odsIndex_true_val = 1; static constexpr int odsIndex_false_val = 2; static constexpr int odsIndex_evl = 3; public: VPMergeMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPMergeMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPMergeMinOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPMergeMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPMergeMinOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPMergeMinOpGenericAdaptor(RangeT values, const VPMergeMinOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPMergeMinOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getCond() { return (*getODSOperands(0).begin()); } ValueT getTrueVal() { return (*getODSOperands(1).begin()); } ValueT getFalseVal() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPMergeMinOpAdaptor : public VPMergeMinOpGenericAdaptor<::mlir::ValueRange> { public: using VPMergeMinOpGenericAdaptor::VPMergeMinOpGenericAdaptor; VPMergeMinOpAdaptor(VPMergeMinOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPMergeMinOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPMergeMinOpAdaptor; template using GenericAdaptor = VPMergeMinOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_cond = 0; static constexpr int odsIndex_true_val = 1; static constexpr int odsIndex_false_val = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.merge"); } std::pair 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> getCond() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getTrueVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getFalseVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getCondMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getTrueValMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getFalseValMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 cond, ::mlir::Value true_val, ::mlir::Value false_val, ::mlir::Value evl); static VPMergeMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value cond, ::mlir::Value true_val, ::mlir::Value false_val, ::mlir::Value evl); static VPMergeMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value cond, ::mlir::Value true_val, ::mlir::Value false_val, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value cond, ::mlir::Value true_val, ::mlir::Value false_val, ::mlir::Value evl); static VPMergeMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value cond, ::mlir::Value true_val, ::mlir::Value false_val, ::mlir::Value evl); static VPMergeMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value cond, ::mlir::Value true_val, ::mlir::Value false_val, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPMergeMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPMergeMinOp 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 VPMergeMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPMergeMinOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPMergeMinOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPMulOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPMulOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPMulOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.mul", odsAttrs.getContext()); } VPMulOpGenericAdaptorBase(VPMulOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPMulOpGenericAdaptor : public detail::VPMulOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPMulOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPMulOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPMulOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPMulOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPMulOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPMulOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPMulOpGenericAdaptor(RangeT values, const VPMulOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPMulOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPMulOpAdaptor : public VPMulOpGenericAdaptor<::mlir::ValueRange> { public: using VPMulOpGenericAdaptor::VPMulOpGenericAdaptor; VPMulOpAdaptor(VPMulOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPMulOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPMulOpAdaptor; template using GenericAdaptor = VPMulOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.mul"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPMulOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPMulOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPMulOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPMulOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPMulOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPMulOp 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 VPMulOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPMulOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPMulOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPOrOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPOrOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPOrOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.or", odsAttrs.getContext()); } VPOrOpGenericAdaptorBase(VPOrOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPOrOpGenericAdaptor : public detail::VPOrOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPOrOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPOrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPOrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPOrOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPOrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPOrOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPOrOpGenericAdaptor(RangeT values, const VPOrOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPOrOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPOrOpAdaptor : public VPOrOpGenericAdaptor<::mlir::ValueRange> { public: using VPOrOpGenericAdaptor::VPOrOpGenericAdaptor; VPOrOpAdaptor(VPOrOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPOrOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPOrOpAdaptor; template using GenericAdaptor = VPOrOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.or"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPOrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPOrOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPOrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPOrOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPOrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPOrOp 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 VPOrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPOrOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPOrOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPPtrToIntOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPPtrToIntOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPPtrToIntOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.ptrtoint", odsAttrs.getContext()); } VPPtrToIntOpGenericAdaptorBase(VPPtrToIntOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPPtrToIntOpGenericAdaptor : public detail::VPPtrToIntOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPPtrToIntOpGenericAdaptorBase; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; public: VPPtrToIntOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPPtrToIntOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPPtrToIntOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPPtrToIntOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPPtrToIntOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPPtrToIntOpGenericAdaptor(RangeT values, const VPPtrToIntOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPPtrToIntOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSrc() { return (*getODSOperands(0).begin()); } ValueT getMask() { return (*getODSOperands(1).begin()); } ValueT getEvl() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPPtrToIntOpAdaptor : public VPPtrToIntOpGenericAdaptor<::mlir::ValueRange> { public: using VPPtrToIntOpGenericAdaptor::VPPtrToIntOpGenericAdaptor; VPPtrToIntOpAdaptor(VPPtrToIntOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPPtrToIntOp : public ::mlir::Op::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 = VPPtrToIntOpAdaptor; template using GenericAdaptor = VPPtrToIntOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.ptrtoint"); } std::pair 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> getSrc() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getSrcMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 src, ::mlir::Value mask, ::mlir::Value evl); static VPPtrToIntOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPPtrToIntOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPPtrToIntOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPPtrToIntOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPPtrToIntOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPPtrToIntOp 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 VPPtrToIntOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPPtrToIntOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPPtrToIntOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPReduceAddOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPReduceAddOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPReduceAddOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.reduce.add", odsAttrs.getContext()); } VPReduceAddOpGenericAdaptorBase(VPReduceAddOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPReduceAddOpGenericAdaptor : public detail::VPReduceAddOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPReduceAddOpGenericAdaptorBase; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPReduceAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPReduceAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPReduceAddOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPReduceAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPReduceAddOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPReduceAddOpGenericAdaptor(RangeT values, const VPReduceAddOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPReduceAddOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSatrtValue() { return (*getODSOperands(0).begin()); } ValueT getVal() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPReduceAddOpAdaptor : public VPReduceAddOpGenericAdaptor<::mlir::ValueRange> { public: using VPReduceAddOpGenericAdaptor::VPReduceAddOpGenericAdaptor; VPReduceAddOpAdaptor(VPReduceAddOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPReduceAddOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPReduceAddOpAdaptor; template using GenericAdaptor = VPReduceAddOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.reduce.add"); } std::pair 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::IntegerType> getSatrtValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getSatrtValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceAddOp 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 VPReduceAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPReduceAddOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPReduceAddOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPReduceAndOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPReduceAndOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPReduceAndOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.reduce.and", odsAttrs.getContext()); } VPReduceAndOpGenericAdaptorBase(VPReduceAndOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPReduceAndOpGenericAdaptor : public detail::VPReduceAndOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPReduceAndOpGenericAdaptorBase; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPReduceAndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPReduceAndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPReduceAndOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPReduceAndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPReduceAndOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPReduceAndOpGenericAdaptor(RangeT values, const VPReduceAndOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPReduceAndOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSatrtValue() { return (*getODSOperands(0).begin()); } ValueT getVal() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPReduceAndOpAdaptor : public VPReduceAndOpGenericAdaptor<::mlir::ValueRange> { public: using VPReduceAndOpGenericAdaptor::VPReduceAndOpGenericAdaptor; VPReduceAndOpAdaptor(VPReduceAndOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPReduceAndOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPReduceAndOpAdaptor; template using GenericAdaptor = VPReduceAndOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.reduce.and"); } std::pair 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::IntegerType> getSatrtValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getSatrtValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceAndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceAndOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceAndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceAndOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceAndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceAndOp 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 VPReduceAndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPReduceAndOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPReduceAndOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPReduceFAddOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPReduceFAddOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPReduceFAddOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.reduce.fadd", odsAttrs.getContext()); } VPReduceFAddOpGenericAdaptorBase(VPReduceFAddOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPReduceFAddOpGenericAdaptor : public detail::VPReduceFAddOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPReduceFAddOpGenericAdaptorBase; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPReduceFAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPReduceFAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPReduceFAddOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPReduceFAddOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPReduceFAddOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPReduceFAddOpGenericAdaptor(RangeT values, const VPReduceFAddOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPReduceFAddOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSatrtValue() { return (*getODSOperands(0).begin()); } ValueT getVal() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPReduceFAddOpAdaptor : public VPReduceFAddOpGenericAdaptor<::mlir::ValueRange> { public: using VPReduceFAddOpGenericAdaptor::VPReduceFAddOpGenericAdaptor; VPReduceFAddOpAdaptor(VPReduceFAddOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPReduceFAddOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPReduceFAddOpAdaptor; template using GenericAdaptor = VPReduceFAddOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.reduce.fadd"); } std::pair 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::FloatType> getSatrtValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getSatrtValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceFAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceFAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceFAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceFAddOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceFAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceFAddOp 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 VPReduceFAddOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPReduceFAddOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPReduceFAddOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPReduceFMaxOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPReduceFMaxOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPReduceFMaxOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.reduce.fmax", odsAttrs.getContext()); } VPReduceFMaxOpGenericAdaptorBase(VPReduceFMaxOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPReduceFMaxOpGenericAdaptor : public detail::VPReduceFMaxOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPReduceFMaxOpGenericAdaptorBase; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPReduceFMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPReduceFMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPReduceFMaxOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPReduceFMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPReduceFMaxOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPReduceFMaxOpGenericAdaptor(RangeT values, const VPReduceFMaxOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPReduceFMaxOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSatrtValue() { return (*getODSOperands(0).begin()); } ValueT getVal() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPReduceFMaxOpAdaptor : public VPReduceFMaxOpGenericAdaptor<::mlir::ValueRange> { public: using VPReduceFMaxOpGenericAdaptor::VPReduceFMaxOpGenericAdaptor; VPReduceFMaxOpAdaptor(VPReduceFMaxOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPReduceFMaxOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPReduceFMaxOpAdaptor; template using GenericAdaptor = VPReduceFMaxOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.reduce.fmax"); } std::pair 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::FloatType> getSatrtValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getSatrtValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceFMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceFMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceFMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceFMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceFMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceFMaxOp 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 VPReduceFMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPReduceFMaxOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPReduceFMaxOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPReduceFMinOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPReduceFMinOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPReduceFMinOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.reduce.fmin", odsAttrs.getContext()); } VPReduceFMinOpGenericAdaptorBase(VPReduceFMinOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPReduceFMinOpGenericAdaptor : public detail::VPReduceFMinOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPReduceFMinOpGenericAdaptorBase; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPReduceFMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPReduceFMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPReduceFMinOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPReduceFMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPReduceFMinOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPReduceFMinOpGenericAdaptor(RangeT values, const VPReduceFMinOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPReduceFMinOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSatrtValue() { return (*getODSOperands(0).begin()); } ValueT getVal() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPReduceFMinOpAdaptor : public VPReduceFMinOpGenericAdaptor<::mlir::ValueRange> { public: using VPReduceFMinOpGenericAdaptor::VPReduceFMinOpGenericAdaptor; VPReduceFMinOpAdaptor(VPReduceFMinOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPReduceFMinOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPReduceFMinOpAdaptor; template using GenericAdaptor = VPReduceFMinOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.reduce.fmin"); } std::pair 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::FloatType> getSatrtValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getSatrtValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceFMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceFMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceFMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceFMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceFMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceFMinOp 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 VPReduceFMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPReduceFMinOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPReduceFMinOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPReduceFMulOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPReduceFMulOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPReduceFMulOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.reduce.fmul", odsAttrs.getContext()); } VPReduceFMulOpGenericAdaptorBase(VPReduceFMulOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPReduceFMulOpGenericAdaptor : public detail::VPReduceFMulOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPReduceFMulOpGenericAdaptorBase; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPReduceFMulOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPReduceFMulOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPReduceFMulOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPReduceFMulOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPReduceFMulOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPReduceFMulOpGenericAdaptor(RangeT values, const VPReduceFMulOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPReduceFMulOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSatrtValue() { return (*getODSOperands(0).begin()); } ValueT getVal() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPReduceFMulOpAdaptor : public VPReduceFMulOpGenericAdaptor<::mlir::ValueRange> { public: using VPReduceFMulOpGenericAdaptor::VPReduceFMulOpGenericAdaptor; VPReduceFMulOpAdaptor(VPReduceFMulOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPReduceFMulOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPReduceFMulOpAdaptor; template using GenericAdaptor = VPReduceFMulOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.reduce.fmul"); } std::pair 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::FloatType> getSatrtValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getSatrtValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceFMulOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceFMulOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceFMulOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceFMulOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceFMulOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceFMulOp 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 VPReduceFMulOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPReduceFMulOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPReduceFMulOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPReduceMulOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPReduceMulOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPReduceMulOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.reduce.mul", odsAttrs.getContext()); } VPReduceMulOpGenericAdaptorBase(VPReduceMulOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPReduceMulOpGenericAdaptor : public detail::VPReduceMulOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPReduceMulOpGenericAdaptorBase; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPReduceMulOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPReduceMulOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPReduceMulOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPReduceMulOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPReduceMulOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPReduceMulOpGenericAdaptor(RangeT values, const VPReduceMulOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPReduceMulOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSatrtValue() { return (*getODSOperands(0).begin()); } ValueT getVal() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPReduceMulOpAdaptor : public VPReduceMulOpGenericAdaptor<::mlir::ValueRange> { public: using VPReduceMulOpGenericAdaptor::VPReduceMulOpGenericAdaptor; VPReduceMulOpAdaptor(VPReduceMulOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPReduceMulOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPReduceMulOpAdaptor; template using GenericAdaptor = VPReduceMulOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.reduce.mul"); } std::pair 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::IntegerType> getSatrtValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getSatrtValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceMulOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceMulOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceMulOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceMulOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceMulOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceMulOp 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 VPReduceMulOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPReduceMulOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPReduceMulOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPReduceOrOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPReduceOrOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPReduceOrOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.reduce.or", odsAttrs.getContext()); } VPReduceOrOpGenericAdaptorBase(VPReduceOrOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPReduceOrOpGenericAdaptor : public detail::VPReduceOrOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPReduceOrOpGenericAdaptorBase; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPReduceOrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPReduceOrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPReduceOrOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPReduceOrOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPReduceOrOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPReduceOrOpGenericAdaptor(RangeT values, const VPReduceOrOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPReduceOrOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSatrtValue() { return (*getODSOperands(0).begin()); } ValueT getVal() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPReduceOrOpAdaptor : public VPReduceOrOpGenericAdaptor<::mlir::ValueRange> { public: using VPReduceOrOpGenericAdaptor::VPReduceOrOpGenericAdaptor; VPReduceOrOpAdaptor(VPReduceOrOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPReduceOrOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPReduceOrOpAdaptor; template using GenericAdaptor = VPReduceOrOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.reduce.or"); } std::pair 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::IntegerType> getSatrtValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getSatrtValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceOrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceOrOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceOrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceOrOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceOrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceOrOp 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 VPReduceOrOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPReduceOrOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPReduceOrOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPReduceSMaxOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPReduceSMaxOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPReduceSMaxOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.reduce.smax", odsAttrs.getContext()); } VPReduceSMaxOpGenericAdaptorBase(VPReduceSMaxOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPReduceSMaxOpGenericAdaptor : public detail::VPReduceSMaxOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPReduceSMaxOpGenericAdaptorBase; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPReduceSMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPReduceSMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPReduceSMaxOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPReduceSMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPReduceSMaxOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPReduceSMaxOpGenericAdaptor(RangeT values, const VPReduceSMaxOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPReduceSMaxOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSatrtValue() { return (*getODSOperands(0).begin()); } ValueT getVal() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPReduceSMaxOpAdaptor : public VPReduceSMaxOpGenericAdaptor<::mlir::ValueRange> { public: using VPReduceSMaxOpGenericAdaptor::VPReduceSMaxOpGenericAdaptor; VPReduceSMaxOpAdaptor(VPReduceSMaxOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPReduceSMaxOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPReduceSMaxOpAdaptor; template using GenericAdaptor = VPReduceSMaxOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.reduce.smax"); } std::pair 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::IntegerType> getSatrtValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getSatrtValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceSMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceSMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceSMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceSMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceSMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceSMaxOp 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 VPReduceSMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPReduceSMaxOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPReduceSMaxOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPReduceSMinOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPReduceSMinOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPReduceSMinOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.reduce.smin", odsAttrs.getContext()); } VPReduceSMinOpGenericAdaptorBase(VPReduceSMinOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPReduceSMinOpGenericAdaptor : public detail::VPReduceSMinOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPReduceSMinOpGenericAdaptorBase; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPReduceSMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPReduceSMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPReduceSMinOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPReduceSMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPReduceSMinOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPReduceSMinOpGenericAdaptor(RangeT values, const VPReduceSMinOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPReduceSMinOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSatrtValue() { return (*getODSOperands(0).begin()); } ValueT getVal() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPReduceSMinOpAdaptor : public VPReduceSMinOpGenericAdaptor<::mlir::ValueRange> { public: using VPReduceSMinOpGenericAdaptor::VPReduceSMinOpGenericAdaptor; VPReduceSMinOpAdaptor(VPReduceSMinOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPReduceSMinOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPReduceSMinOpAdaptor; template using GenericAdaptor = VPReduceSMinOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.reduce.smin"); } std::pair 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::IntegerType> getSatrtValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getSatrtValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceSMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceSMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceSMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceSMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceSMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceSMinOp 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 VPReduceSMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPReduceSMinOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPReduceSMinOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPReduceUMaxOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPReduceUMaxOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPReduceUMaxOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.reduce.umax", odsAttrs.getContext()); } VPReduceUMaxOpGenericAdaptorBase(VPReduceUMaxOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPReduceUMaxOpGenericAdaptor : public detail::VPReduceUMaxOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPReduceUMaxOpGenericAdaptorBase; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPReduceUMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPReduceUMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPReduceUMaxOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPReduceUMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPReduceUMaxOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPReduceUMaxOpGenericAdaptor(RangeT values, const VPReduceUMaxOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPReduceUMaxOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSatrtValue() { return (*getODSOperands(0).begin()); } ValueT getVal() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPReduceUMaxOpAdaptor : public VPReduceUMaxOpGenericAdaptor<::mlir::ValueRange> { public: using VPReduceUMaxOpGenericAdaptor::VPReduceUMaxOpGenericAdaptor; VPReduceUMaxOpAdaptor(VPReduceUMaxOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPReduceUMaxOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPReduceUMaxOpAdaptor; template using GenericAdaptor = VPReduceUMaxOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.reduce.umax"); } std::pair 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::IntegerType> getSatrtValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getSatrtValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceUMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceUMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceUMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceUMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceUMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceUMaxOp 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 VPReduceUMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPReduceUMaxOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPReduceUMaxOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPReduceUMinOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPReduceUMinOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPReduceUMinOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.reduce.umin", odsAttrs.getContext()); } VPReduceUMinOpGenericAdaptorBase(VPReduceUMinOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPReduceUMinOpGenericAdaptor : public detail::VPReduceUMinOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPReduceUMinOpGenericAdaptorBase; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPReduceUMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPReduceUMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPReduceUMinOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPReduceUMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPReduceUMinOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPReduceUMinOpGenericAdaptor(RangeT values, const VPReduceUMinOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPReduceUMinOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSatrtValue() { return (*getODSOperands(0).begin()); } ValueT getVal() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPReduceUMinOpAdaptor : public VPReduceUMinOpGenericAdaptor<::mlir::ValueRange> { public: using VPReduceUMinOpGenericAdaptor::VPReduceUMinOpGenericAdaptor; VPReduceUMinOpAdaptor(VPReduceUMinOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPReduceUMinOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPReduceUMinOpAdaptor; template using GenericAdaptor = VPReduceUMinOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.reduce.umin"); } std::pair 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::IntegerType> getSatrtValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getSatrtValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceUMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceUMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceUMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceUMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceUMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceUMinOp 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 VPReduceUMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPReduceUMinOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPReduceUMinOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPReduceXorOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPReduceXorOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPReduceXorOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.reduce.xor", odsAttrs.getContext()); } VPReduceXorOpGenericAdaptorBase(VPReduceXorOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPReduceXorOpGenericAdaptor : public detail::VPReduceXorOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPReduceXorOpGenericAdaptorBase; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPReduceXorOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPReduceXorOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPReduceXorOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPReduceXorOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPReduceXorOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPReduceXorOpGenericAdaptor(RangeT values, const VPReduceXorOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPReduceXorOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSatrtValue() { return (*getODSOperands(0).begin()); } ValueT getVal() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPReduceXorOpAdaptor : public VPReduceXorOpGenericAdaptor<::mlir::ValueRange> { public: using VPReduceXorOpGenericAdaptor::VPReduceXorOpGenericAdaptor; VPReduceXorOpAdaptor(VPReduceXorOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPReduceXorOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPReduceXorOpAdaptor; template using GenericAdaptor = VPReduceXorOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_satrt_value = 0; static constexpr int odsIndex_val = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.reduce.xor"); } std::pair 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::IntegerType> getSatrtValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getSatrtValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceXorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceXorOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceXorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static VPReduceXorOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value satrt_value, ::mlir::Value val, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceXorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPReduceXorOp 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 VPReduceXorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPReduceXorOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPReduceXorOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPSDivOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPSDivOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPSDivOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.sdiv", odsAttrs.getContext()); } VPSDivOpGenericAdaptorBase(VPSDivOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPSDivOpGenericAdaptor : public detail::VPSDivOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPSDivOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPSDivOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPSDivOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPSDivOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPSDivOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPSDivOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPSDivOpGenericAdaptor(RangeT values, const VPSDivOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPSDivOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPSDivOpAdaptor : public VPSDivOpGenericAdaptor<::mlir::ValueRange> { public: using VPSDivOpGenericAdaptor::VPSDivOpGenericAdaptor; VPSDivOpAdaptor(VPSDivOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPSDivOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPSDivOpAdaptor; template using GenericAdaptor = VPSDivOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.sdiv"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSDivOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSDivOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSDivOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSDivOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPSDivOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPSDivOp 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 VPSDivOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPSDivOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPSDivOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPSExtOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPSExtOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPSExtOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.sext", odsAttrs.getContext()); } VPSExtOpGenericAdaptorBase(VPSExtOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPSExtOpGenericAdaptor : public detail::VPSExtOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPSExtOpGenericAdaptorBase; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; public: VPSExtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPSExtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPSExtOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPSExtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPSExtOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPSExtOpGenericAdaptor(RangeT values, const VPSExtOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPSExtOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSrc() { return (*getODSOperands(0).begin()); } ValueT getMask() { return (*getODSOperands(1).begin()); } ValueT getEvl() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPSExtOpAdaptor : public VPSExtOpGenericAdaptor<::mlir::ValueRange> { public: using VPSExtOpGenericAdaptor::VPSExtOpGenericAdaptor; VPSExtOpAdaptor(VPSExtOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPSExtOp : public ::mlir::Op::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 = VPSExtOpAdaptor; template using GenericAdaptor = VPSExtOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.sext"); } std::pair 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> getSrc() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getSrcMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 src, ::mlir::Value mask, ::mlir::Value evl); static VPSExtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPSExtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPSExtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPSExtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPSExtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPSExtOp 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 VPSExtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPSExtOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPSExtOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPSIToFPOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPSIToFPOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPSIToFPOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.sitofp", odsAttrs.getContext()); } VPSIToFPOpGenericAdaptorBase(VPSIToFPOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPSIToFPOpGenericAdaptor : public detail::VPSIToFPOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPSIToFPOpGenericAdaptorBase; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; public: VPSIToFPOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPSIToFPOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPSIToFPOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPSIToFPOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPSIToFPOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPSIToFPOpGenericAdaptor(RangeT values, const VPSIToFPOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPSIToFPOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSrc() { return (*getODSOperands(0).begin()); } ValueT getMask() { return (*getODSOperands(1).begin()); } ValueT getEvl() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPSIToFPOpAdaptor : public VPSIToFPOpGenericAdaptor<::mlir::ValueRange> { public: using VPSIToFPOpGenericAdaptor::VPSIToFPOpGenericAdaptor; VPSIToFPOpAdaptor(VPSIToFPOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPSIToFPOp : public ::mlir::Op::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 = VPSIToFPOpAdaptor; template using GenericAdaptor = VPSIToFPOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.sitofp"); } std::pair 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> getSrc() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getSrcMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 src, ::mlir::Value mask, ::mlir::Value evl); static VPSIToFPOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPSIToFPOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPSIToFPOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPSIToFPOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPSIToFPOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPSIToFPOp 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 VPSIToFPOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPSIToFPOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPSIToFPOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPSMaxOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPSMaxOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPSMaxOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.smax", odsAttrs.getContext()); } VPSMaxOpGenericAdaptorBase(VPSMaxOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPSMaxOpGenericAdaptor : public detail::VPSMaxOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPSMaxOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPSMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPSMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPSMaxOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPSMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPSMaxOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPSMaxOpGenericAdaptor(RangeT values, const VPSMaxOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPSMaxOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPSMaxOpAdaptor : public VPSMaxOpGenericAdaptor<::mlir::ValueRange> { public: using VPSMaxOpGenericAdaptor::VPSMaxOpGenericAdaptor; VPSMaxOpAdaptor(VPSMaxOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPSMaxOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPSMaxOpAdaptor; template using GenericAdaptor = VPSMaxOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.smax"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPSMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPSMaxOp 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 VPSMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPSMaxOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPSMaxOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPSMinOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPSMinOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPSMinOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.smin", odsAttrs.getContext()); } VPSMinOpGenericAdaptorBase(VPSMinOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPSMinOpGenericAdaptor : public detail::VPSMinOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPSMinOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPSMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPSMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPSMinOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPSMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPSMinOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPSMinOpGenericAdaptor(RangeT values, const VPSMinOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPSMinOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPSMinOpAdaptor : public VPSMinOpGenericAdaptor<::mlir::ValueRange> { public: using VPSMinOpGenericAdaptor::VPSMinOpGenericAdaptor; VPSMinOpAdaptor(VPSMinOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPSMinOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPSMinOpAdaptor; template using GenericAdaptor = VPSMinOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.smin"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPSMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPSMinOp 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 VPSMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPSMinOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPSMinOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPSRemOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPSRemOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPSRemOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.srem", odsAttrs.getContext()); } VPSRemOpGenericAdaptorBase(VPSRemOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPSRemOpGenericAdaptor : public detail::VPSRemOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPSRemOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPSRemOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPSRemOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPSRemOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPSRemOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPSRemOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPSRemOpGenericAdaptor(RangeT values, const VPSRemOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPSRemOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPSRemOpAdaptor : public VPSRemOpGenericAdaptor<::mlir::ValueRange> { public: using VPSRemOpGenericAdaptor::VPSRemOpGenericAdaptor; VPSRemOpAdaptor(VPSRemOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPSRemOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPSRemOpAdaptor; template using GenericAdaptor = VPSRemOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.srem"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSRemOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSRemOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSRemOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSRemOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPSRemOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPSRemOp 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 VPSRemOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPSRemOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPSRemOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPSelectMinOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPSelectMinOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPSelectMinOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.select", odsAttrs.getContext()); } VPSelectMinOpGenericAdaptorBase(VPSelectMinOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPSelectMinOpGenericAdaptor : public detail::VPSelectMinOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPSelectMinOpGenericAdaptorBase; static constexpr int odsIndex_cond = 0; static constexpr int odsIndex_true_val = 1; static constexpr int odsIndex_false_val = 2; static constexpr int odsIndex_evl = 3; public: VPSelectMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPSelectMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPSelectMinOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPSelectMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPSelectMinOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPSelectMinOpGenericAdaptor(RangeT values, const VPSelectMinOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPSelectMinOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getCond() { return (*getODSOperands(0).begin()); } ValueT getTrueVal() { return (*getODSOperands(1).begin()); } ValueT getFalseVal() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPSelectMinOpAdaptor : public VPSelectMinOpGenericAdaptor<::mlir::ValueRange> { public: using VPSelectMinOpGenericAdaptor::VPSelectMinOpGenericAdaptor; VPSelectMinOpAdaptor(VPSelectMinOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPSelectMinOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPSelectMinOpAdaptor; template using GenericAdaptor = VPSelectMinOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_cond = 0; static constexpr int odsIndex_true_val = 1; static constexpr int odsIndex_false_val = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.select"); } std::pair 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> getCond() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getTrueVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getFalseVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getCondMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getTrueValMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getFalseValMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 cond, ::mlir::Value true_val, ::mlir::Value false_val, ::mlir::Value evl); static VPSelectMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value cond, ::mlir::Value true_val, ::mlir::Value false_val, ::mlir::Value evl); static VPSelectMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value cond, ::mlir::Value true_val, ::mlir::Value false_val, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value cond, ::mlir::Value true_val, ::mlir::Value false_val, ::mlir::Value evl); static VPSelectMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value cond, ::mlir::Value true_val, ::mlir::Value false_val, ::mlir::Value evl); static VPSelectMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value cond, ::mlir::Value true_val, ::mlir::Value false_val, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPSelectMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPSelectMinOp 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 VPSelectMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPSelectMinOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPSelectMinOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPShlOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPShlOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPShlOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.shl", odsAttrs.getContext()); } VPShlOpGenericAdaptorBase(VPShlOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPShlOpGenericAdaptor : public detail::VPShlOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPShlOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPShlOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPShlOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPShlOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPShlOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPShlOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPShlOpGenericAdaptor(RangeT values, const VPShlOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPShlOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPShlOpAdaptor : public VPShlOpGenericAdaptor<::mlir::ValueRange> { public: using VPShlOpGenericAdaptor::VPShlOpGenericAdaptor; VPShlOpAdaptor(VPShlOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPShlOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPShlOpAdaptor; template using GenericAdaptor = VPShlOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.shl"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPShlOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPShlOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPShlOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPShlOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPShlOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPShlOp 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 VPShlOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPShlOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPShlOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPStoreOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPStoreOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPStoreOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.store", odsAttrs.getContext()); } VPStoreOpGenericAdaptorBase(VPStoreOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPStoreOpGenericAdaptor : public detail::VPStoreOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPStoreOpGenericAdaptorBase; static constexpr int odsIndex_val = 0; static constexpr int odsIndex_ptr = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPStoreOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPStoreOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPStoreOpGenericAdaptor(RangeT values, const VPStoreOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPStoreOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getVal() { return (*getODSOperands(0).begin()); } ValueT getPtr() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPStoreOpAdaptor : public VPStoreOpGenericAdaptor<::mlir::ValueRange> { public: using VPStoreOpGenericAdaptor::VPStoreOpGenericAdaptor; VPStoreOpAdaptor(VPStoreOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPStoreOp : public ::mlir::Op::Impl, ::mlir::OpTrait::OpInvariants> { public: using Op::Op; using Op::print; using Adaptor = VPStoreOpAdaptor; template using GenericAdaptor = VPStoreOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_val = 0; static constexpr int odsIndex_ptr = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.store"); } std::pair 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> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getPtr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getPtrMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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::Value val, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value evl); static VPStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value val, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value evl); static VPStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value val, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value evl); static VPStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value evl); static VPStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPStoreOp 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 VPStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPStoreOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPStoreOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPStridedLoadOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPStridedLoadOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPStridedLoadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.experimental.vp.strided.load", odsAttrs.getContext()); } VPStridedLoadOpGenericAdaptorBase(VPStridedLoadOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPStridedLoadOpGenericAdaptor : public detail::VPStridedLoadOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPStridedLoadOpGenericAdaptorBase; static constexpr int odsIndex_ptr = 0; static constexpr int odsIndex_stride = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPStridedLoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPStridedLoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPStridedLoadOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPStridedLoadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPStridedLoadOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPStridedLoadOpGenericAdaptor(RangeT values, const VPStridedLoadOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPStridedLoadOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getPtr() { return (*getODSOperands(0).begin()); } ValueT getStride() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPStridedLoadOpAdaptor : public VPStridedLoadOpGenericAdaptor<::mlir::ValueRange> { public: using VPStridedLoadOpGenericAdaptor::VPStridedLoadOpGenericAdaptor; VPStridedLoadOpAdaptor(VPStridedLoadOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPStridedLoadOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants> { public: using Op::Op; using Op::print; using Adaptor = VPStridedLoadOpAdaptor; template using GenericAdaptor = VPStridedLoadOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_ptr = 0; static constexpr int odsIndex_stride = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.experimental.vp.strided.load"); } std::pair 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::LLVM::LLVMPointerType> getPtr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getStride() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getPtrMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getStrideMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ptr, ::mlir::Value stride, ::mlir::Value mask, ::mlir::Value evl); static VPStridedLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value stride, ::mlir::Value mask, ::mlir::Value evl); static VPStridedLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value stride, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value stride, ::mlir::Value mask, ::mlir::Value evl); static VPStridedLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value stride, ::mlir::Value mask, ::mlir::Value evl); static VPStridedLoadOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value stride, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPStridedLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPStridedLoadOp 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 VPStridedLoadOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPStridedLoadOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPStridedLoadOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPStridedStoreOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPStridedStoreOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPStridedStoreOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.experimental.vp.strided.store", odsAttrs.getContext()); } VPStridedStoreOpGenericAdaptorBase(VPStridedStoreOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPStridedStoreOpGenericAdaptor : public detail::VPStridedStoreOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPStridedStoreOpGenericAdaptorBase; static constexpr int odsIndex_val = 0; static constexpr int odsIndex_ptr = 1; static constexpr int odsIndex_stride = 2; static constexpr int odsIndex_mask = 3; static constexpr int odsIndex_evl = 4; public: VPStridedStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPStridedStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPStridedStoreOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPStridedStoreOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPStridedStoreOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPStridedStoreOpGenericAdaptor(RangeT values, const VPStridedStoreOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPStridedStoreOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getVal() { return (*getODSOperands(0).begin()); } ValueT getPtr() { return (*getODSOperands(1).begin()); } ValueT getStride() { return (*getODSOperands(2).begin()); } ValueT getMask() { return (*getODSOperands(3).begin()); } ValueT getEvl() { return (*getODSOperands(4).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPStridedStoreOpAdaptor : public VPStridedStoreOpGenericAdaptor<::mlir::ValueRange> { public: using VPStridedStoreOpGenericAdaptor::VPStridedStoreOpGenericAdaptor; VPStridedStoreOpAdaptor(VPStridedStoreOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPStridedStoreOp : public ::mlir::Op::Impl, ::mlir::OpTrait::OpInvariants> { public: using Op::Op; using Op::print; using Adaptor = VPStridedStoreOpAdaptor; template using GenericAdaptor = VPStridedStoreOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_val = 0; static constexpr int odsIndex_ptr = 1; static constexpr int odsIndex_stride = 2; static constexpr int odsIndex_mask = 3; static constexpr int odsIndex_evl = 4; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.experimental.vp.strided.store"); } std::pair 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> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getPtr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getStride() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(3).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(4).begin()); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getPtrMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getStrideMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(4); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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::Value val, ::mlir::Value ptr, ::mlir::Value stride, ::mlir::Value mask, ::mlir::Value evl); static VPStridedStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value val, ::mlir::Value ptr, ::mlir::Value stride, ::mlir::Value mask, ::mlir::Value evl); static VPStridedStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value val, ::mlir::Value ptr, ::mlir::Value stride, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value ptr, ::mlir::Value stride, ::mlir::Value mask, ::mlir::Value evl); static VPStridedStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value ptr, ::mlir::Value stride, ::mlir::Value mask, ::mlir::Value evl); static VPStridedStoreOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value ptr, ::mlir::Value stride, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPStridedStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPStridedStoreOp 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 VPStridedStoreOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPStridedStoreOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPStridedStoreOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPSubOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPSubOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPSubOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.sub", odsAttrs.getContext()); } VPSubOpGenericAdaptorBase(VPSubOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPSubOpGenericAdaptor : public detail::VPSubOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPSubOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPSubOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPSubOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPSubOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPSubOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPSubOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPSubOpGenericAdaptor(RangeT values, const VPSubOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPSubOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPSubOpAdaptor : public VPSubOpGenericAdaptor<::mlir::ValueRange> { public: using VPSubOpGenericAdaptor::VPSubOpGenericAdaptor; VPSubOpAdaptor(VPSubOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPSubOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPSubOpAdaptor; template using GenericAdaptor = VPSubOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.sub"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSubOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSubOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSubOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPSubOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPSubOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPSubOp 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 VPSubOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPSubOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPSubOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPTruncOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPTruncOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPTruncOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.trunc", odsAttrs.getContext()); } VPTruncOpGenericAdaptorBase(VPTruncOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPTruncOpGenericAdaptor : public detail::VPTruncOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPTruncOpGenericAdaptorBase; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; public: VPTruncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPTruncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPTruncOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPTruncOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPTruncOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPTruncOpGenericAdaptor(RangeT values, const VPTruncOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPTruncOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSrc() { return (*getODSOperands(0).begin()); } ValueT getMask() { return (*getODSOperands(1).begin()); } ValueT getEvl() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPTruncOpAdaptor : public VPTruncOpGenericAdaptor<::mlir::ValueRange> { public: using VPTruncOpGenericAdaptor::VPTruncOpGenericAdaptor; VPTruncOpAdaptor(VPTruncOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPTruncOp : public ::mlir::Op::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 = VPTruncOpAdaptor; template using GenericAdaptor = VPTruncOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.trunc"); } std::pair 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> getSrc() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getSrcMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 src, ::mlir::Value mask, ::mlir::Value evl); static VPTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPTruncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPTruncOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPTruncOp 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 VPTruncOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPTruncOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPTruncOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPUDivOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPUDivOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPUDivOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.udiv", odsAttrs.getContext()); } VPUDivOpGenericAdaptorBase(VPUDivOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPUDivOpGenericAdaptor : public detail::VPUDivOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPUDivOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPUDivOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPUDivOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPUDivOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPUDivOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPUDivOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPUDivOpGenericAdaptor(RangeT values, const VPUDivOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPUDivOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPUDivOpAdaptor : public VPUDivOpGenericAdaptor<::mlir::ValueRange> { public: using VPUDivOpGenericAdaptor::VPUDivOpGenericAdaptor; VPUDivOpAdaptor(VPUDivOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPUDivOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPUDivOpAdaptor; template using GenericAdaptor = VPUDivOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.udiv"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPUDivOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPUDivOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPUDivOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPUDivOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPUDivOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPUDivOp 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 VPUDivOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPUDivOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPUDivOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPUIToFPOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPUIToFPOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPUIToFPOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.uitofp", odsAttrs.getContext()); } VPUIToFPOpGenericAdaptorBase(VPUIToFPOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPUIToFPOpGenericAdaptor : public detail::VPUIToFPOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPUIToFPOpGenericAdaptorBase; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; public: VPUIToFPOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPUIToFPOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPUIToFPOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPUIToFPOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPUIToFPOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPUIToFPOpGenericAdaptor(RangeT values, const VPUIToFPOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPUIToFPOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSrc() { return (*getODSOperands(0).begin()); } ValueT getMask() { return (*getODSOperands(1).begin()); } ValueT getEvl() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPUIToFPOpAdaptor : public VPUIToFPOpGenericAdaptor<::mlir::ValueRange> { public: using VPUIToFPOpGenericAdaptor::VPUIToFPOpGenericAdaptor; VPUIToFPOpAdaptor(VPUIToFPOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPUIToFPOp : public ::mlir::Op::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 = VPUIToFPOpAdaptor; template using GenericAdaptor = VPUIToFPOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.uitofp"); } std::pair 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> getSrc() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getSrcMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 src, ::mlir::Value mask, ::mlir::Value evl); static VPUIToFPOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPUIToFPOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPUIToFPOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPUIToFPOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPUIToFPOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPUIToFPOp 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 VPUIToFPOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPUIToFPOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPUIToFPOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPUMaxOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPUMaxOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPUMaxOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.umax", odsAttrs.getContext()); } VPUMaxOpGenericAdaptorBase(VPUMaxOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPUMaxOpGenericAdaptor : public detail::VPUMaxOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPUMaxOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPUMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPUMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPUMaxOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPUMaxOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPUMaxOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPUMaxOpGenericAdaptor(RangeT values, const VPUMaxOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPUMaxOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPUMaxOpAdaptor : public VPUMaxOpGenericAdaptor<::mlir::ValueRange> { public: using VPUMaxOpGenericAdaptor::VPUMaxOpGenericAdaptor; VPUMaxOpAdaptor(VPUMaxOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPUMaxOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPUMaxOpAdaptor; template using GenericAdaptor = VPUMaxOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.umax"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPUMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPUMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPUMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPUMaxOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPUMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPUMaxOp 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 VPUMaxOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPUMaxOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPUMaxOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPUMinOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPUMinOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPUMinOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.umin", odsAttrs.getContext()); } VPUMinOpGenericAdaptorBase(VPUMinOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPUMinOpGenericAdaptor : public detail::VPUMinOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPUMinOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPUMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPUMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPUMinOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPUMinOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPUMinOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPUMinOpGenericAdaptor(RangeT values, const VPUMinOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPUMinOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPUMinOpAdaptor : public VPUMinOpGenericAdaptor<::mlir::ValueRange> { public: using VPUMinOpGenericAdaptor::VPUMinOpGenericAdaptor; VPUMinOpAdaptor(VPUMinOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPUMinOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPUMinOpAdaptor; template using GenericAdaptor = VPUMinOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.umin"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPUMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPUMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPUMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPUMinOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPUMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPUMinOp 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 VPUMinOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPUMinOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPUMinOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPURemOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPURemOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPURemOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.urem", odsAttrs.getContext()); } VPURemOpGenericAdaptorBase(VPURemOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPURemOpGenericAdaptor : public detail::VPURemOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPURemOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPURemOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPURemOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPURemOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPURemOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPURemOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPURemOpGenericAdaptor(RangeT values, const VPURemOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPURemOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPURemOpAdaptor : public VPURemOpGenericAdaptor<::mlir::ValueRange> { public: using VPURemOpGenericAdaptor::VPURemOpGenericAdaptor; VPURemOpAdaptor(VPURemOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPURemOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPURemOpAdaptor; template using GenericAdaptor = VPURemOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.urem"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPURemOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPURemOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPURemOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPURemOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPURemOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPURemOp 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 VPURemOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPURemOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPURemOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPXorOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPXorOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPXorOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.xor", odsAttrs.getContext()); } VPXorOpGenericAdaptorBase(VPXorOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPXorOpGenericAdaptor : public detail::VPXorOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPXorOpGenericAdaptorBase; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; public: VPXorOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPXorOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPXorOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPXorOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPXorOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPXorOpGenericAdaptor(RangeT values, const VPXorOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPXorOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getLhs() { return (*getODSOperands(0).begin()); } ValueT getRhs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } ValueT getEvl() { return (*getODSOperands(3).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPXorOpAdaptor : public VPXorOpGenericAdaptor<::mlir::ValueRange> { public: using VPXorOpGenericAdaptor::VPXorOpGenericAdaptor; VPXorOpAdaptor(VPXorOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPXorOp : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<4>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = VPXorOpAdaptor; template using GenericAdaptor = VPXorOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_lhs = 0; static constexpr int odsIndex_rhs = 1; static constexpr int odsIndex_mask = 2; static constexpr int odsIndex_evl = 3; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.xor"); } std::pair 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> getLhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getRhs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::OpOperand &getLhsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getRhsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPXorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPXorOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPXorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static VPXorOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value lhs, ::mlir::Value rhs, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPXorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPXorOp 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 VPXorOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPXorOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPXorOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VPZExtOp declarations //===----------------------------------------------------------------------===// namespace detail { class VPZExtOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VPZExtOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vp.zext", odsAttrs.getContext()); } VPZExtOpGenericAdaptorBase(VPZExtOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VPZExtOpGenericAdaptor : public detail::VPZExtOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VPZExtOpGenericAdaptorBase; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; public: VPZExtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VPZExtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VPZExtOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VPZExtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VPZExtOpGenericAdaptor(values, attrs, Properties{}, {}) {} VPZExtOpGenericAdaptor(RangeT values, const VPZExtOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VPZExtOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSrc() { return (*getODSOperands(0).begin()); } ValueT getMask() { return (*getODSOperands(1).begin()); } ValueT getEvl() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VPZExtOpAdaptor : public VPZExtOpGenericAdaptor<::mlir::ValueRange> { public: using VPZExtOpGenericAdaptor::VPZExtOpGenericAdaptor; VPZExtOpAdaptor(VPZExtOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VPZExtOp : public ::mlir::Op::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 = VPZExtOpAdaptor; template using GenericAdaptor = VPZExtOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_src = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_evl = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vp.zext"); } std::pair 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> getSrc() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getEvl() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getSrcMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getEvlMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 src, ::mlir::Value mask, ::mlir::Value evl); static VPZExtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPZExtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPZExtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static VPZExtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value src, ::mlir::Value mask, ::mlir::Value evl); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPZExtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VPZExtOp 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 VPZExtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VPZExtOp 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VPZExtOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VaCopyOp declarations //===----------------------------------------------------------------------===// namespace detail { class VaCopyOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VaCopyOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vacopy", odsAttrs.getContext()); } VaCopyOpGenericAdaptorBase(VaCopyOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VaCopyOpGenericAdaptor : public detail::VaCopyOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VaCopyOpGenericAdaptorBase; static constexpr int odsIndex_dest_list = 0; static constexpr int odsIndex_src_list = 1; public: VaCopyOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VaCopyOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VaCopyOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VaCopyOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VaCopyOpGenericAdaptor(values, attrs, Properties{}, {}) {} VaCopyOpGenericAdaptor(RangeT values, const VaCopyOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VaCopyOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getDestList() { return (*getODSOperands(0).begin()); } ValueT getSrcList() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VaCopyOpAdaptor : public VaCopyOpGenericAdaptor<::mlir::ValueRange> { public: using VaCopyOpGenericAdaptor::VaCopyOpGenericAdaptor; VaCopyOpAdaptor(VaCopyOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VaCopyOp : public ::mlir::Op::Impl, ::mlir::OpTrait::OpInvariants> { public: using Op::Op; using Op::print; using Adaptor = VaCopyOpAdaptor; template using GenericAdaptor = VaCopyOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_dest_list = 0; static constexpr int odsIndex_src_list = 1; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vacopy"); } std::pair 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::LLVM::LLVMPointerType> getDestList() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getSrcList() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getDestListMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getSrcListMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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::Value dest_list, ::mlir::Value src_list); static VaCopyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dest_list, ::mlir::Value src_list); static VaCopyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dest_list, ::mlir::Value src_list); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dest_list, ::mlir::Value src_list); static VaCopyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dest_list, ::mlir::Value src_list); static VaCopyOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dest_list, ::mlir::Value src_list); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VaCopyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VaCopyOp 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 VaCopyOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VaCopyOp 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VaCopyOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VaEndOp declarations //===----------------------------------------------------------------------===// namespace detail { class VaEndOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VaEndOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vaend", odsAttrs.getContext()); } VaEndOpGenericAdaptorBase(VaEndOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VaEndOpGenericAdaptor : public detail::VaEndOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VaEndOpGenericAdaptorBase; static constexpr int odsIndex_arg_list = 0; public: VaEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VaEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VaEndOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VaEndOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VaEndOpGenericAdaptor(values, attrs, Properties{}, {}) {} VaEndOpGenericAdaptor(RangeT values, const VaEndOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VaEndOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getArgList() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VaEndOpAdaptor : public VaEndOpGenericAdaptor<::mlir::ValueRange> { public: using VaEndOpGenericAdaptor::VaEndOpGenericAdaptor; VaEndOpAdaptor(VaEndOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VaEndOp : public ::mlir::Op { public: using Op::Op; using Op::print; using Adaptor = VaEndOpAdaptor; template using GenericAdaptor = VaEndOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_arg_list = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vaend"); } std::pair 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::LLVM::LLVMPointerType> getArgList() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getArgListMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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::Value arg_list); static VaEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_list); static VaEndOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_list); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_list); static VaEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_list); static VaEndOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_list); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VaEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VaEndOp 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 VaEndOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VaEndOp 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VaEndOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VaStartOp declarations //===----------------------------------------------------------------------===// namespace detail { class VaStartOpGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VaStartOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vastart", odsAttrs.getContext()); } VaStartOpGenericAdaptorBase(VaStartOp op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VaStartOpGenericAdaptor : public detail::VaStartOpGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VaStartOpGenericAdaptorBase; static constexpr int odsIndex_arg_list = 0; public: VaStartOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VaStartOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VaStartOpGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VaStartOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VaStartOpGenericAdaptor(values, attrs, Properties{}, {}) {} VaStartOpGenericAdaptor(RangeT values, const VaStartOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VaStartOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getArgList() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VaStartOpAdaptor : public VaStartOpGenericAdaptor<::mlir::ValueRange> { public: using VaStartOpGenericAdaptor::VaStartOpGenericAdaptor; VaStartOpAdaptor(VaStartOp op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VaStartOp : public ::mlir::Op { public: using Op::Op; using Op::print; using Adaptor = VaStartOpAdaptor; template using GenericAdaptor = VaStartOpGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_arg_list = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vastart"); } std::pair 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::LLVM::LLVMPointerType> getArgList() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getArgListMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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::Value arg_list); static VaStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_list); static VaStartOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_list); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_list); static VaStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_list); static VaStartOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_list); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VaStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VaStartOp 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 VaStartOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VaStartOp 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); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VaStartOp) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::VarAnnotation declarations //===----------------------------------------------------------------------===// namespace detail { class VarAnnotationGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: VarAnnotationGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.var.annotation", odsAttrs.getContext()); } VarAnnotationGenericAdaptorBase(VarAnnotation op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class VarAnnotationGenericAdaptor : public detail::VarAnnotationGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::VarAnnotationGenericAdaptorBase; static constexpr int odsIndex_val = 0; static constexpr int odsIndex_annotation = 1; static constexpr int odsIndex_fileName = 2; static constexpr int odsIndex_line = 3; static constexpr int odsIndex_attr = 4; public: VarAnnotationGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} VarAnnotationGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : VarAnnotationGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} VarAnnotationGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : VarAnnotationGenericAdaptor(values, attrs, Properties{}, {}) {} VarAnnotationGenericAdaptor(RangeT values, const VarAnnotationGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> VarAnnotationGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getVal() { return (*getODSOperands(0).begin()); } ValueT getAnnotation() { return (*getODSOperands(1).begin()); } ValueT getFileName() { return (*getODSOperands(2).begin()); } ValueT getLine() { return (*getODSOperands(3).begin()); } ValueT getAttr() { return (*getODSOperands(4).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class VarAnnotationAdaptor : public VarAnnotationGenericAdaptor<::mlir::ValueRange> { public: using VarAnnotationGenericAdaptor::VarAnnotationGenericAdaptor; VarAnnotationAdaptor(VarAnnotation op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class VarAnnotation : public ::mlir::Op::Impl, ::mlir::OpTrait::OpInvariants> { public: using Op::Op; using Op::print; using Adaptor = VarAnnotationAdaptor; template using GenericAdaptor = VarAnnotationGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_val = 0; static constexpr int odsIndex_annotation = 1; static constexpr int odsIndex_fileName = 2; static constexpr int odsIndex_line = 3; static constexpr int odsIndex_attr = 4; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.var.annotation"); } std::pair 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::LLVM::LLVMPointerType> getVal() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getAnnotation() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getFileName() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(2).begin()); } ::mlir::TypedValue<::mlir::IntegerType> getLine() { return ::llvm::cast<::mlir::TypedValue<::mlir::IntegerType>>(*getODSOperands(3).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getAttr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(4).begin()); } ::mlir::OpOperand &getValMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getAnnotationMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getFileNameMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getLineMutable() { auto range = getODSOperandIndexAndLength(3); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getAttrMutable() { auto range = getODSOperandIndexAndLength(4); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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::Value val, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line, ::mlir::Value attr); static VarAnnotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value val, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line, ::mlir::Value attr); static VarAnnotation create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value val, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line, ::mlir::Value attr); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line, ::mlir::Value attr); static VarAnnotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line, ::mlir::Value attr); static VarAnnotation create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value val, ::mlir::Value annotation, ::mlir::Value fileName, ::mlir::Value line, ::mlir::Value attr); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VarAnnotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static VarAnnotation 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 VarAnnotation create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static VarAnnotation 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::VarAnnotation) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::masked_compressstore declarations //===----------------------------------------------------------------------===// namespace detail { class masked_compressstoreGenericAdaptorBase { public: struct Properties { using arg_attrsTy = ::mlir::ArrayAttr; arg_attrsTy arg_attrs; auto getArgAttrs() const { auto &propStorage = this->arg_attrs; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setArgAttrs(const ::mlir::ArrayAttr &propValue) { this->arg_attrs = propValue; } using res_attrsTy = ::mlir::ArrayAttr; res_attrsTy res_attrs; auto getResAttrs() const { auto &propStorage = this->res_attrs; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setResAttrs(const ::mlir::ArrayAttr &propValue) { this->res_attrs = propValue; } bool operator==(const Properties &rhs) const { return rhs.arg_attrs == this->arg_attrs && rhs.res_attrs == this->res_attrs && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: masked_compressstoreGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.masked.compressstore", odsAttrs.getContext()); } masked_compressstoreGenericAdaptorBase(masked_compressstore op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::ArrayAttr getArgAttrsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs); return attr; } ::std::optional< ::mlir::ArrayAttr > getArgAttrs(); ::mlir::ArrayAttr getResAttrsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs); return attr; } ::std::optional< ::mlir::ArrayAttr > getResAttrs(); }; } // namespace detail template class masked_compressstoreGenericAdaptor : public detail::masked_compressstoreGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::masked_compressstoreGenericAdaptorBase; static constexpr int odsIndex_value = 0; static constexpr int odsIndex_ptr = 1; static constexpr int odsIndex_mask = 2; public: masked_compressstoreGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} masked_compressstoreGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : masked_compressstoreGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} masked_compressstoreGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : masked_compressstoreGenericAdaptor(values, attrs, Properties{}, {}) {} masked_compressstoreGenericAdaptor(RangeT values, const masked_compressstoreGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> masked_compressstoreGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getValue() { return (*getODSOperands(0).begin()); } ValueT getPtr() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class masked_compressstoreAdaptor : public masked_compressstoreGenericAdaptor<::mlir::ValueRange> { public: using masked_compressstoreGenericAdaptor::masked_compressstoreGenericAdaptor; masked_compressstoreAdaptor(masked_compressstore op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class masked_compressstore : public ::mlir::Op::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ArgAndResultAttrsOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = masked_compressstoreAdaptor; template using GenericAdaptor = masked_compressstoreGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_value = 0; static constexpr int odsIndex_ptr = 1; static constexpr int odsIndex_mask = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("arg_attrs"), ::llvm::StringRef("res_attrs")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getArgAttrsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getArgAttrsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getResAttrsAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getResAttrsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.masked.compressstore"); } std::pair 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> getValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::LLVM::LLVMPointerType> getPtr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getPtrMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::ArrayAttr getArgAttrsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs); } ::std::optional< ::mlir::ArrayAttr > getArgAttrs(); ::mlir::ArrayAttr getResAttrsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs); } ::std::optional< ::mlir::ArrayAttr > getResAttrs(); void setArgAttrsAttr(::mlir::ArrayAttr attr) { getProperties().arg_attrs = attr; } void setResAttrsAttr(::mlir::ArrayAttr attr) { getProperties().res_attrs = attr; } ::mlir::Attribute removeArgAttrsAttr() { auto attr = getProperties().arg_attrs; getProperties().arg_attrs = {}; return attr; } ::mlir::Attribute removeResAttrsAttr() { auto attr = getProperties().res_attrs; getProperties().res_attrs = {}; return attr; } static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Value value, Value ptr, Value mask, uint64_t align = 1); static masked_compressstore create(::mlir::OpBuilder &builder, ::mlir::Location location, Value value, Value ptr, Value mask, uint64_t align = 1); static masked_compressstore create(::mlir::ImplicitLocOpBuilder &builder, Value value, Value ptr, Value mask, uint64_t align = 1); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value, ::mlir::Value ptr, ::mlir::Value mask, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static masked_compressstore create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value, ::mlir::Value ptr, ::mlir::Value mask, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static masked_compressstore create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value, ::mlir::Value ptr, ::mlir::Value mask, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value ptr, ::mlir::Value mask, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static masked_compressstore create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value ptr, ::mlir::Value mask, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static masked_compressstore create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value ptr, ::mlir::Value mask, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static masked_compressstore create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static masked_compressstore 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 masked_compressstore create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static masked_compressstore 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 2 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::masked_compressstore) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::masked_compressstoreGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::masked_expandload declarations //===----------------------------------------------------------------------===// namespace detail { class masked_expandloadGenericAdaptorBase { public: struct Properties { using arg_attrsTy = ::mlir::ArrayAttr; arg_attrsTy arg_attrs; auto getArgAttrs() const { auto &propStorage = this->arg_attrs; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setArgAttrs(const ::mlir::ArrayAttr &propValue) { this->arg_attrs = propValue; } using res_attrsTy = ::mlir::ArrayAttr; res_attrsTy res_attrs; auto getResAttrs() const { auto &propStorage = this->res_attrs; return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(propStorage); } void setResAttrs(const ::mlir::ArrayAttr &propValue) { this->res_attrs = propValue; } bool operator==(const Properties &rhs) const { return rhs.arg_attrs == this->arg_attrs && rhs.res_attrs == this->res_attrs && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: masked_expandloadGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.masked.expandload", odsAttrs.getContext()); } masked_expandloadGenericAdaptorBase(masked_expandload op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::ArrayAttr getArgAttrsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs); return attr; } ::std::optional< ::mlir::ArrayAttr > getArgAttrs(); ::mlir::ArrayAttr getResAttrsAttr() { auto attr = ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs); return attr; } ::std::optional< ::mlir::ArrayAttr > getResAttrs(); }; } // namespace detail template class masked_expandloadGenericAdaptor : public detail::masked_expandloadGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::masked_expandloadGenericAdaptorBase; static constexpr int odsIndex_ptr = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_passthru = 2; public: masked_expandloadGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} masked_expandloadGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : masked_expandloadGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} masked_expandloadGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : masked_expandloadGenericAdaptor(values, attrs, Properties{}, {}) {} masked_expandloadGenericAdaptor(RangeT values, const masked_expandloadGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> masked_expandloadGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getPtr() { return (*getODSOperands(0).begin()); } ValueT getMask() { return (*getODSOperands(1).begin()); } ValueT getPassthru() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class masked_expandloadAdaptor : public masked_expandloadGenericAdaptor<::mlir::ValueRange> { public: using masked_expandloadGenericAdaptor::masked_expandloadGenericAdaptor; masked_expandloadAdaptor(masked_expandload op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class masked_expandload : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<3>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ArgAndResultAttrsOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = masked_expandloadAdaptor; template using GenericAdaptor = masked_expandloadGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_ptr = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_passthru = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("arg_attrs"), ::llvm::StringRef("res_attrs")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getArgAttrsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getArgAttrsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } ::mlir::StringAttr getResAttrsAttrName() { return getAttributeNameForIndex(1); } static ::mlir::StringAttr getResAttrsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 1); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.masked.expandload"); } std::pair 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::LLVM::LLVMPointerType> getPtr() { return ::llvm::cast<::mlir::TypedValue<::mlir::LLVM::LLVMPointerType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getPassthru() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getPtrMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getPassthruMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::ArrayAttr getArgAttrsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().arg_attrs); } ::std::optional< ::mlir::ArrayAttr > getArgAttrs(); ::mlir::ArrayAttr getResAttrsAttr() { return ::llvm::dyn_cast_or_null<::mlir::ArrayAttr>(getProperties().res_attrs); } ::std::optional< ::mlir::ArrayAttr > getResAttrs(); void setArgAttrsAttr(::mlir::ArrayAttr attr) { getProperties().arg_attrs = attr; } void setResAttrsAttr(::mlir::ArrayAttr attr) { getProperties().res_attrs = attr; } ::mlir::Attribute removeArgAttrsAttr() { auto attr = getProperties().arg_attrs; getProperties().arg_attrs = {}; return attr; } ::mlir::Attribute removeResAttrsAttr() { auto attr = getProperties().res_attrs; getProperties().res_attrs = {}; return attr; } static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, TypeRange resTy, Value ptr, Value mask, Value passthru, uint64_t align = 1); static masked_expandload create(::mlir::OpBuilder &builder, ::mlir::Location location, TypeRange resTy, Value ptr, Value mask, Value passthru, uint64_t align = 1); static masked_expandload create(::mlir::ImplicitLocOpBuilder &builder, TypeRange resTy, Value ptr, Value mask, Value passthru, uint64_t align = 1); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value passthru, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static masked_expandload create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value passthru, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static masked_expandload create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value passthru, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value passthru, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static masked_expandload create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value passthru, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static masked_expandload create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptr, ::mlir::Value mask, ::mlir::Value passthru, /*optional*/::mlir::ArrayAttr arg_attrs, /*optional*/::mlir::ArrayAttr res_attrs); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static masked_expandload create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static masked_expandload 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 masked_expandload create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static masked_expandload 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 2 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::masked_expandload) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::masked_expandloadGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::masked_gather declarations //===----------------------------------------------------------------------===// namespace detail { class masked_gatherGenericAdaptorBase { public: struct Properties { using alignmentTy = ::mlir::IntegerAttr; alignmentTy alignment; auto getAlignment() const { auto &propStorage = this->alignment; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setAlignment(const ::mlir::IntegerAttr &propValue) { this->alignment = propValue; } bool operator==(const Properties &rhs) const { return rhs.alignment == this->alignment && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: masked_gatherGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.masked.gather", odsAttrs.getContext()); } masked_gatherGenericAdaptorBase(masked_gather op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize); const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getAlignmentAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().alignment); return attr; } uint32_t getAlignment(); }; } // namespace detail template class masked_gatherGenericAdaptor : public detail::masked_gatherGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::masked_gatherGenericAdaptorBase; static constexpr int odsIndex_ptrs = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_pass_thru = 2; public: masked_gatherGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} masked_gatherGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : masked_gatherGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} masked_gatherGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : masked_gatherGenericAdaptor(values, attrs, Properties{}, {}) {} masked_gatherGenericAdaptor(RangeT values, const masked_gatherGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> masked_gatherGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getPtrs() { return (*getODSOperands(0).begin()); } ValueT getMask() { return (*getODSOperands(1).begin()); } RangeT getPassThru() { return getODSOperands(2); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class masked_gatherAdaptor : public masked_gatherGenericAdaptor<::mlir::ValueRange> { public: using masked_gatherGenericAdaptor::masked_gatherGenericAdaptor; masked_gatherAdaptor(masked_gather op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class masked_gather : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = masked_gatherAdaptor; template using GenericAdaptor = masked_gatherGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_ptrs = 0; static constexpr int odsIndex_mask = 1; static constexpr int odsIndex_pass_thru = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("alignment")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getAlignmentAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getAlignmentAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.masked.gather"); } std::pair getODSOperandIndexAndLength(unsigned index); ::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> getPtrs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::Operation::operand_range getPassThru() { return getODSOperands(2); } ::mlir::OpOperand &getPtrsMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::MutableOperandRange getPassThruMutable(); std::pair 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getAlignmentAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().alignment); } uint32_t getAlignment(); void setAlignmentAttr(::mlir::IntegerAttr attr) { getProperties().alignment = attr; } void setAlignment(uint32_t attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operands, ArrayRef attributes = {}); static masked_gather create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operands, ArrayRef attributes = {}); static masked_gather create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operands, ArrayRef attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, ::mlir::IntegerAttr alignment); static masked_gather create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, ::mlir::IntegerAttr alignment); static masked_gather create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, ::mlir::IntegerAttr alignment); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, ::mlir::IntegerAttr alignment); static masked_gather create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, ::mlir::IntegerAttr alignment); static masked_gather create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, ::mlir::IntegerAttr alignment); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, uint32_t alignment); static masked_gather create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, uint32_t alignment); static masked_gather create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, uint32_t alignment); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, uint32_t alignment); static masked_gather create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, uint32_t alignment); static masked_gather create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::ValueRange pass_thru, uint32_t alignment); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static masked_gather create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static masked_gather 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 masked_gather create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static masked_gather create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); ::llvm::LogicalResult verify(); static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result); void print(::mlir::OpAsmPrinter &_odsPrinter); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::masked_gather) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::masked_gatherGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::masked_scatter declarations //===----------------------------------------------------------------------===// namespace detail { class masked_scatterGenericAdaptorBase { public: struct Properties { using alignmentTy = ::mlir::IntegerAttr; alignmentTy alignment; auto getAlignment() const { auto &propStorage = this->alignment; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setAlignment(const ::mlir::IntegerAttr &propValue) { this->alignment = propValue; } bool operator==(const Properties &rhs) const { return rhs.alignment == this->alignment && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: masked_scatterGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.masked.scatter", odsAttrs.getContext()); } masked_scatterGenericAdaptorBase(masked_scatter op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getAlignmentAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().alignment); return attr; } uint32_t getAlignment(); }; } // namespace detail template class masked_scatterGenericAdaptor : public detail::masked_scatterGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::masked_scatterGenericAdaptorBase; static constexpr int odsIndex_value = 0; static constexpr int odsIndex_ptrs = 1; static constexpr int odsIndex_mask = 2; public: masked_scatterGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} masked_scatterGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : masked_scatterGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} masked_scatterGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : masked_scatterGenericAdaptor(values, attrs, Properties{}, {}) {} masked_scatterGenericAdaptor(RangeT values, const masked_scatterGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> masked_scatterGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getValue() { return (*getODSOperands(0).begin()); } ValueT getPtrs() { return (*getODSOperands(1).begin()); } ValueT getMask() { return (*getODSOperands(2).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class masked_scatterAdaptor : public masked_scatterGenericAdaptor<::mlir::ValueRange> { public: using masked_scatterGenericAdaptor::masked_scatterGenericAdaptor; masked_scatterAdaptor(masked_scatter op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class masked_scatter : public ::mlir::Op::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = masked_scatterAdaptor; template using GenericAdaptor = masked_scatterGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_value = 0; static constexpr int odsIndex_ptrs = 1; static constexpr int odsIndex_mask = 2; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("alignment")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getAlignmentAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getAlignmentAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.masked.scatter"); } std::pair 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> getValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getPtrs() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::TypedValue<::mlir::VectorType> getMask() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(2).begin()); } ::mlir::OpOperand &getValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getPtrsMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getMaskMutable() { auto range = getODSOperandIndexAndLength(2); return getOperation()->getOpOperand(range.first); } std::pair 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)}; } 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getAlignmentAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().alignment); } uint32_t getAlignment(); void setAlignmentAttr(::mlir::IntegerAttr attr) { getProperties().alignment = attr; } void setAlignment(uint32_t attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operands, ArrayRef attributes = {}); static masked_scatter create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operands, ArrayRef attributes = {}); static masked_scatter create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operands, ArrayRef attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ValueRange operands, ArrayRef attributes = {}); static masked_scatter create(::mlir::OpBuilder &builder, ::mlir::Location location, ValueRange operands, ArrayRef attributes = {}); static masked_scatter create(::mlir::ImplicitLocOpBuilder &builder, ValueRange operands, ArrayRef attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::IntegerAttr alignment); static masked_scatter create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::IntegerAttr alignment); static masked_scatter create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::IntegerAttr alignment); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::IntegerAttr alignment); static masked_scatter create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::IntegerAttr alignment); static masked_scatter create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, ::mlir::IntegerAttr alignment); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, uint32_t alignment); static masked_scatter create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, uint32_t alignment); static masked_scatter create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, uint32_t alignment); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, uint32_t alignment); static masked_scatter create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, uint32_t alignment); static masked_scatter create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value value, ::mlir::Value ptrs, ::mlir::Value mask, uint32_t alignment); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static masked_scatter create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static masked_scatter 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 masked_scatter create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static masked_scatter create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); ::llvm::LogicalResult verify(); static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result); void print(::mlir::OpAsmPrinter &_odsPrinter); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::masked_scatter) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::masked_scatterGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_deinterleave2 declarations //===----------------------------------------------------------------------===// namespace detail { class vector_deinterleave2GenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_deinterleave2GenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.deinterleave2", odsAttrs.getContext()); } vector_deinterleave2GenericAdaptorBase(vector_deinterleave2 op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class vector_deinterleave2GenericAdaptor : public detail::vector_deinterleave2GenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_deinterleave2GenericAdaptorBase; static constexpr int odsIndex_vec = 0; public: vector_deinterleave2GenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_deinterleave2GenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_deinterleave2GenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_deinterleave2GenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_deinterleave2GenericAdaptor(values, attrs, Properties{}, {}) {} vector_deinterleave2GenericAdaptor(RangeT values, const vector_deinterleave2GenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_deinterleave2GenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getVec() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_deinterleave2Adaptor : public vector_deinterleave2GenericAdaptor<::mlir::ValueRange> { public: using vector_deinterleave2GenericAdaptor::vector_deinterleave2GenericAdaptor; vector_deinterleave2Adaptor(vector_deinterleave2 op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_deinterleave2 : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = vector_deinterleave2Adaptor; template using GenericAdaptor = vector_deinterleave2GenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_vec = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.deinterleave2"); } std::pair 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> getVec() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getVecMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 vec); static vector_deinterleave2 create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value vec); static vector_deinterleave2 create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value vec); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vec); static vector_deinterleave2 create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vec); static vector_deinterleave2 create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vec); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_deinterleave2 create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_deinterleave2 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 vector_deinterleave2 create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_deinterleave2 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_deinterleave2) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_extract declarations //===----------------------------------------------------------------------===// namespace detail { class vector_extractGenericAdaptorBase { public: struct Properties { using posTy = ::mlir::IntegerAttr; posTy pos; auto getPos() const { auto &propStorage = this->pos; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setPos(const ::mlir::IntegerAttr &propValue) { this->pos = propValue; } bool operator==(const Properties &rhs) const { return rhs.pos == this->pos && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_extractGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.extract", odsAttrs.getContext()); } vector_extractGenericAdaptorBase(vector_extract op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getPosAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().pos); return attr; } uint64_t getPos(); }; } // namespace detail template class vector_extractGenericAdaptor : public detail::vector_extractGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_extractGenericAdaptorBase; static constexpr int odsIndex_srcvec = 0; public: vector_extractGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_extractGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_extractGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_extractGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_extractGenericAdaptor(values, attrs, Properties{}, {}) {} vector_extractGenericAdaptor(RangeT values, const vector_extractGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_extractGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getSrcvec() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_extractAdaptor : public vector_extractGenericAdaptor<::mlir::ValueRange> { public: using vector_extractGenericAdaptor::vector_extractGenericAdaptor; vector_extractAdaptor(vector_extract op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_extract : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = vector_extractAdaptor; template using GenericAdaptor = vector_extractGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_srcvec = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("pos")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getPosAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getPosAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.extract"); } std::pair 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> getSrcvec() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getSrcvecMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getPosAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().pos); } uint64_t getPos(); void setPosAttr(::mlir::IntegerAttr attr) { getProperties().pos = attr; } void setPos(uint64_t attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value srcvec, ::mlir::IntegerAttr pos); static vector_extract create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value srcvec, ::mlir::IntegerAttr pos); static vector_extract create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value srcvec, ::mlir::IntegerAttr pos); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcvec, ::mlir::IntegerAttr pos); static vector_extract create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcvec, ::mlir::IntegerAttr pos); static vector_extract create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcvec, ::mlir::IntegerAttr pos); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value srcvec, uint64_t pos); static vector_extract create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value srcvec, uint64_t pos); static vector_extract create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value srcvec, uint64_t pos); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value srcvec, uint64_t pos); static vector_extract create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value srcvec, uint64_t pos); static vector_extract create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value srcvec, uint64_t pos); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_extract create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_extract 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 vector_extract create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_extract 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: uint64_t getVectorBitWidth(Type vector) { return getVectorNumElements(vector).getKnownMinValue() * ::llvm::cast(vector).getElementType() .getIntOrFloatBitWidth(); } uint64_t getSrcVectorBitWidth() { return getVectorBitWidth(getSrcvec().getType()); } uint64_t getResVectorBitWidth() { return getVectorBitWidth(getRes().getType()); } }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_extract) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_extractGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_insert declarations //===----------------------------------------------------------------------===// namespace detail { class vector_insertGenericAdaptorBase { public: struct Properties { using posTy = ::mlir::IntegerAttr; posTy pos; auto getPos() const { auto &propStorage = this->pos; return ::llvm::cast<::mlir::IntegerAttr>(propStorage); } void setPos(const ::mlir::IntegerAttr &propValue) { this->pos = propValue; } bool operator==(const Properties &rhs) const { return rhs.pos == this->pos && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_insertGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.insert", odsAttrs.getContext()); } vector_insertGenericAdaptorBase(vector_insert op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::IntegerAttr getPosAttr() { auto attr = ::llvm::cast<::mlir::IntegerAttr>(getProperties().pos); return attr; } uint64_t getPos(); }; } // namespace detail template class vector_insertGenericAdaptor : public detail::vector_insertGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_insertGenericAdaptorBase; static constexpr int odsIndex_dstvec = 0; static constexpr int odsIndex_srcvec = 1; public: vector_insertGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_insertGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_insertGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_insertGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_insertGenericAdaptor(values, attrs, Properties{}, {}) {} vector_insertGenericAdaptor(RangeT values, const vector_insertGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_insertGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getDstvec() { return (*getODSOperands(0).begin()); } ValueT getSrcvec() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_insertAdaptor : public vector_insertGenericAdaptor<::mlir::ValueRange> { public: using vector_insertGenericAdaptor::vector_insertGenericAdaptor; vector_insertAdaptor(vector_insert op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_insert : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::InferTypeOpInterface::Trait> { public: using Op::Op; using Op::print; using Adaptor = vector_insertAdaptor; template using GenericAdaptor = vector_insertGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_dstvec = 0; static constexpr int odsIndex_srcvec = 1; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("pos")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getPosAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getPosAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.insert"); } std::pair 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> getDstvec() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getSrcvec() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getDstvecMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getSrcvecMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::IntegerAttr getPosAttr() { return ::llvm::cast<::mlir::IntegerAttr>(getProperties().pos); } uint64_t getPos(); void setPosAttr(::mlir::IntegerAttr attr) { getProperties().pos = attr; } void setPos(uint64_t attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos); static vector_insert create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos); static vector_insert create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos); static vector_insert create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos); static vector_insert create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos); static vector_insert create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos); static vector_insert create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dstvec, ::mlir::Value srcvec, ::mlir::IntegerAttr pos); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos); static vector_insert create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos); static vector_insert create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos); static vector_insert create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos); static vector_insert create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos); static vector_insert create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos); static vector_insert create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dstvec, ::mlir::Value srcvec, uint64_t pos); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_insert create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_insert create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_insert create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_insert create(::mlir::ImplicitLocOpBuilder &builder, ::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 vector_insert create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_insert create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_insert create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_insert create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult inferReturnTypes(::mlir::MLIRContext *context, ::std::optional<::mlir::Location> location, ::mlir::ValueRange operands, ::mlir::DictionaryAttr attributes, ::mlir::PropertyRef properties, ::mlir::RegionRange regions, ::llvm::SmallVectorImpl<::mlir::Type>&inferredReturnTypes); 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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: uint64_t getVectorBitWidth(Type vector) { return getVectorNumElements(vector).getKnownMinValue() * ::llvm::cast(vector).getElementType() .getIntOrFloatBitWidth(); } uint64_t getSrcVectorBitWidth() { return getVectorBitWidth(getSrcvec().getType()); } uint64_t getDstVectorBitWidth() { return getVectorBitWidth(getDstvec().getType()); } }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_insert) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_insertGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_interleave2 declarations //===----------------------------------------------------------------------===// namespace detail { class vector_interleave2GenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_interleave2GenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.interleave2", odsAttrs.getContext()); } vector_interleave2GenericAdaptorBase(vector_interleave2 op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class vector_interleave2GenericAdaptor : public detail::vector_interleave2GenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_interleave2GenericAdaptorBase; static constexpr int odsIndex_vec1 = 0; static constexpr int odsIndex_vec2 = 1; public: vector_interleave2GenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_interleave2GenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_interleave2GenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_interleave2GenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_interleave2GenericAdaptor(values, attrs, Properties{}, {}) {} vector_interleave2GenericAdaptor(RangeT values, const vector_interleave2GenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_interleave2GenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getVec1() { return (*getODSOperands(0).begin()); } ValueT getVec2() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_interleave2Adaptor : public vector_interleave2GenericAdaptor<::mlir::ValueRange> { public: using vector_interleave2GenericAdaptor::vector_interleave2GenericAdaptor; vector_interleave2Adaptor(vector_interleave2 op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_interleave2 : public ::mlir::Op::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 = vector_interleave2Adaptor; template using GenericAdaptor = vector_interleave2GenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_vec1 = 0; static constexpr int odsIndex_vec2 = 1; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.interleave2"); } std::pair 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> getVec1() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getVec2() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getVec1Mutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getVec2Mutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 vec1, ::mlir::Value vec2); static vector_interleave2 create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value vec1, ::mlir::Value vec2); static vector_interleave2 create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value vec1, ::mlir::Value vec2); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value vec1, ::mlir::Value vec2); static vector_interleave2 create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value vec1, ::mlir::Value vec2); static vector_interleave2 create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value vec1, ::mlir::Value vec2); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_interleave2 create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_interleave2 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 vector_interleave2 create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_interleave2 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_interleave2) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_reduce_add declarations //===----------------------------------------------------------------------===// namespace detail { class vector_reduce_addGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_reduce_addGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.reduce.add", odsAttrs.getContext()); } vector_reduce_addGenericAdaptorBase(vector_reduce_add op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class vector_reduce_addGenericAdaptor : public detail::vector_reduce_addGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_reduce_addGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: vector_reduce_addGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_reduce_addGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_reduce_addGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_reduce_addGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_reduce_addGenericAdaptor(values, attrs, Properties{}, {}) {} vector_reduce_addGenericAdaptor(RangeT values, const vector_reduce_addGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_reduce_addGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_reduce_addAdaptor : public vector_reduce_addGenericAdaptor<::mlir::ValueRange> { public: using vector_reduce_addGenericAdaptor::vector_reduce_addGenericAdaptor; vector_reduce_addAdaptor(vector_reduce_add op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_reduce_add : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultElementType> { public: using Op::Op; using Op::print; using Adaptor = vector_reduce_addAdaptor; template using GenericAdaptor = vector_reduce_addGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.reduce.add"); } std::pair 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> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 in); static vector_reduce_add create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in); static vector_reduce_add create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_add create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_add create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_add create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_add 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 vector_reduce_add create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_reduce_add 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_add) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_reduce_and declarations //===----------------------------------------------------------------------===// namespace detail { class vector_reduce_andGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_reduce_andGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.reduce.and", odsAttrs.getContext()); } vector_reduce_andGenericAdaptorBase(vector_reduce_and op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class vector_reduce_andGenericAdaptor : public detail::vector_reduce_andGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_reduce_andGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: vector_reduce_andGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_reduce_andGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_reduce_andGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_reduce_andGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_reduce_andGenericAdaptor(values, attrs, Properties{}, {}) {} vector_reduce_andGenericAdaptor(RangeT values, const vector_reduce_andGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_reduce_andGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_reduce_andAdaptor : public vector_reduce_andGenericAdaptor<::mlir::ValueRange> { public: using vector_reduce_andGenericAdaptor::vector_reduce_andGenericAdaptor; vector_reduce_andAdaptor(vector_reduce_and op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_reduce_and : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultElementType> { public: using Op::Op; using Op::print; using Adaptor = vector_reduce_andAdaptor; template using GenericAdaptor = vector_reduce_andGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.reduce.and"); } std::pair 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> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 in); static vector_reduce_and create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in); static vector_reduce_and create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_and create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_and create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_and create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_and 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 vector_reduce_and create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_reduce_and 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_and) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_reduce_fadd declarations //===----------------------------------------------------------------------===// namespace detail { class vector_reduce_faddGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_reduce_faddGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.reduce.fadd", odsAttrs.getContext()); } vector_reduce_faddGenericAdaptorBase(vector_reduce_fadd op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class vector_reduce_faddGenericAdaptor : public detail::vector_reduce_faddGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_reduce_faddGenericAdaptorBase; static constexpr int odsIndex_start_value = 0; static constexpr int odsIndex_input = 1; public: vector_reduce_faddGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_reduce_faddGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_reduce_faddGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_reduce_faddGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_reduce_faddGenericAdaptor(values, attrs, Properties{}, {}) {} vector_reduce_faddGenericAdaptor(RangeT values, const vector_reduce_faddGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_reduce_faddGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getStartValue() { return (*getODSOperands(0).begin()); } ValueT getInput() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_reduce_faddAdaptor : public vector_reduce_faddGenericAdaptor<::mlir::ValueRange> { public: using vector_reduce_faddGenericAdaptor::vector_reduce_faddGenericAdaptor; vector_reduce_faddAdaptor(vector_reduce_fadd op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_reduce_fadd : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultElementType> { public: using Op::Op; using Op::print; using Adaptor = vector_reduce_faddAdaptor; template using GenericAdaptor = vector_reduce_faddGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_start_value = 0; static constexpr int odsIndex_input = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.reduce.fadd"); } std::pair 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::FloatType> getStartValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getInput() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getStartValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getInputMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fadd create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fadd create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fadd create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fadd create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fadd create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fadd create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fadd create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fadd create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_fadd create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_fadd 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 vector_reduce_fadd create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_reduce_fadd create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_fadd) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_reduce_faddGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_reduce_fmax declarations //===----------------------------------------------------------------------===// namespace detail { class vector_reduce_fmaxGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_reduce_fmaxGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.reduce.fmax", odsAttrs.getContext()); } vector_reduce_fmaxGenericAdaptorBase(vector_reduce_fmax op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class vector_reduce_fmaxGenericAdaptor : public detail::vector_reduce_fmaxGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_reduce_fmaxGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: vector_reduce_fmaxGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_reduce_fmaxGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_reduce_fmaxGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_reduce_fmaxGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_reduce_fmaxGenericAdaptor(values, attrs, Properties{}, {}) {} vector_reduce_fmaxGenericAdaptor(RangeT values, const vector_reduce_fmaxGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_reduce_fmaxGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_reduce_fmaxAdaptor : public vector_reduce_fmaxGenericAdaptor<::mlir::ValueRange> { public: using vector_reduce_fmaxGenericAdaptor::vector_reduce_fmaxGenericAdaptor; vector_reduce_fmaxAdaptor(vector_reduce_fmax op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_reduce_fmax : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultElementType> { public: using Op::Op; using Op::print; using Adaptor = vector_reduce_fmaxAdaptor; template using GenericAdaptor = vector_reduce_fmaxGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.reduce.fmax"); } std::pair 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> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fmax create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fmax create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fmax create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fmax create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fmax create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fmax create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fmax create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fmax create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_fmax create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_fmax 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 vector_reduce_fmax create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_reduce_fmax create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_fmax) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_reduce_fmaxGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_reduce_fmaximum declarations //===----------------------------------------------------------------------===// namespace detail { class vector_reduce_fmaximumGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_reduce_fmaximumGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.reduce.fmaximum", odsAttrs.getContext()); } vector_reduce_fmaximumGenericAdaptorBase(vector_reduce_fmaximum op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class vector_reduce_fmaximumGenericAdaptor : public detail::vector_reduce_fmaximumGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_reduce_fmaximumGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: vector_reduce_fmaximumGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_reduce_fmaximumGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_reduce_fmaximumGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_reduce_fmaximumGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_reduce_fmaximumGenericAdaptor(values, attrs, Properties{}, {}) {} vector_reduce_fmaximumGenericAdaptor(RangeT values, const vector_reduce_fmaximumGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_reduce_fmaximumGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_reduce_fmaximumAdaptor : public vector_reduce_fmaximumGenericAdaptor<::mlir::ValueRange> { public: using vector_reduce_fmaximumGenericAdaptor::vector_reduce_fmaximumGenericAdaptor; vector_reduce_fmaximumAdaptor(vector_reduce_fmaximum op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_reduce_fmaximum : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultElementType> { public: using Op::Op; using Op::print; using Adaptor = vector_reduce_fmaximumAdaptor; template using GenericAdaptor = vector_reduce_fmaximumGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.reduce.fmaximum"); } std::pair 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> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fmaximum create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fmaximum create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fmaximum create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fmaximum create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fmaximum create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fmaximum create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fmaximum create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fmaximum create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_fmaximum create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_fmaximum 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 vector_reduce_fmaximum create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_reduce_fmaximum create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_fmaximum) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_reduce_fmaximumGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_reduce_fmin declarations //===----------------------------------------------------------------------===// namespace detail { class vector_reduce_fminGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_reduce_fminGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.reduce.fmin", odsAttrs.getContext()); } vector_reduce_fminGenericAdaptorBase(vector_reduce_fmin op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class vector_reduce_fminGenericAdaptor : public detail::vector_reduce_fminGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_reduce_fminGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: vector_reduce_fminGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_reduce_fminGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_reduce_fminGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_reduce_fminGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_reduce_fminGenericAdaptor(values, attrs, Properties{}, {}) {} vector_reduce_fminGenericAdaptor(RangeT values, const vector_reduce_fminGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_reduce_fminGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_reduce_fminAdaptor : public vector_reduce_fminGenericAdaptor<::mlir::ValueRange> { public: using vector_reduce_fminGenericAdaptor::vector_reduce_fminGenericAdaptor; vector_reduce_fminAdaptor(vector_reduce_fmin op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_reduce_fmin : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultElementType> { public: using Op::Op; using Op::print; using Adaptor = vector_reduce_fminAdaptor; template using GenericAdaptor = vector_reduce_fminGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.reduce.fmin"); } std::pair 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> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fmin create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fmin create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fmin create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fmin create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fmin create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fmin create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fmin create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fmin create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_fmin create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_fmin 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 vector_reduce_fmin create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_reduce_fmin create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_fmin) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_reduce_fminGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_reduce_fminimum declarations //===----------------------------------------------------------------------===// namespace detail { class vector_reduce_fminimumGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_reduce_fminimumGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.reduce.fminimum", odsAttrs.getContext()); } vector_reduce_fminimumGenericAdaptorBase(vector_reduce_fminimum op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class vector_reduce_fminimumGenericAdaptor : public detail::vector_reduce_fminimumGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_reduce_fminimumGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: vector_reduce_fminimumGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_reduce_fminimumGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_reduce_fminimumGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_reduce_fminimumGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_reduce_fminimumGenericAdaptor(values, attrs, Properties{}, {}) {} vector_reduce_fminimumGenericAdaptor(RangeT values, const vector_reduce_fminimumGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_reduce_fminimumGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_reduce_fminimumAdaptor : public vector_reduce_fminimumGenericAdaptor<::mlir::ValueRange> { public: using vector_reduce_fminimumGenericAdaptor::vector_reduce_fminimumGenericAdaptor; vector_reduce_fminimumAdaptor(vector_reduce_fminimum op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_reduce_fminimum : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultElementType> { public: using Op::Op; using Op::print; using Adaptor = vector_reduce_fminimumAdaptor; template using GenericAdaptor = vector_reduce_fminimumGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.reduce.fminimum"); } std::pair 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> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fminimum create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fminimum create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fminimum create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fminimum create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fminimum create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fminimum create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fminimum create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fminimum create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_fminimum create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_fminimum 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 vector_reduce_fminimum create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_reduce_fminimum create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::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); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_fminimum) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_reduce_fminimumGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_reduce_fmul declarations //===----------------------------------------------------------------------===// namespace detail { class vector_reduce_fmulGenericAdaptorBase { public: struct Properties { using fastmathFlagsTy = ::mlir::LLVM::FastmathFlagsAttr; fastmathFlagsTy fastmathFlags; auto getFastmathFlags() const { auto &propStorage = this->fastmathFlags; return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(propStorage); } void setFastmathFlags(const ::mlir::LLVM::FastmathFlagsAttr &propValue) { this->fastmathFlags = propValue; } bool operator==(const Properties &rhs) const { return rhs.fastmathFlags == this->fastmathFlags && true; } bool operator!=(const Properties &rhs) const { return !(*this == rhs); } }; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_reduce_fmulGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.reduce.fmul", odsAttrs.getContext()); } vector_reduce_fmulGenericAdaptorBase(vector_reduce_fmul op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr(); ::mlir::LLVM::FastmathFlags getFastmathFlags(); }; } // namespace detail template class vector_reduce_fmulGenericAdaptor : public detail::vector_reduce_fmulGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_reduce_fmulGenericAdaptorBase; static constexpr int odsIndex_start_value = 0; static constexpr int odsIndex_input = 1; public: vector_reduce_fmulGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_reduce_fmulGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_reduce_fmulGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_reduce_fmulGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_reduce_fmulGenericAdaptor(values, attrs, Properties{}, {}) {} vector_reduce_fmulGenericAdaptor(RangeT values, const vector_reduce_fmulGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_reduce_fmulGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getStartValue() { return (*getODSOperands(0).begin()); } ValueT getInput() { return (*getODSOperands(1).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_reduce_fmulAdaptor : public vector_reduce_fmulGenericAdaptor<::mlir::ValueRange> { public: using vector_reduce_fmulGenericAdaptor::vector_reduce_fmulGenericAdaptor; vector_reduce_fmulAdaptor(vector_reduce_fmul op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_reduce_fmul : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::NOperands<2>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::LLVM::FastmathFlagsInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultElementType> { public: using Op::Op; using Op::print; using Adaptor = vector_reduce_fmulAdaptor; template using GenericAdaptor = vector_reduce_fmulGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_start_value = 0; static constexpr int odsIndex_input = 1; using Properties = FoldAdaptor::Properties; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttr; using ::mlir::LLVM::FastmathFlagsInterface::Trait::getFastmathAttrName; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { static ::llvm::StringRef attrNames[] = {::llvm::StringRef("fastmathFlags")}; return ::llvm::ArrayRef(attrNames); } ::mlir::StringAttr getFastmathFlagsAttrName() { return getAttributeNameForIndex(0); } static ::mlir::StringAttr getFastmathFlagsAttrName(::mlir::OperationName name) { return getAttributeNameForIndex(name, 0); } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.reduce.fmul"); } std::pair 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::FloatType> getStartValue() { return ::llvm::cast<::mlir::TypedValue<::mlir::FloatType>>(*getODSOperands(0).begin()); } ::mlir::TypedValue<::mlir::VectorType> getInput() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(1).begin()); } ::mlir::OpOperand &getStartValueMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } ::mlir::OpOperand &getInputMutable() { auto range = getODSOperandIndexAndLength(1); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state); void writeProperties(::mlir::DialectBytecodeWriter &writer); ::mlir::LLVM::FastmathFlagsAttr getFastmathFlagsAttr() { return ::llvm::dyn_cast_or_null<::mlir::LLVM::FastmathFlagsAttr>(getProperties().fastmathFlags); } ::mlir::LLVM::FastmathFlags getFastmathFlags(); void setFastmathFlagsAttr(::mlir::LLVM::FastmathFlagsAttr attr) { getProperties().fastmathFlags = attr; } void setFastmathFlags(::mlir::LLVM::FastmathFlags attrValue); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fmul create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fmul create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fmul create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static vector_reduce_fmul create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlagsAttr fastmathFlags); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fmul create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fmul create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fmul create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static vector_reduce_fmul create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value start_value, ::mlir::Value input, ::mlir::LLVM::FastmathFlags fastmathFlags = {}); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_fmul create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_fmul 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 vector_reduce_fmul create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_reduce_fmul create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static void populateDefaultProperties(::mlir::OperationName opName, Properties &properties); ::llvm::LogicalResult verifyInvariantsImpl(); ::llvm::LogicalResult verifyInvariants(); static ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); private: ::mlir::StringAttr getAttributeNameForIndex(unsigned index) { return getAttributeNameForIndex((*this)->getName(), index); } static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) { assert(index < 1 && "invalid attribute index"); assert(name.getStringRef() == getOperationName() && "invalid operation name"); assert(name.isRegistered() && "Operation isn't registered, missing a " "dependent dialect loading?"); return name.getAttributeNames()[index]; } public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_fmul) MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::detail::vector_reduce_fmulGenericAdaptorBase::Properties) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_reduce_mul declarations //===----------------------------------------------------------------------===// namespace detail { class vector_reduce_mulGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_reduce_mulGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.reduce.mul", odsAttrs.getContext()); } vector_reduce_mulGenericAdaptorBase(vector_reduce_mul op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class vector_reduce_mulGenericAdaptor : public detail::vector_reduce_mulGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_reduce_mulGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: vector_reduce_mulGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_reduce_mulGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_reduce_mulGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_reduce_mulGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_reduce_mulGenericAdaptor(values, attrs, Properties{}, {}) {} vector_reduce_mulGenericAdaptor(RangeT values, const vector_reduce_mulGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_reduce_mulGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_reduce_mulAdaptor : public vector_reduce_mulGenericAdaptor<::mlir::ValueRange> { public: using vector_reduce_mulGenericAdaptor::vector_reduce_mulGenericAdaptor; vector_reduce_mulAdaptor(vector_reduce_mul op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_reduce_mul : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultElementType> { public: using Op::Op; using Op::print; using Adaptor = vector_reduce_mulAdaptor; template using GenericAdaptor = vector_reduce_mulGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.reduce.mul"); } std::pair 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> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 in); static vector_reduce_mul create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in); static vector_reduce_mul create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_mul create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_mul create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_mul create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_mul 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 vector_reduce_mul create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_reduce_mul 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_mul) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_reduce_or declarations //===----------------------------------------------------------------------===// namespace detail { class vector_reduce_orGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_reduce_orGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.reduce.or", odsAttrs.getContext()); } vector_reduce_orGenericAdaptorBase(vector_reduce_or op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class vector_reduce_orGenericAdaptor : public detail::vector_reduce_orGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_reduce_orGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: vector_reduce_orGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_reduce_orGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_reduce_orGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_reduce_orGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_reduce_orGenericAdaptor(values, attrs, Properties{}, {}) {} vector_reduce_orGenericAdaptor(RangeT values, const vector_reduce_orGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_reduce_orGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_reduce_orAdaptor : public vector_reduce_orGenericAdaptor<::mlir::ValueRange> { public: using vector_reduce_orGenericAdaptor::vector_reduce_orGenericAdaptor; vector_reduce_orAdaptor(vector_reduce_or op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_reduce_or : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultElementType> { public: using Op::Op; using Op::print; using Adaptor = vector_reduce_orAdaptor; template using GenericAdaptor = vector_reduce_orGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.reduce.or"); } std::pair 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> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 in); static vector_reduce_or create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in); static vector_reduce_or create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_or create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_or create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_or create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_or 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 vector_reduce_or create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_reduce_or 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_or) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_reduce_smax declarations //===----------------------------------------------------------------------===// namespace detail { class vector_reduce_smaxGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_reduce_smaxGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.reduce.smax", odsAttrs.getContext()); } vector_reduce_smaxGenericAdaptorBase(vector_reduce_smax op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class vector_reduce_smaxGenericAdaptor : public detail::vector_reduce_smaxGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_reduce_smaxGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: vector_reduce_smaxGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_reduce_smaxGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_reduce_smaxGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_reduce_smaxGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_reduce_smaxGenericAdaptor(values, attrs, Properties{}, {}) {} vector_reduce_smaxGenericAdaptor(RangeT values, const vector_reduce_smaxGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_reduce_smaxGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_reduce_smaxAdaptor : public vector_reduce_smaxGenericAdaptor<::mlir::ValueRange> { public: using vector_reduce_smaxGenericAdaptor::vector_reduce_smaxGenericAdaptor; vector_reduce_smaxAdaptor(vector_reduce_smax op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_reduce_smax : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultElementType> { public: using Op::Op; using Op::print; using Adaptor = vector_reduce_smaxAdaptor; template using GenericAdaptor = vector_reduce_smaxGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.reduce.smax"); } std::pair 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> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 in); static vector_reduce_smax create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in); static vector_reduce_smax create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_smax create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_smax create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_smax create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_smax 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 vector_reduce_smax create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_reduce_smax 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_smax) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_reduce_smin declarations //===----------------------------------------------------------------------===// namespace detail { class vector_reduce_sminGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_reduce_sminGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.reduce.smin", odsAttrs.getContext()); } vector_reduce_sminGenericAdaptorBase(vector_reduce_smin op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class vector_reduce_sminGenericAdaptor : public detail::vector_reduce_sminGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_reduce_sminGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: vector_reduce_sminGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_reduce_sminGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_reduce_sminGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_reduce_sminGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_reduce_sminGenericAdaptor(values, attrs, Properties{}, {}) {} vector_reduce_sminGenericAdaptor(RangeT values, const vector_reduce_sminGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_reduce_sminGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_reduce_sminAdaptor : public vector_reduce_sminGenericAdaptor<::mlir::ValueRange> { public: using vector_reduce_sminGenericAdaptor::vector_reduce_sminGenericAdaptor; vector_reduce_sminAdaptor(vector_reduce_smin op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_reduce_smin : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultElementType> { public: using Op::Op; using Op::print; using Adaptor = vector_reduce_sminAdaptor; template using GenericAdaptor = vector_reduce_sminGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.reduce.smin"); } std::pair 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> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 in); static vector_reduce_smin create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in); static vector_reduce_smin create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_smin create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_smin create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_smin create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_smin 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 vector_reduce_smin create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_reduce_smin 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_smin) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_reduce_umax declarations //===----------------------------------------------------------------------===// namespace detail { class vector_reduce_umaxGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_reduce_umaxGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.reduce.umax", odsAttrs.getContext()); } vector_reduce_umaxGenericAdaptorBase(vector_reduce_umax op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class vector_reduce_umaxGenericAdaptor : public detail::vector_reduce_umaxGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_reduce_umaxGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: vector_reduce_umaxGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_reduce_umaxGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_reduce_umaxGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_reduce_umaxGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_reduce_umaxGenericAdaptor(values, attrs, Properties{}, {}) {} vector_reduce_umaxGenericAdaptor(RangeT values, const vector_reduce_umaxGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_reduce_umaxGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_reduce_umaxAdaptor : public vector_reduce_umaxGenericAdaptor<::mlir::ValueRange> { public: using vector_reduce_umaxGenericAdaptor::vector_reduce_umaxGenericAdaptor; vector_reduce_umaxAdaptor(vector_reduce_umax op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_reduce_umax : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultElementType> { public: using Op::Op; using Op::print; using Adaptor = vector_reduce_umaxAdaptor; template using GenericAdaptor = vector_reduce_umaxGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.reduce.umax"); } std::pair 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> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 in); static vector_reduce_umax create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in); static vector_reduce_umax create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_umax create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_umax create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_umax create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_umax 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 vector_reduce_umax create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_reduce_umax 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_umax) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_reduce_umin declarations //===----------------------------------------------------------------------===// namespace detail { class vector_reduce_uminGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_reduce_uminGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.reduce.umin", odsAttrs.getContext()); } vector_reduce_uminGenericAdaptorBase(vector_reduce_umin op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class vector_reduce_uminGenericAdaptor : public detail::vector_reduce_uminGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_reduce_uminGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: vector_reduce_uminGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_reduce_uminGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_reduce_uminGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_reduce_uminGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_reduce_uminGenericAdaptor(values, attrs, Properties{}, {}) {} vector_reduce_uminGenericAdaptor(RangeT values, const vector_reduce_uminGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_reduce_uminGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_reduce_uminAdaptor : public vector_reduce_uminGenericAdaptor<::mlir::ValueRange> { public: using vector_reduce_uminGenericAdaptor::vector_reduce_uminGenericAdaptor; vector_reduce_uminAdaptor(vector_reduce_umin op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_reduce_umin : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultElementType> { public: using Op::Op; using Op::print; using Adaptor = vector_reduce_uminAdaptor; template using GenericAdaptor = vector_reduce_uminGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.reduce.umin"); } std::pair 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> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 in); static vector_reduce_umin create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in); static vector_reduce_umin create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_umin create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_umin create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_umin create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_umin 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 vector_reduce_umin create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_reduce_umin 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_umin) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vector_reduce_xor declarations //===----------------------------------------------------------------------===// namespace detail { class vector_reduce_xorGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vector_reduce_xorGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vector.reduce.xor", odsAttrs.getContext()); } vector_reduce_xorGenericAdaptorBase(vector_reduce_xor op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class vector_reduce_xorGenericAdaptor : public detail::vector_reduce_xorGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vector_reduce_xorGenericAdaptorBase; static constexpr int odsIndex_in = 0; public: vector_reduce_xorGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vector_reduce_xorGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vector_reduce_xorGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vector_reduce_xorGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vector_reduce_xorGenericAdaptor(values, attrs, Properties{}, {}) {} vector_reduce_xorGenericAdaptor(RangeT values, const vector_reduce_xorGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vector_reduce_xorGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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 getIn() { return (*getODSOperands(0).begin()); } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vector_reduce_xorAdaptor : public vector_reduce_xorGenericAdaptor<::mlir::ValueRange> { public: using vector_reduce_xorGenericAdaptor::vector_reduce_xorGenericAdaptor; vector_reduce_xorAdaptor(vector_reduce_xor op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vector_reduce_xor : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::OpTrait::SameOperandsAndResultElementType> { public: using Op::Op; using Op::print; using Adaptor = vector_reduce_xorAdaptor; template using GenericAdaptor = vector_reduce_xorGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; static constexpr int odsIndex_in = 0; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vector.reduce.xor"); } std::pair 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> getIn() { return ::llvm::cast<::mlir::TypedValue<::mlir::VectorType>>(*getODSOperands(0).begin()); } ::mlir::OpOperand &getInMutable() { auto range = getODSOperandIndexAndLength(0); return getOperation()->getOpOperand(range.first); } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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 in); static vector_reduce_xor create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value in); static vector_reduce_xor create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value in); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_xor create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value in); static vector_reduce_xor create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value in); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_xor create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vector_reduce_xor 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 vector_reduce_xor create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vector_reduce_xor 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vector_reduce_xor) namespace mlir::LLVM { //===----------------------------------------------------------------------===// // ::mlir::LLVM::vscale declarations //===----------------------------------------------------------------------===// namespace detail { class vscaleGenericAdaptorBase { public: using Properties = ::mlir::EmptyProperties; protected: ::mlir::DictionaryAttr odsAttrs; ::std::optional<::mlir::OperationName> odsOpName; Properties properties; ::mlir::RegionRange odsRegions; public: vscaleGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs) odsOpName.emplace("llvm.intr.vscale", odsAttrs.getContext()); } vscaleGenericAdaptorBase(vscale op); std::pair getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) { return {index, 1}; } const Properties &getProperties() { return properties; } ::mlir::DictionaryAttr getAttributes() { return odsAttrs; } }; } // namespace detail template class vscaleGenericAdaptor : public detail::vscaleGenericAdaptorBase { using ValueT = ::llvm::detail::ValueOfRange; using Base = detail::vscaleGenericAdaptorBase; public: vscaleGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {} vscaleGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : vscaleGenericAdaptor(values, attrs, (properties ? *properties.as() : Properties{}), regions) {} vscaleGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : vscaleGenericAdaptor(values, attrs, Properties{}, {}) {} vscaleGenericAdaptor(RangeT values, const vscaleGenericAdaptorBase &base) : Base(base), odsOperands(values) {} template >> vscaleGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {} std::pair 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)}; } RangeT getOperands() { return odsOperands; } private: RangeT odsOperands; }; class vscaleAdaptor : public vscaleGenericAdaptor<::mlir::ValueRange> { public: using vscaleGenericAdaptor::vscaleGenericAdaptor; vscaleAdaptor(vscale op); ::llvm::LogicalResult verify(::mlir::Location loc); }; class vscale : public ::mlir::Op::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants> { public: using Op::Op; using Op::print; using Adaptor = vscaleAdaptor; template using GenericAdaptor = vscaleGenericAdaptor; using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>; using Properties = FoldAdaptor::Properties; static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() { return {}; } static constexpr ::llvm::StringLiteral getOperationName() { return ::llvm::StringLiteral("llvm.intr.vscale"); } std::pair 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)}; } std::pair 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::Type> getRes() { return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(*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 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); static vscale create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res); static vscale create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res); static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes); static vscale create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes); static vscale create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes); static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vscale create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {}); static vscale 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 vscale create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {}); static vscale 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 ::llvm::LogicalResult setPropertiesFromParsedAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError); public: }; } // namespace mlir::LLVM MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::LLVM::vscale) #endif // GET_OP_CLASSES