/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|*                                                                            *|
|* Op Definitions                                                             *|
|*                                                                            *|
|* Automatically generated file, do not edit!                                 *|
|* From: VectorTransformOps.td                                                *|
|*                                                                            *|
\*===----------------------------------------------------------------------===*/

#ifdef GET_OP_LIST
#undef GET_OP_LIST

::mlir::transform::ApplyCastAwayVectorLeadingOneDimPatternsOp,
::mlir::transform::ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp,
::mlir::transform::ApplyDropUnitDimWithShapeCastPatternsOp,
::mlir::transform::ApplyFlattenVectorTransferOpsPatternsOp,
::mlir::transform::ApplyFoldArithExtensionPatternsOp,
::mlir::transform::ApplyFoldElementwiseToVectorPatternsOp,
::mlir::transform::ApplyInterleaveAndDeinterleaveToShufflePatternsOp,
::mlir::transform::ApplyLowerBitCastPatternsOp,
::mlir::transform::ApplyLowerBroadcastPatternsOp,
::mlir::transform::ApplyLowerContractionPatternsOp,
::mlir::transform::ApplyLowerCreateMaskPatternsOp,
::mlir::transform::ApplyLowerGatherPatternsOp,
::mlir::transform::ApplyLowerInterleavePatternsOp,
::mlir::transform::ApplyLowerMaskedTransfersPatternsOp,
::mlir::transform::ApplyLowerMasksPatternsOp,
::mlir::transform::ApplyLowerOuterProductPatternsOp,
::mlir::transform::ApplyLowerScanPatternsOp,
::mlir::transform::ApplyLowerShapeCastPatternsOp,
::mlir::transform::ApplyLowerStepPatternsOp,
::mlir::transform::ApplyLowerTransferPatternsOp,
::mlir::transform::ApplyLowerTransposePatternsOp,
::mlir::transform::ApplyMaterializeMasksPatternsOp,
::mlir::transform::ApplyMultiReductionFlatteningPatternsOp,
::mlir::transform::ApplyMultiReductionUnrollingPatternsOp,
::mlir::transform::ApplyRankReducingSubviewPatternsOp,
::mlir::transform::ApplyReorderMultiReductionPatternsOp,
::mlir::transform::ApplyRewriteNarrowTypePatternsOp,
::mlir::transform::ApplySinkVectorMemPatternsOp,
::mlir::transform::ApplySinkVectorPatternsOp,
::mlir::transform::ApplySplitTransferFullPartialPatternsOp,
::mlir::transform::ApplyTransferPermutationPatternsOp,
::mlir::transform::ApplyTransferToScfPatternsOp,
::mlir::transform::ApplyUnrollFromElementsPatternsOp,
::mlir::transform::ApplyUnrollToElementsPatternsOp,
::mlir::transform::ApplyVectorReductionToContractPatternsOp,
::mlir::transform::ApplyVectorToLLVMConversionPatternsOp
#endif // GET_OP_LIST

#ifdef GET_OP_CLASSES
#undef GET_OP_CLASSES


//===----------------------------------------------------------------------===//
// Local Utility Method Definitions
//===----------------------------------------------------------------------===//


static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_VectorTransformOps1(
    ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  if (attr && !(((::llvm::isa<::mlir::IntegerAttr>(attr))) && ((::llvm::cast<::mlir::IntegerAttr>(attr).getType().isUnsignedInteger(32)))))
    return emitError() << "attribute '" << attrName
        << "' failed to satisfy constraint: 32-bit unsigned integer attribute";
  return ::mlir::success();
}
static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_VectorTransformOps1(
    ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
  return __mlir_ods_local_attr_constraint_VectorTransformOps1(attr, attrName, [op]() {
    return op->emitOpError();
  });
}

static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_VectorTransformOps2(
    ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  if (attr && !((::llvm::isa<::mlir::vector::VectorContractLoweringAttr>(attr))))
    return emitError() << "attribute '" << attrName
        << "' failed to satisfy constraint: control the lowering of `vector.contract` operations.";
  return ::mlir::success();
}
static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_VectorTransformOps2(
    ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
  return __mlir_ods_local_attr_constraint_VectorTransformOps2(attr, attrName, [op]() {
    return op->emitOpError();
  });
}

static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_VectorTransformOps3(
    ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  if (attr && !(((::llvm::isa<::mlir::IntegerAttr>(attr))) && ((::llvm::cast<::mlir::IntegerAttr>(attr).getType().isSignlessInteger(64)))))
    return emitError() << "attribute '" << attrName
        << "' failed to satisfy constraint: 64-bit signless integer attribute";
  return ::mlir::success();
}
static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_VectorTransformOps3(
    ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
  return __mlir_ods_local_attr_constraint_VectorTransformOps3(attr, attrName, [op]() {
    return op->emitOpError();
  });
}

static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_VectorTransformOps4(
    ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  if (attr && !((::llvm::isa<::mlir::vector::VectorTransposeLoweringAttr>(attr))))
    return emitError() << "attribute '" << attrName
        << "' failed to satisfy constraint: control the lowering of `vector.transpose` operations.";
  return ::mlir::success();
}
static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_VectorTransformOps4(
    ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
  return __mlir_ods_local_attr_constraint_VectorTransformOps4(attr, attrName, [op]() {
    return op->emitOpError();
  });
}

static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_VectorTransformOps5(
    ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  if (attr && !((::llvm::isa<::mlir::BoolAttr>(attr))))
    return emitError() << "attribute '" << attrName
        << "' failed to satisfy constraint: bool attribute";
  return ::mlir::success();
}
static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_VectorTransformOps5(
    ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
  return __mlir_ods_local_attr_constraint_VectorTransformOps5(attr, attrName, [op]() {
    return op->emitOpError();
  });
}

static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_VectorTransformOps6(
    ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  if (attr && !((::llvm::isa<::mlir::vector::VectorMultiReductionLoweringAttr>(attr))))
    return emitError() << "attribute '" << attrName
        << "' failed to satisfy constraint: control the lowering of `vector.multi_reduction`.";
  return ::mlir::success();
}
static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_VectorTransformOps6(
    ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
  return __mlir_ods_local_attr_constraint_VectorTransformOps6(attr, attrName, [op]() {
    return op->emitOpError();
  });
}

static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_VectorTransformOps7(
    ::mlir::Attribute attr, ::llvm::StringRef attrName, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  if (attr && !((::llvm::isa<::mlir::vector::VectorTransferSplitAttr>(attr))))
    return emitError() << "attribute '" << attrName
        << "' failed to satisfy constraint: control the splitting of `vector.transfer` operations into in-bounds and out-of-bounds variants.";
  return ::mlir::success();
}
static ::llvm::LogicalResult __mlir_ods_local_attr_constraint_VectorTransformOps7(
    ::mlir::Operation *op, ::mlir::Attribute attr, ::llvm::StringRef attrName) {
  return __mlir_ods_local_attr_constraint_VectorTransformOps7(attr, attrName, [op]() {
    return op->emitOpError();
  });
}
namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyCastAwayVectorLeadingOneDimPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyCastAwayVectorLeadingOneDimPatternsOpGenericAdaptorBase::ApplyCastAwayVectorLeadingOneDimPatternsOpGenericAdaptorBase(ApplyCastAwayVectorLeadingOneDimPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyCastAwayVectorLeadingOneDimPatternsOpAdaptor::ApplyCastAwayVectorLeadingOneDimPatternsOpAdaptor(ApplyCastAwayVectorLeadingOneDimPatternsOp op) : ApplyCastAwayVectorLeadingOneDimPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyCastAwayVectorLeadingOneDimPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyCastAwayVectorLeadingOneDimPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyCastAwayVectorLeadingOneDimPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyCastAwayVectorLeadingOneDimPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyCastAwayVectorLeadingOneDimPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyCastAwayVectorLeadingOneDimPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyCastAwayVectorLeadingOneDimPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyCastAwayVectorLeadingOneDimPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyCastAwayVectorLeadingOneDimPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyCastAwayVectorLeadingOneDimPatternsOp ApplyCastAwayVectorLeadingOneDimPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyCastAwayVectorLeadingOneDimPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyCastAwayVectorLeadingOneDimPatternsOp ApplyCastAwayVectorLeadingOneDimPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyCastAwayVectorLeadingOneDimPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyCastAwayVectorLeadingOneDimPatternsOp ApplyCastAwayVectorLeadingOneDimPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyCastAwayVectorLeadingOneDimPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyCastAwayVectorLeadingOneDimPatternsOp ApplyCastAwayVectorLeadingOneDimPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyCastAwayVectorLeadingOneDimPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyCastAwayVectorLeadingOneDimPatternsOp ApplyCastAwayVectorLeadingOneDimPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyCastAwayVectorLeadingOneDimPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyCastAwayVectorLeadingOneDimPatternsOp ApplyCastAwayVectorLeadingOneDimPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyCastAwayVectorLeadingOneDimPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyCastAwayVectorLeadingOneDimPatternsOp ApplyCastAwayVectorLeadingOneDimPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyCastAwayVectorLeadingOneDimPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyCastAwayVectorLeadingOneDimPatternsOp ApplyCastAwayVectorLeadingOneDimPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyCastAwayVectorLeadingOneDimPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyCastAwayVectorLeadingOneDimPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyCastAwayVectorLeadingOneDimPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyCastAwayVectorLeadingOneDimPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyCastAwayVectorLeadingOneDimPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyDropInnerMostUnitDimsFromXferOpsPatternsOpGenericAdaptorBase::ApplyDropInnerMostUnitDimsFromXferOpsPatternsOpGenericAdaptorBase(ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyDropInnerMostUnitDimsFromXferOpsPatternsOpAdaptor::ApplyDropInnerMostUnitDimsFromXferOpsPatternsOpAdaptor(ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp op) : ApplyDropInnerMostUnitDimsFromXferOpsPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyDropInnerMostUnitDimsFromXferOpsPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyDropInnerMostUnitDimsFromXferOpsPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyDropUnitDimWithShapeCastPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyDropUnitDimWithShapeCastPatternsOpGenericAdaptorBase::ApplyDropUnitDimWithShapeCastPatternsOpGenericAdaptorBase(ApplyDropUnitDimWithShapeCastPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyDropUnitDimWithShapeCastPatternsOpAdaptor::ApplyDropUnitDimWithShapeCastPatternsOpAdaptor(ApplyDropUnitDimWithShapeCastPatternsOp op) : ApplyDropUnitDimWithShapeCastPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyDropUnitDimWithShapeCastPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyDropUnitDimWithShapeCastPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyDropUnitDimWithShapeCastPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyDropUnitDimWithShapeCastPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyDropUnitDimWithShapeCastPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyDropUnitDimWithShapeCastPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyDropUnitDimWithShapeCastPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyDropUnitDimWithShapeCastPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyDropUnitDimWithShapeCastPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyDropUnitDimWithShapeCastPatternsOp ApplyDropUnitDimWithShapeCastPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyDropUnitDimWithShapeCastPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyDropUnitDimWithShapeCastPatternsOp ApplyDropUnitDimWithShapeCastPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyDropUnitDimWithShapeCastPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyDropUnitDimWithShapeCastPatternsOp ApplyDropUnitDimWithShapeCastPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyDropUnitDimWithShapeCastPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyDropUnitDimWithShapeCastPatternsOp ApplyDropUnitDimWithShapeCastPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyDropUnitDimWithShapeCastPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyDropUnitDimWithShapeCastPatternsOp ApplyDropUnitDimWithShapeCastPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyDropUnitDimWithShapeCastPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyDropUnitDimWithShapeCastPatternsOp ApplyDropUnitDimWithShapeCastPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyDropUnitDimWithShapeCastPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyDropUnitDimWithShapeCastPatternsOp ApplyDropUnitDimWithShapeCastPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyDropUnitDimWithShapeCastPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyDropUnitDimWithShapeCastPatternsOp ApplyDropUnitDimWithShapeCastPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyDropUnitDimWithShapeCastPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyDropUnitDimWithShapeCastPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyDropUnitDimWithShapeCastPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyDropUnitDimWithShapeCastPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyDropUnitDimWithShapeCastPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyFlattenVectorTransferOpsPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyFlattenVectorTransferOpsPatternsOpGenericAdaptorBase::ApplyFlattenVectorTransferOpsPatternsOpGenericAdaptorBase(ApplyFlattenVectorTransferOpsPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr ApplyFlattenVectorTransferOpsPatternsOpGenericAdaptorBase::getTargetVectorBitwidthAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().target_vector_bitwidth);
  return attr;
}

uint32_t ApplyFlattenVectorTransferOpsPatternsOpGenericAdaptorBase::getTargetVectorBitwidth() {
  auto attr = getTargetVectorBitwidthAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
ApplyFlattenVectorTransferOpsPatternsOpAdaptor::ApplyFlattenVectorTransferOpsPatternsOpAdaptor(ApplyFlattenVectorTransferOpsPatternsOp op) : ApplyFlattenVectorTransferOpsPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyFlattenVectorTransferOpsPatternsOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_target_vector_bitwidth = getProperties().target_vector_bitwidth; (void)tblgen_target_vector_bitwidth;

  if (tblgen_target_vector_bitwidth && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_target_vector_bitwidth))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_target_vector_bitwidth).getType().isUnsignedInteger(32)))))
    return emitError(loc, "'transform.apply_patterns.vector.flatten_vector_transfer_ops' op attribute 'target_vector_bitwidth' failed to satisfy constraint: 32-bit unsigned integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult ApplyFlattenVectorTransferOpsPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.target_vector_bitwidth;
       auto attr = dict.get("target_vector_bitwidth");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `target_vector_bitwidth` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ApplyFlattenVectorTransferOpsPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.target_vector_bitwidth;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("target_vector_bitwidth",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyFlattenVectorTransferOpsPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.target_vector_bitwidth.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ApplyFlattenVectorTransferOpsPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "target_vector_bitwidth")
      return prop.target_vector_bitwidth;
  return std::nullopt;
}

void ApplyFlattenVectorTransferOpsPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "target_vector_bitwidth") {
       prop.target_vector_bitwidth = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.target_vector_bitwidth)>>(value);
       return;
    }
}

void ApplyFlattenVectorTransferOpsPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.target_vector_bitwidth) attrs.append("target_vector_bitwidth", prop.target_vector_bitwidth);
}

::llvm::LogicalResult ApplyFlattenVectorTransferOpsPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getTargetVectorBitwidthAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps1(attr, "target_vector_bitwidth", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ApplyFlattenVectorTransferOpsPatternsOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.target_vector_bitwidth)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ApplyFlattenVectorTransferOpsPatternsOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.target_vector_bitwidth);
}

uint32_t ApplyFlattenVectorTransferOpsPatternsOp::getTargetVectorBitwidth() {
  auto attr = getTargetVectorBitwidthAttr();
  return attr.getValue().getZExtValue();
}

void ApplyFlattenVectorTransferOpsPatternsOp::setTargetVectorBitwidth(uint32_t attrValue) {
  getProperties().target_vector_bitwidth = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(32, /*isSigned=*/false), attrValue);
}

void ApplyFlattenVectorTransferOpsPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr target_vector_bitwidth) {
  if (target_vector_bitwidth) {
    odsState.getOrAddProperties<Properties>().target_vector_bitwidth = target_vector_bitwidth;
  }
}

ApplyFlattenVectorTransferOpsPatternsOp ApplyFlattenVectorTransferOpsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr target_vector_bitwidth) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(target_vector_bitwidth)>(target_vector_bitwidth));
  auto __res__ = ::llvm::dyn_cast<ApplyFlattenVectorTransferOpsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyFlattenVectorTransferOpsPatternsOp ApplyFlattenVectorTransferOpsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr target_vector_bitwidth) {
  return create(builder, builder.getLoc(), std::forward<decltype(target_vector_bitwidth)>(target_vector_bitwidth));
}

void ApplyFlattenVectorTransferOpsPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr target_vector_bitwidth) {
  if (target_vector_bitwidth) {
    odsState.getOrAddProperties<Properties>().target_vector_bitwidth = target_vector_bitwidth;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyFlattenVectorTransferOpsPatternsOp ApplyFlattenVectorTransferOpsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr target_vector_bitwidth) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(target_vector_bitwidth)>(target_vector_bitwidth));
  auto __res__ = ::llvm::dyn_cast<ApplyFlattenVectorTransferOpsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyFlattenVectorTransferOpsPatternsOp ApplyFlattenVectorTransferOpsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr target_vector_bitwidth) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(target_vector_bitwidth)>(target_vector_bitwidth));
}

void ApplyFlattenVectorTransferOpsPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint32_t target_vector_bitwidth) {
  odsState.getOrAddProperties<Properties>().target_vector_bitwidth = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32, /*isSigned=*/false), target_vector_bitwidth);
}

ApplyFlattenVectorTransferOpsPatternsOp ApplyFlattenVectorTransferOpsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint32_t target_vector_bitwidth) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(target_vector_bitwidth)>(target_vector_bitwidth));
  auto __res__ = ::llvm::dyn_cast<ApplyFlattenVectorTransferOpsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyFlattenVectorTransferOpsPatternsOp ApplyFlattenVectorTransferOpsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, uint32_t target_vector_bitwidth) {
  return create(builder, builder.getLoc(), std::forward<decltype(target_vector_bitwidth)>(target_vector_bitwidth));
}

void ApplyFlattenVectorTransferOpsPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint32_t target_vector_bitwidth) {
  odsState.getOrAddProperties<Properties>().target_vector_bitwidth = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32, /*isSigned=*/false), target_vector_bitwidth);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyFlattenVectorTransferOpsPatternsOp ApplyFlattenVectorTransferOpsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint32_t target_vector_bitwidth) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(target_vector_bitwidth)>(target_vector_bitwidth));
  auto __res__ = ::llvm::dyn_cast<ApplyFlattenVectorTransferOpsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyFlattenVectorTransferOpsPatternsOp ApplyFlattenVectorTransferOpsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint32_t target_vector_bitwidth) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(target_vector_bitwidth)>(target_vector_bitwidth));
}

void ApplyFlattenVectorTransferOpsPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    (void)odsState.getOrAddProperties<ApplyFlattenVectorTransferOpsPatternsOp::Properties>();
    ::mlir::PropertyRef properties = odsState.getRawProperties();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ApplyFlattenVectorTransferOpsPatternsOp ApplyFlattenVectorTransferOpsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyFlattenVectorTransferOpsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyFlattenVectorTransferOpsPatternsOp ApplyFlattenVectorTransferOpsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyFlattenVectorTransferOpsPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyFlattenVectorTransferOpsPatternsOp ApplyFlattenVectorTransferOpsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyFlattenVectorTransferOpsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyFlattenVectorTransferOpsPatternsOp ApplyFlattenVectorTransferOpsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

void ApplyFlattenVectorTransferOpsPatternsOp::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.target_vector_bitwidth)
    properties.target_vector_bitwidth = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32, /*isSigned=*/false), std::numeric_limits<unsigned>::max());
}

::llvm::LogicalResult ApplyFlattenVectorTransferOpsPatternsOp::verifyInvariantsImpl() {
  auto tblgen_target_vector_bitwidth = getProperties().target_vector_bitwidth; (void)tblgen_target_vector_bitwidth;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps1(*this, tblgen_target_vector_bitwidth, "target_vector_bitwidth")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult ApplyFlattenVectorTransferOpsPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyFlattenVectorTransferOpsPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr target_vector_bitwidthAttr;
  if (::mlir::succeeded(parser.parseOptionalKeyword("target_vector_bitwidth"))) {
  if (parser.parseEqual())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(target_vector_bitwidthAttr, parser.getBuilder().getIntegerType(32, /*isSigned=*/false))) {
    return ::mlir::failure();
  }
  if (target_vector_bitwidthAttr) result.getOrAddProperties<ApplyFlattenVectorTransferOpsPatternsOp::Properties>().target_vector_bitwidth = target_vector_bitwidthAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyFlattenVectorTransferOpsPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getTargetVectorBitwidthAttr() != ::mlir::OpBuilder((*this)->getContext()).getIntegerAttr(::mlir::OpBuilder((*this)->getContext()).getIntegerType(32, /*isSigned=*/false), std::numeric_limits<unsigned>::max())) {
    _odsPrinter << ' ' << "target_vector_bitwidth";
    _odsPrinter << ' ' << "=";
    _odsPrinter << ' ';
    _odsPrinter.printAttributeWithoutType(getTargetVectorBitwidthAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("target_vector_bitwidth");
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getTargetVectorBitwidthAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(32, /*isSigned=*/false), std::numeric_limits<unsigned>::max())))
       elidedAttrs.push_back("target_vector_bitwidth");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyFlattenVectorTransferOpsPatternsOp)
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::detail::ApplyFlattenVectorTransferOpsPatternsOpGenericAdaptorBase::Properties)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyFoldArithExtensionPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyFoldArithExtensionPatternsOpGenericAdaptorBase::ApplyFoldArithExtensionPatternsOpGenericAdaptorBase(ApplyFoldArithExtensionPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyFoldArithExtensionPatternsOpAdaptor::ApplyFoldArithExtensionPatternsOpAdaptor(ApplyFoldArithExtensionPatternsOp op) : ApplyFoldArithExtensionPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyFoldArithExtensionPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyFoldArithExtensionPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyFoldArithExtensionPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyFoldArithExtensionPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyFoldArithExtensionPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyFoldArithExtensionPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyFoldArithExtensionPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyFoldArithExtensionPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyFoldArithExtensionPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyFoldArithExtensionPatternsOp ApplyFoldArithExtensionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyFoldArithExtensionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyFoldArithExtensionPatternsOp ApplyFoldArithExtensionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyFoldArithExtensionPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyFoldArithExtensionPatternsOp ApplyFoldArithExtensionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyFoldArithExtensionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyFoldArithExtensionPatternsOp ApplyFoldArithExtensionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyFoldArithExtensionPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyFoldArithExtensionPatternsOp ApplyFoldArithExtensionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyFoldArithExtensionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyFoldArithExtensionPatternsOp ApplyFoldArithExtensionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyFoldArithExtensionPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyFoldArithExtensionPatternsOp ApplyFoldArithExtensionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyFoldArithExtensionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyFoldArithExtensionPatternsOp ApplyFoldArithExtensionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyFoldArithExtensionPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyFoldArithExtensionPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyFoldArithExtensionPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyFoldArithExtensionPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyFoldArithExtensionPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyFoldElementwiseToVectorPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyFoldElementwiseToVectorPatternsOpGenericAdaptorBase::ApplyFoldElementwiseToVectorPatternsOpGenericAdaptorBase(ApplyFoldElementwiseToVectorPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyFoldElementwiseToVectorPatternsOpAdaptor::ApplyFoldElementwiseToVectorPatternsOpAdaptor(ApplyFoldElementwiseToVectorPatternsOp op) : ApplyFoldElementwiseToVectorPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyFoldElementwiseToVectorPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyFoldElementwiseToVectorPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyFoldElementwiseToVectorPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyFoldElementwiseToVectorPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyFoldElementwiseToVectorPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyFoldElementwiseToVectorPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyFoldElementwiseToVectorPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyFoldElementwiseToVectorPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyFoldElementwiseToVectorPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyFoldElementwiseToVectorPatternsOp ApplyFoldElementwiseToVectorPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyFoldElementwiseToVectorPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyFoldElementwiseToVectorPatternsOp ApplyFoldElementwiseToVectorPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyFoldElementwiseToVectorPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyFoldElementwiseToVectorPatternsOp ApplyFoldElementwiseToVectorPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyFoldElementwiseToVectorPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyFoldElementwiseToVectorPatternsOp ApplyFoldElementwiseToVectorPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyFoldElementwiseToVectorPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyFoldElementwiseToVectorPatternsOp ApplyFoldElementwiseToVectorPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyFoldElementwiseToVectorPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyFoldElementwiseToVectorPatternsOp ApplyFoldElementwiseToVectorPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyFoldElementwiseToVectorPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyFoldElementwiseToVectorPatternsOp ApplyFoldElementwiseToVectorPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyFoldElementwiseToVectorPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyFoldElementwiseToVectorPatternsOp ApplyFoldElementwiseToVectorPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyFoldElementwiseToVectorPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyFoldElementwiseToVectorPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyFoldElementwiseToVectorPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyFoldElementwiseToVectorPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyFoldElementwiseToVectorPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyInterleaveAndDeinterleaveToShufflePatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyInterleaveAndDeinterleaveToShufflePatternsOpGenericAdaptorBase::ApplyInterleaveAndDeinterleaveToShufflePatternsOpGenericAdaptorBase(ApplyInterleaveAndDeinterleaveToShufflePatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyInterleaveAndDeinterleaveToShufflePatternsOpAdaptor::ApplyInterleaveAndDeinterleaveToShufflePatternsOpAdaptor(ApplyInterleaveAndDeinterleaveToShufflePatternsOp op) : ApplyInterleaveAndDeinterleaveToShufflePatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyInterleaveAndDeinterleaveToShufflePatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyInterleaveAndDeinterleaveToShufflePatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyInterleaveAndDeinterleaveToShufflePatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyInterleaveAndDeinterleaveToShufflePatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyInterleaveAndDeinterleaveToShufflePatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyInterleaveAndDeinterleaveToShufflePatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyInterleaveAndDeinterleaveToShufflePatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyInterleaveAndDeinterleaveToShufflePatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyInterleaveAndDeinterleaveToShufflePatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyInterleaveAndDeinterleaveToShufflePatternsOp ApplyInterleaveAndDeinterleaveToShufflePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyInterleaveAndDeinterleaveToShufflePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyInterleaveAndDeinterleaveToShufflePatternsOp ApplyInterleaveAndDeinterleaveToShufflePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyInterleaveAndDeinterleaveToShufflePatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyInterleaveAndDeinterleaveToShufflePatternsOp ApplyInterleaveAndDeinterleaveToShufflePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyInterleaveAndDeinterleaveToShufflePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyInterleaveAndDeinterleaveToShufflePatternsOp ApplyInterleaveAndDeinterleaveToShufflePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyInterleaveAndDeinterleaveToShufflePatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyInterleaveAndDeinterleaveToShufflePatternsOp ApplyInterleaveAndDeinterleaveToShufflePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyInterleaveAndDeinterleaveToShufflePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyInterleaveAndDeinterleaveToShufflePatternsOp ApplyInterleaveAndDeinterleaveToShufflePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyInterleaveAndDeinterleaveToShufflePatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyInterleaveAndDeinterleaveToShufflePatternsOp ApplyInterleaveAndDeinterleaveToShufflePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyInterleaveAndDeinterleaveToShufflePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyInterleaveAndDeinterleaveToShufflePatternsOp ApplyInterleaveAndDeinterleaveToShufflePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyInterleaveAndDeinterleaveToShufflePatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyInterleaveAndDeinterleaveToShufflePatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyInterleaveAndDeinterleaveToShufflePatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyInterleaveAndDeinterleaveToShufflePatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyInterleaveAndDeinterleaveToShufflePatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyLowerBitCastPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyLowerBitCastPatternsOpGenericAdaptorBase::ApplyLowerBitCastPatternsOpGenericAdaptorBase(ApplyLowerBitCastPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyLowerBitCastPatternsOpAdaptor::ApplyLowerBitCastPatternsOpAdaptor(ApplyLowerBitCastPatternsOp op) : ApplyLowerBitCastPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyLowerBitCastPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerBitCastPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyLowerBitCastPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyLowerBitCastPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyLowerBitCastPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyLowerBitCastPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyLowerBitCastPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyLowerBitCastPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyLowerBitCastPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyLowerBitCastPatternsOp ApplyLowerBitCastPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyLowerBitCastPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerBitCastPatternsOp ApplyLowerBitCastPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyLowerBitCastPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerBitCastPatternsOp ApplyLowerBitCastPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerBitCastPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerBitCastPatternsOp ApplyLowerBitCastPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyLowerBitCastPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerBitCastPatternsOp ApplyLowerBitCastPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerBitCastPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerBitCastPatternsOp ApplyLowerBitCastPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyLowerBitCastPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerBitCastPatternsOp ApplyLowerBitCastPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerBitCastPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerBitCastPatternsOp ApplyLowerBitCastPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyLowerBitCastPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerBitCastPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyLowerBitCastPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyLowerBitCastPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyLowerBitCastPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyLowerBroadcastPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyLowerBroadcastPatternsOpGenericAdaptorBase::ApplyLowerBroadcastPatternsOpGenericAdaptorBase(ApplyLowerBroadcastPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyLowerBroadcastPatternsOpAdaptor::ApplyLowerBroadcastPatternsOpAdaptor(ApplyLowerBroadcastPatternsOp op) : ApplyLowerBroadcastPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyLowerBroadcastPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerBroadcastPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyLowerBroadcastPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyLowerBroadcastPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyLowerBroadcastPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyLowerBroadcastPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyLowerBroadcastPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyLowerBroadcastPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyLowerBroadcastPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyLowerBroadcastPatternsOp ApplyLowerBroadcastPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyLowerBroadcastPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerBroadcastPatternsOp ApplyLowerBroadcastPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyLowerBroadcastPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerBroadcastPatternsOp ApplyLowerBroadcastPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerBroadcastPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerBroadcastPatternsOp ApplyLowerBroadcastPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyLowerBroadcastPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerBroadcastPatternsOp ApplyLowerBroadcastPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerBroadcastPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerBroadcastPatternsOp ApplyLowerBroadcastPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyLowerBroadcastPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerBroadcastPatternsOp ApplyLowerBroadcastPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerBroadcastPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerBroadcastPatternsOp ApplyLowerBroadcastPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyLowerBroadcastPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerBroadcastPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyLowerBroadcastPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyLowerBroadcastPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyLowerBroadcastPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyLowerContractionPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyLowerContractionPatternsOpGenericAdaptorBase::ApplyLowerContractionPatternsOpGenericAdaptorBase(ApplyLowerContractionPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::vector::VectorContractLoweringAttr ApplyLowerContractionPatternsOpGenericAdaptorBase::getLoweringStrategyAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::vector::VectorContractLoweringAttr>(getProperties().lowering_strategy);
  return attr;
}

::mlir::vector::VectorContractLowering ApplyLowerContractionPatternsOpGenericAdaptorBase::getLoweringStrategy() {
  auto attr = getLoweringStrategyAttr();
  return attr.getValue();
}


} // namespace detail
ApplyLowerContractionPatternsOpAdaptor::ApplyLowerContractionPatternsOpAdaptor(ApplyLowerContractionPatternsOp op) : ApplyLowerContractionPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyLowerContractionPatternsOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_lowering_strategy = getProperties().lowering_strategy; (void)tblgen_lowering_strategy;

  if (tblgen_lowering_strategy && !((::llvm::isa<::mlir::vector::VectorContractLoweringAttr>(tblgen_lowering_strategy))))
    return emitError(loc, "'transform.apply_patterns.vector.lower_contraction' op attribute 'lowering_strategy' failed to satisfy constraint: control the lowering of `vector.contract` operations.");
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerContractionPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.lowering_strategy;
       auto attr = dict.get("lowering_strategy");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `lowering_strategy` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ApplyLowerContractionPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.lowering_strategy;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("lowering_strategy",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyLowerContractionPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.lowering_strategy.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ApplyLowerContractionPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "lowering_strategy")
      return prop.lowering_strategy;
  return std::nullopt;
}

void ApplyLowerContractionPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "lowering_strategy") {
       prop.lowering_strategy = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.lowering_strategy)>>(value);
       return;
    }
}

void ApplyLowerContractionPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.lowering_strategy) attrs.append("lowering_strategy", prop.lowering_strategy);
}

::llvm::LogicalResult ApplyLowerContractionPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getLoweringStrategyAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps2(attr, "lowering_strategy", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerContractionPatternsOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.lowering_strategy)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ApplyLowerContractionPatternsOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.lowering_strategy);
}

::mlir::vector::VectorContractLowering ApplyLowerContractionPatternsOp::getLoweringStrategy() {
  auto attr = getLoweringStrategyAttr();
  return attr.getValue();
}

void ApplyLowerContractionPatternsOp::setLoweringStrategy(::mlir::vector::VectorContractLowering attrValue) {
  getProperties().lowering_strategy = ::mlir::vector::VectorContractLoweringAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue);
}

void ApplyLowerContractionPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::vector::VectorContractLoweringAttr lowering_strategy) {
  if (lowering_strategy) {
    odsState.getOrAddProperties<Properties>().lowering_strategy = lowering_strategy;
  }
}

ApplyLowerContractionPatternsOp ApplyLowerContractionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::vector::VectorContractLoweringAttr lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(lowering_strategy)>(lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerContractionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerContractionPatternsOp ApplyLowerContractionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::vector::VectorContractLoweringAttr lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(lowering_strategy)>(lowering_strategy));
}

void ApplyLowerContractionPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorContractLoweringAttr lowering_strategy) {
  if (lowering_strategy) {
    odsState.getOrAddProperties<Properties>().lowering_strategy = lowering_strategy;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerContractionPatternsOp ApplyLowerContractionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorContractLoweringAttr lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerContractionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerContractionPatternsOp ApplyLowerContractionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorContractLoweringAttr lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy));
}

void ApplyLowerContractionPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::vector::VectorContractLowering lowering_strategy) {
  odsState.getOrAddProperties<Properties>().lowering_strategy = ::mlir::vector::VectorContractLoweringAttr::get(odsBuilder.getContext(), lowering_strategy);
}

ApplyLowerContractionPatternsOp ApplyLowerContractionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::vector::VectorContractLowering lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(lowering_strategy)>(lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerContractionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerContractionPatternsOp ApplyLowerContractionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::vector::VectorContractLowering lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(lowering_strategy)>(lowering_strategy));
}

void ApplyLowerContractionPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorContractLowering lowering_strategy) {
  odsState.getOrAddProperties<Properties>().lowering_strategy = ::mlir::vector::VectorContractLoweringAttr::get(odsBuilder.getContext(), lowering_strategy);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerContractionPatternsOp ApplyLowerContractionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorContractLowering lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerContractionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerContractionPatternsOp ApplyLowerContractionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorContractLowering lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy));
}

void ApplyLowerContractionPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    (void)odsState.getOrAddProperties<ApplyLowerContractionPatternsOp::Properties>();
    ::mlir::PropertyRef properties = odsState.getRawProperties();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ApplyLowerContractionPatternsOp ApplyLowerContractionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerContractionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerContractionPatternsOp ApplyLowerContractionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyLowerContractionPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerContractionPatternsOp ApplyLowerContractionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerContractionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerContractionPatternsOp ApplyLowerContractionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

void ApplyLowerContractionPatternsOp::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.lowering_strategy)
    properties.lowering_strategy = ::mlir::vector::VectorContractLoweringAttr::get(odsBuilder.getContext(), vector::VectorContractLowering::OuterProduct);
}

::llvm::LogicalResult ApplyLowerContractionPatternsOp::verifyInvariantsImpl() {
  auto tblgen_lowering_strategy = getProperties().lowering_strategy; (void)tblgen_lowering_strategy;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps2(*this, tblgen_lowering_strategy, "lowering_strategy")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerContractionPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyLowerContractionPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::vector::VectorContractLoweringAttr lowering_strategyAttr;
  if (::mlir::succeeded(parser.parseOptionalKeyword("lowering_strategy"))) {
  if (parser.parseEqual())
    return ::mlir::failure();

  {
    ::llvm::StringRef attrStr;
    ::mlir::NamedAttrList attrStorage;
    auto loc = parser.getCurrentLocation();
    if (parser.parseOptionalKeyword(&attrStr, {"dot","llvmintr","outerproduct","parallelarith"})) {
      ::mlir::StringAttr attrVal;
      ::mlir::OptionalParseResult parseResult =
        parser.parseOptionalAttribute(attrVal,
                                      parser.getBuilder().getNoneType(),
                                      "lowering_strategy", attrStorage);
      if (parseResult.has_value()) {
        if (failed(*parseResult))
          return ::mlir::failure();
        attrStr = attrVal.getValue();
      } else {
        return parser.emitError(loc, "expected string or keyword containing one of the following enum values for attribute 'lowering_strategy' [dot, llvmintr, outerproduct, parallelarith]");
      }
    }
    if (!attrStr.empty()) {
      auto attrOptional = ::mlir::vector::symbolizeVectorContractLowering(attrStr);
      if (!attrOptional)
        return parser.emitError(loc, "invalid ")
               << "lowering_strategy attribute specification: \"" << attrStr << '"';;

      lowering_strategyAttr = ::mlir::vector::VectorContractLoweringAttr::get(parser.getBuilder().getContext(), *attrOptional);
        result.getOrAddProperties<ApplyLowerContractionPatternsOp::Properties>().lowering_strategy = lowering_strategyAttr;
    }
  }
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyLowerContractionPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getLoweringStrategyAttr() != ::mlir::vector::VectorContractLoweringAttr::get(::mlir::OpBuilder((*this)->getContext()).getContext(), vector::VectorContractLowering::OuterProduct)) {
    _odsPrinter << ' ' << "lowering_strategy";
    _odsPrinter << ' ' << "=";
    _odsPrinter << ' ';

    {
      auto caseValue = getLoweringStrategy();
      auto caseValueStr = stringifyVectorContractLowering(caseValue);
      _odsPrinter << caseValueStr;
    }
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("lowering_strategy");
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getLoweringStrategyAttr();
     if(attr && (attr == ::mlir::vector::VectorContractLoweringAttr::get(odsBuilder.getContext(), vector::VectorContractLowering::OuterProduct)))
       elidedAttrs.push_back("lowering_strategy");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyLowerContractionPatternsOp)
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::detail::ApplyLowerContractionPatternsOpGenericAdaptorBase::Properties)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyLowerCreateMaskPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyLowerCreateMaskPatternsOpGenericAdaptorBase::ApplyLowerCreateMaskPatternsOpGenericAdaptorBase(ApplyLowerCreateMaskPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyLowerCreateMaskPatternsOpAdaptor::ApplyLowerCreateMaskPatternsOpAdaptor(ApplyLowerCreateMaskPatternsOp op) : ApplyLowerCreateMaskPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyLowerCreateMaskPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerCreateMaskPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyLowerCreateMaskPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyLowerCreateMaskPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyLowerCreateMaskPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyLowerCreateMaskPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyLowerCreateMaskPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyLowerCreateMaskPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyLowerCreateMaskPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyLowerCreateMaskPatternsOp ApplyLowerCreateMaskPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyLowerCreateMaskPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerCreateMaskPatternsOp ApplyLowerCreateMaskPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyLowerCreateMaskPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerCreateMaskPatternsOp ApplyLowerCreateMaskPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerCreateMaskPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerCreateMaskPatternsOp ApplyLowerCreateMaskPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyLowerCreateMaskPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerCreateMaskPatternsOp ApplyLowerCreateMaskPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerCreateMaskPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerCreateMaskPatternsOp ApplyLowerCreateMaskPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyLowerCreateMaskPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerCreateMaskPatternsOp ApplyLowerCreateMaskPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerCreateMaskPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerCreateMaskPatternsOp ApplyLowerCreateMaskPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyLowerCreateMaskPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerCreateMaskPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyLowerCreateMaskPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyLowerCreateMaskPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyLowerCreateMaskPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyLowerGatherPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyLowerGatherPatternsOpGenericAdaptorBase::ApplyLowerGatherPatternsOpGenericAdaptorBase(ApplyLowerGatherPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyLowerGatherPatternsOpAdaptor::ApplyLowerGatherPatternsOpAdaptor(ApplyLowerGatherPatternsOp op) : ApplyLowerGatherPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyLowerGatherPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerGatherPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyLowerGatherPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyLowerGatherPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyLowerGatherPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyLowerGatherPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyLowerGatherPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyLowerGatherPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyLowerGatherPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyLowerGatherPatternsOp ApplyLowerGatherPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyLowerGatherPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerGatherPatternsOp ApplyLowerGatherPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyLowerGatherPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerGatherPatternsOp ApplyLowerGatherPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerGatherPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerGatherPatternsOp ApplyLowerGatherPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyLowerGatherPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerGatherPatternsOp ApplyLowerGatherPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerGatherPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerGatherPatternsOp ApplyLowerGatherPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyLowerGatherPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerGatherPatternsOp ApplyLowerGatherPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerGatherPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerGatherPatternsOp ApplyLowerGatherPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyLowerGatherPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerGatherPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyLowerGatherPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyLowerGatherPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyLowerGatherPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyLowerInterleavePatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyLowerInterleavePatternsOpGenericAdaptorBase::ApplyLowerInterleavePatternsOpGenericAdaptorBase(ApplyLowerInterleavePatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyLowerInterleavePatternsOpAdaptor::ApplyLowerInterleavePatternsOpAdaptor(ApplyLowerInterleavePatternsOp op) : ApplyLowerInterleavePatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyLowerInterleavePatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerInterleavePatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyLowerInterleavePatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyLowerInterleavePatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyLowerInterleavePatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyLowerInterleavePatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyLowerInterleavePatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyLowerInterleavePatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyLowerInterleavePatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyLowerInterleavePatternsOp ApplyLowerInterleavePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyLowerInterleavePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerInterleavePatternsOp ApplyLowerInterleavePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyLowerInterleavePatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerInterleavePatternsOp ApplyLowerInterleavePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerInterleavePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerInterleavePatternsOp ApplyLowerInterleavePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyLowerInterleavePatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerInterleavePatternsOp ApplyLowerInterleavePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerInterleavePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerInterleavePatternsOp ApplyLowerInterleavePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyLowerInterleavePatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerInterleavePatternsOp ApplyLowerInterleavePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerInterleavePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerInterleavePatternsOp ApplyLowerInterleavePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyLowerInterleavePatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerInterleavePatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyLowerInterleavePatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyLowerInterleavePatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyLowerInterleavePatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyLowerMaskedTransfersPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyLowerMaskedTransfersPatternsOpGenericAdaptorBase::ApplyLowerMaskedTransfersPatternsOpGenericAdaptorBase(ApplyLowerMaskedTransfersPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyLowerMaskedTransfersPatternsOpAdaptor::ApplyLowerMaskedTransfersPatternsOpAdaptor(ApplyLowerMaskedTransfersPatternsOp op) : ApplyLowerMaskedTransfersPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyLowerMaskedTransfersPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerMaskedTransfersPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyLowerMaskedTransfersPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyLowerMaskedTransfersPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyLowerMaskedTransfersPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyLowerMaskedTransfersPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyLowerMaskedTransfersPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyLowerMaskedTransfersPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyLowerMaskedTransfersPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyLowerMaskedTransfersPatternsOp ApplyLowerMaskedTransfersPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyLowerMaskedTransfersPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerMaskedTransfersPatternsOp ApplyLowerMaskedTransfersPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyLowerMaskedTransfersPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerMaskedTransfersPatternsOp ApplyLowerMaskedTransfersPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerMaskedTransfersPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerMaskedTransfersPatternsOp ApplyLowerMaskedTransfersPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyLowerMaskedTransfersPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerMaskedTransfersPatternsOp ApplyLowerMaskedTransfersPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerMaskedTransfersPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerMaskedTransfersPatternsOp ApplyLowerMaskedTransfersPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyLowerMaskedTransfersPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerMaskedTransfersPatternsOp ApplyLowerMaskedTransfersPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerMaskedTransfersPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerMaskedTransfersPatternsOp ApplyLowerMaskedTransfersPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyLowerMaskedTransfersPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerMaskedTransfersPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyLowerMaskedTransfersPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyLowerMaskedTransfersPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyLowerMaskedTransfersPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyLowerMasksPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyLowerMasksPatternsOpGenericAdaptorBase::ApplyLowerMasksPatternsOpGenericAdaptorBase(ApplyLowerMasksPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyLowerMasksPatternsOpAdaptor::ApplyLowerMasksPatternsOpAdaptor(ApplyLowerMasksPatternsOp op) : ApplyLowerMasksPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyLowerMasksPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerMasksPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyLowerMasksPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyLowerMasksPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyLowerMasksPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyLowerMasksPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyLowerMasksPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyLowerMasksPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyLowerMasksPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyLowerMasksPatternsOp ApplyLowerMasksPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyLowerMasksPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerMasksPatternsOp ApplyLowerMasksPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyLowerMasksPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerMasksPatternsOp ApplyLowerMasksPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerMasksPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerMasksPatternsOp ApplyLowerMasksPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyLowerMasksPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerMasksPatternsOp ApplyLowerMasksPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerMasksPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerMasksPatternsOp ApplyLowerMasksPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyLowerMasksPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerMasksPatternsOp ApplyLowerMasksPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerMasksPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerMasksPatternsOp ApplyLowerMasksPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyLowerMasksPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerMasksPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyLowerMasksPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyLowerMasksPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyLowerMasksPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyLowerOuterProductPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyLowerOuterProductPatternsOpGenericAdaptorBase::ApplyLowerOuterProductPatternsOpGenericAdaptorBase(ApplyLowerOuterProductPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyLowerOuterProductPatternsOpAdaptor::ApplyLowerOuterProductPatternsOpAdaptor(ApplyLowerOuterProductPatternsOp op) : ApplyLowerOuterProductPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyLowerOuterProductPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerOuterProductPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyLowerOuterProductPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyLowerOuterProductPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyLowerOuterProductPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyLowerOuterProductPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyLowerOuterProductPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyLowerOuterProductPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyLowerOuterProductPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyLowerOuterProductPatternsOp ApplyLowerOuterProductPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyLowerOuterProductPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerOuterProductPatternsOp ApplyLowerOuterProductPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyLowerOuterProductPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerOuterProductPatternsOp ApplyLowerOuterProductPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerOuterProductPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerOuterProductPatternsOp ApplyLowerOuterProductPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyLowerOuterProductPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerOuterProductPatternsOp ApplyLowerOuterProductPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerOuterProductPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerOuterProductPatternsOp ApplyLowerOuterProductPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyLowerOuterProductPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerOuterProductPatternsOp ApplyLowerOuterProductPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerOuterProductPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerOuterProductPatternsOp ApplyLowerOuterProductPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyLowerOuterProductPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerOuterProductPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyLowerOuterProductPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyLowerOuterProductPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyLowerOuterProductPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyLowerScanPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyLowerScanPatternsOpGenericAdaptorBase::ApplyLowerScanPatternsOpGenericAdaptorBase(ApplyLowerScanPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyLowerScanPatternsOpAdaptor::ApplyLowerScanPatternsOpAdaptor(ApplyLowerScanPatternsOp op) : ApplyLowerScanPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyLowerScanPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerScanPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyLowerScanPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyLowerScanPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyLowerScanPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyLowerScanPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyLowerScanPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyLowerScanPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyLowerScanPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyLowerScanPatternsOp ApplyLowerScanPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyLowerScanPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerScanPatternsOp ApplyLowerScanPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyLowerScanPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerScanPatternsOp ApplyLowerScanPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerScanPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerScanPatternsOp ApplyLowerScanPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyLowerScanPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerScanPatternsOp ApplyLowerScanPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerScanPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerScanPatternsOp ApplyLowerScanPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyLowerScanPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerScanPatternsOp ApplyLowerScanPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerScanPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerScanPatternsOp ApplyLowerScanPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyLowerScanPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerScanPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyLowerScanPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyLowerScanPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyLowerScanPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyLowerShapeCastPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyLowerShapeCastPatternsOpGenericAdaptorBase::ApplyLowerShapeCastPatternsOpGenericAdaptorBase(ApplyLowerShapeCastPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyLowerShapeCastPatternsOpAdaptor::ApplyLowerShapeCastPatternsOpAdaptor(ApplyLowerShapeCastPatternsOp op) : ApplyLowerShapeCastPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyLowerShapeCastPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerShapeCastPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyLowerShapeCastPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyLowerShapeCastPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyLowerShapeCastPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyLowerShapeCastPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyLowerShapeCastPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyLowerShapeCastPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyLowerShapeCastPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyLowerShapeCastPatternsOp ApplyLowerShapeCastPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyLowerShapeCastPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerShapeCastPatternsOp ApplyLowerShapeCastPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyLowerShapeCastPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerShapeCastPatternsOp ApplyLowerShapeCastPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerShapeCastPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerShapeCastPatternsOp ApplyLowerShapeCastPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyLowerShapeCastPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerShapeCastPatternsOp ApplyLowerShapeCastPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerShapeCastPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerShapeCastPatternsOp ApplyLowerShapeCastPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyLowerShapeCastPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerShapeCastPatternsOp ApplyLowerShapeCastPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerShapeCastPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerShapeCastPatternsOp ApplyLowerShapeCastPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyLowerShapeCastPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerShapeCastPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyLowerShapeCastPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyLowerShapeCastPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyLowerShapeCastPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyLowerStepPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyLowerStepPatternsOpGenericAdaptorBase::ApplyLowerStepPatternsOpGenericAdaptorBase(ApplyLowerStepPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

uint64_t ApplyLowerStepPatternsOpGenericAdaptorBase::getIndexBitwidth() {
  auto attr = getIndexBitwidthAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
ApplyLowerStepPatternsOpAdaptor::ApplyLowerStepPatternsOpAdaptor(ApplyLowerStepPatternsOp op) : ApplyLowerStepPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyLowerStepPatternsOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_index_bitwidth = getProperties().index_bitwidth; (void)tblgen_index_bitwidth;
  if (!tblgen_index_bitwidth) return emitError(loc, "'transform.apply_patterns.vector.lower_step' op requires attribute 'index_bitwidth'");

  if (tblgen_index_bitwidth && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_index_bitwidth))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_index_bitwidth).getType().isSignlessInteger(64)))))
    return emitError(loc, "'transform.apply_patterns.vector.lower_step' op attribute 'index_bitwidth' failed to satisfy constraint: 64-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerStepPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.index_bitwidth;
       auto attr = dict.get("index_bitwidth");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `index_bitwidth` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ApplyLowerStepPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.index_bitwidth;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("index_bitwidth",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyLowerStepPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.index_bitwidth.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ApplyLowerStepPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "index_bitwidth")
      return prop.index_bitwidth;
  return std::nullopt;
}

void ApplyLowerStepPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "index_bitwidth") {
       prop.index_bitwidth = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.index_bitwidth)>>(value);
       return;
    }
}

void ApplyLowerStepPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.index_bitwidth) attrs.append("index_bitwidth", prop.index_bitwidth);
}

::llvm::LogicalResult ApplyLowerStepPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getIndexBitwidthAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps3(attr, "index_bitwidth", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerStepPatternsOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readAttribute(prop.index_bitwidth)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ApplyLowerStepPatternsOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;
  writer.writeAttribute(prop.index_bitwidth);
}

uint64_t ApplyLowerStepPatternsOp::getIndexBitwidth() {
  auto attr = getIndexBitwidthAttr();
  return attr.getValue().getZExtValue();
}

void ApplyLowerStepPatternsOp::setIndexBitwidth(uint64_t attrValue) {
  getProperties().index_bitwidth = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(64), attrValue);
}

void ApplyLowerStepPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr index_bitwidth) {
  odsState.getOrAddProperties<Properties>().index_bitwidth = index_bitwidth;
}

ApplyLowerStepPatternsOp ApplyLowerStepPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr index_bitwidth) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(index_bitwidth)>(index_bitwidth));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerStepPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerStepPatternsOp ApplyLowerStepPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr index_bitwidth) {
  return create(builder, builder.getLoc(), std::forward<decltype(index_bitwidth)>(index_bitwidth));
}

void ApplyLowerStepPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr index_bitwidth) {
  odsState.getOrAddProperties<Properties>().index_bitwidth = index_bitwidth;
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerStepPatternsOp ApplyLowerStepPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr index_bitwidth) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(index_bitwidth)>(index_bitwidth));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerStepPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerStepPatternsOp ApplyLowerStepPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr index_bitwidth) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(index_bitwidth)>(index_bitwidth));
}

void ApplyLowerStepPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint64_t index_bitwidth) {
  odsState.getOrAddProperties<Properties>().index_bitwidth = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(64), index_bitwidth);
}

ApplyLowerStepPatternsOp ApplyLowerStepPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint64_t index_bitwidth) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(index_bitwidth)>(index_bitwidth));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerStepPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerStepPatternsOp ApplyLowerStepPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, uint64_t index_bitwidth) {
  return create(builder, builder.getLoc(), std::forward<decltype(index_bitwidth)>(index_bitwidth));
}

void ApplyLowerStepPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint64_t index_bitwidth) {
  odsState.getOrAddProperties<Properties>().index_bitwidth = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(64), index_bitwidth);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerStepPatternsOp ApplyLowerStepPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint64_t index_bitwidth) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(index_bitwidth)>(index_bitwidth));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerStepPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerStepPatternsOp ApplyLowerStepPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint64_t index_bitwidth) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(index_bitwidth)>(index_bitwidth));
}

void ApplyLowerStepPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    (void)odsState.getOrAddProperties<ApplyLowerStepPatternsOp::Properties>();
    ::mlir::PropertyRef properties = odsState.getRawProperties();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ApplyLowerStepPatternsOp ApplyLowerStepPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerStepPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerStepPatternsOp ApplyLowerStepPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyLowerStepPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerStepPatternsOp ApplyLowerStepPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerStepPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerStepPatternsOp ApplyLowerStepPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyLowerStepPatternsOp::verifyInvariantsImpl() {
  auto tblgen_index_bitwidth = getProperties().index_bitwidth; (void)tblgen_index_bitwidth;
  if (!tblgen_index_bitwidth) return emitOpError("requires attribute 'index_bitwidth'");

  if (::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps3(*this, tblgen_index_bitwidth, "index_bitwidth")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerStepPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyLowerStepPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr index_bitwidthAttr;
  if (parser.parseKeyword("index_bitwidth"))
    return ::mlir::failure();
  if (parser.parseEqual())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(index_bitwidthAttr, parser.getBuilder().getIntegerType(64))) {
    return ::mlir::failure();
  }
  if (index_bitwidthAttr) result.getOrAddProperties<ApplyLowerStepPatternsOp::Properties>().index_bitwidth = index_bitwidthAttr;
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyLowerStepPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  _odsPrinter << ' ' << "index_bitwidth";
  _odsPrinter << ' ' << "=";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getIndexBitwidthAttr());
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("index_bitwidth");
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyLowerStepPatternsOp)
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::detail::ApplyLowerStepPatternsOpGenericAdaptorBase::Properties)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyLowerTransferPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyLowerTransferPatternsOpGenericAdaptorBase::ApplyLowerTransferPatternsOpGenericAdaptorBase(ApplyLowerTransferPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr ApplyLowerTransferPatternsOpGenericAdaptorBase::getMaxTransferRankAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().max_transfer_rank);
  return attr;
}

uint64_t ApplyLowerTransferPatternsOpGenericAdaptorBase::getMaxTransferRank() {
  auto attr = getMaxTransferRankAttr();
  return attr.getValue().getZExtValue();
}


} // namespace detail
ApplyLowerTransferPatternsOpAdaptor::ApplyLowerTransferPatternsOpAdaptor(ApplyLowerTransferPatternsOp op) : ApplyLowerTransferPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyLowerTransferPatternsOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_max_transfer_rank = getProperties().max_transfer_rank; (void)tblgen_max_transfer_rank;

  if (tblgen_max_transfer_rank && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_max_transfer_rank))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_max_transfer_rank).getType().isSignlessInteger(64)))))
    return emitError(loc, "'transform.apply_patterns.vector.lower_transfer' op attribute 'max_transfer_rank' failed to satisfy constraint: 64-bit signless integer attribute");
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerTransferPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.max_transfer_rank;
       auto attr = dict.get("max_transfer_rank");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `max_transfer_rank` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ApplyLowerTransferPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.max_transfer_rank;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("max_transfer_rank",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyLowerTransferPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.max_transfer_rank.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ApplyLowerTransferPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "max_transfer_rank")
      return prop.max_transfer_rank;
  return std::nullopt;
}

void ApplyLowerTransferPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "max_transfer_rank") {
       prop.max_transfer_rank = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.max_transfer_rank)>>(value);
       return;
    }
}

void ApplyLowerTransferPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.max_transfer_rank) attrs.append("max_transfer_rank", prop.max_transfer_rank);
}

::llvm::LogicalResult ApplyLowerTransferPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getMaxTransferRankAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps3(attr, "max_transfer_rank", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerTransferPatternsOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.max_transfer_rank)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ApplyLowerTransferPatternsOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.max_transfer_rank);
}

uint64_t ApplyLowerTransferPatternsOp::getMaxTransferRank() {
  auto attr = getMaxTransferRankAttr();
  return attr.getValue().getZExtValue();
}

void ApplyLowerTransferPatternsOp::setMaxTransferRank(uint64_t attrValue) {
  getProperties().max_transfer_rank = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(64), attrValue);
}

void ApplyLowerTransferPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr max_transfer_rank) {
  if (max_transfer_rank) {
    odsState.getOrAddProperties<Properties>().max_transfer_rank = max_transfer_rank;
  }
}

ApplyLowerTransferPatternsOp ApplyLowerTransferPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr max_transfer_rank) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(max_transfer_rank)>(max_transfer_rank));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerTransferPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerTransferPatternsOp ApplyLowerTransferPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr max_transfer_rank) {
  return create(builder, builder.getLoc(), std::forward<decltype(max_transfer_rank)>(max_transfer_rank));
}

void ApplyLowerTransferPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr max_transfer_rank) {
  if (max_transfer_rank) {
    odsState.getOrAddProperties<Properties>().max_transfer_rank = max_transfer_rank;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerTransferPatternsOp ApplyLowerTransferPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr max_transfer_rank) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(max_transfer_rank)>(max_transfer_rank));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerTransferPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerTransferPatternsOp ApplyLowerTransferPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr max_transfer_rank) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(max_transfer_rank)>(max_transfer_rank));
}

void ApplyLowerTransferPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint64_t max_transfer_rank) {
  odsState.getOrAddProperties<Properties>().max_transfer_rank = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(64), max_transfer_rank);
}

ApplyLowerTransferPatternsOp ApplyLowerTransferPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint64_t max_transfer_rank) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(max_transfer_rank)>(max_transfer_rank));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerTransferPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerTransferPatternsOp ApplyLowerTransferPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, uint64_t max_transfer_rank) {
  return create(builder, builder.getLoc(), std::forward<decltype(max_transfer_rank)>(max_transfer_rank));
}

void ApplyLowerTransferPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint64_t max_transfer_rank) {
  odsState.getOrAddProperties<Properties>().max_transfer_rank = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(64), max_transfer_rank);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerTransferPatternsOp ApplyLowerTransferPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint64_t max_transfer_rank) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(max_transfer_rank)>(max_transfer_rank));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerTransferPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerTransferPatternsOp ApplyLowerTransferPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint64_t max_transfer_rank) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(max_transfer_rank)>(max_transfer_rank));
}

void ApplyLowerTransferPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    (void)odsState.getOrAddProperties<ApplyLowerTransferPatternsOp::Properties>();
    ::mlir::PropertyRef properties = odsState.getRawProperties();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ApplyLowerTransferPatternsOp ApplyLowerTransferPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerTransferPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerTransferPatternsOp ApplyLowerTransferPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyLowerTransferPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerTransferPatternsOp ApplyLowerTransferPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerTransferPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerTransferPatternsOp ApplyLowerTransferPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

void ApplyLowerTransferPatternsOp::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.max_transfer_rank)
    properties.max_transfer_rank = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(64), 1);
}

::llvm::LogicalResult ApplyLowerTransferPatternsOp::verifyInvariantsImpl() {
  auto tblgen_max_transfer_rank = getProperties().max_transfer_rank; (void)tblgen_max_transfer_rank;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps3(*this, tblgen_max_transfer_rank, "max_transfer_rank")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerTransferPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyLowerTransferPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr max_transfer_rankAttr;
  if (::mlir::succeeded(parser.parseOptionalKeyword("max_transfer_rank"))) {
  if (parser.parseEqual())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(max_transfer_rankAttr, parser.getBuilder().getIntegerType(64))) {
    return ::mlir::failure();
  }
  if (max_transfer_rankAttr) result.getOrAddProperties<ApplyLowerTransferPatternsOp::Properties>().max_transfer_rank = max_transfer_rankAttr;
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyLowerTransferPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getMaxTransferRankAttr() != ::mlir::OpBuilder((*this)->getContext()).getIntegerAttr(::mlir::OpBuilder((*this)->getContext()).getIntegerType(64), 1)) {
    _odsPrinter << ' ' << "max_transfer_rank";
    _odsPrinter << ' ' << "=";
    _odsPrinter << ' ';
    _odsPrinter.printAttributeWithoutType(getMaxTransferRankAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("max_transfer_rank");
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getMaxTransferRankAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(64), 1)))
       elidedAttrs.push_back("max_transfer_rank");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyLowerTransferPatternsOp)
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::detail::ApplyLowerTransferPatternsOpGenericAdaptorBase::Properties)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyLowerTransposePatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyLowerTransposePatternsOpGenericAdaptorBase::ApplyLowerTransposePatternsOpGenericAdaptorBase(ApplyLowerTransposePatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::vector::VectorTransposeLoweringAttr ApplyLowerTransposePatternsOpGenericAdaptorBase::getLoweringStrategyAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::vector::VectorTransposeLoweringAttr>(getProperties().lowering_strategy);
  return attr;
}

::mlir::vector::VectorTransposeLowering ApplyLowerTransposePatternsOpGenericAdaptorBase::getLoweringStrategy() {
  auto attr = getLoweringStrategyAttr();
  return attr.getValue();
}

::mlir::BoolAttr ApplyLowerTransposePatternsOpGenericAdaptorBase::getAvx2LoweringStrategyAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().avx2_lowering_strategy);
  return attr;
}

bool ApplyLowerTransposePatternsOpGenericAdaptorBase::getAvx2LoweringStrategy() {
  auto attr = getAvx2LoweringStrategyAttr();
  return attr.getValue();
}


} // namespace detail
ApplyLowerTransposePatternsOpAdaptor::ApplyLowerTransposePatternsOpAdaptor(ApplyLowerTransposePatternsOp op) : ApplyLowerTransposePatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyLowerTransposePatternsOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_avx2_lowering_strategy = getProperties().avx2_lowering_strategy; (void)tblgen_avx2_lowering_strategy;
  auto tblgen_lowering_strategy = getProperties().lowering_strategy; (void)tblgen_lowering_strategy;

  if (tblgen_lowering_strategy && !((::llvm::isa<::mlir::vector::VectorTransposeLoweringAttr>(tblgen_lowering_strategy))))
    return emitError(loc, "'transform.apply_patterns.vector.lower_transpose' op attribute 'lowering_strategy' failed to satisfy constraint: control the lowering of `vector.transpose` operations.");

  if (tblgen_avx2_lowering_strategy && !((::llvm::isa<::mlir::BoolAttr>(tblgen_avx2_lowering_strategy))))
    return emitError(loc, "'transform.apply_patterns.vector.lower_transpose' op attribute 'avx2_lowering_strategy' failed to satisfy constraint: bool attribute");
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerTransposePatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.avx2_lowering_strategy;
       auto attr = dict.get("avx2_lowering_strategy");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `avx2_lowering_strategy` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.lowering_strategy;
       auto attr = dict.get("lowering_strategy");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `lowering_strategy` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ApplyLowerTransposePatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.avx2_lowering_strategy;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("avx2_lowering_strategy",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.lowering_strategy;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("lowering_strategy",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyLowerTransposePatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.avx2_lowering_strategy.getAsOpaquePointer()), 
    llvm::hash_value(prop.lowering_strategy.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ApplyLowerTransposePatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "avx2_lowering_strategy")
      return prop.avx2_lowering_strategy;

    if (name == "lowering_strategy")
      return prop.lowering_strategy;
  return std::nullopt;
}

void ApplyLowerTransposePatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "avx2_lowering_strategy") {
       prop.avx2_lowering_strategy = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.avx2_lowering_strategy)>>(value);
       return;
    }

    if (name == "lowering_strategy") {
       prop.lowering_strategy = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.lowering_strategy)>>(value);
       return;
    }
}

void ApplyLowerTransposePatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.avx2_lowering_strategy) attrs.append("avx2_lowering_strategy", prop.avx2_lowering_strategy);

    if (prop.lowering_strategy) attrs.append("lowering_strategy", prop.lowering_strategy);
}

::llvm::LogicalResult ApplyLowerTransposePatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getAvx2LoweringStrategyAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps5(attr, "avx2_lowering_strategy", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getLoweringStrategyAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps4(attr, "lowering_strategy", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerTransposePatternsOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.avx2_lowering_strategy)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.lowering_strategy)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ApplyLowerTransposePatternsOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.avx2_lowering_strategy);

  writer.writeOptionalAttribute(prop.lowering_strategy);
}

::mlir::vector::VectorTransposeLowering ApplyLowerTransposePatternsOp::getLoweringStrategy() {
  auto attr = getLoweringStrategyAttr();
  return attr.getValue();
}

bool ApplyLowerTransposePatternsOp::getAvx2LoweringStrategy() {
  auto attr = getAvx2LoweringStrategyAttr();
  return attr.getValue();
}

void ApplyLowerTransposePatternsOp::setLoweringStrategy(::mlir::vector::VectorTransposeLowering attrValue) {
  getProperties().lowering_strategy = ::mlir::vector::VectorTransposeLoweringAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue);
}

void ApplyLowerTransposePatternsOp::setAvx2LoweringStrategy(bool attrValue) {
  getProperties().avx2_lowering_strategy = ::mlir::Builder((*this)->getContext()).getBoolAttr(attrValue);
}

void ApplyLowerTransposePatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::vector::VectorTransposeLoweringAttr lowering_strategy, ::mlir::BoolAttr avx2_lowering_strategy) {
  if (lowering_strategy) {
    odsState.getOrAddProperties<Properties>().lowering_strategy = lowering_strategy;
  }
  if (avx2_lowering_strategy) {
    odsState.getOrAddProperties<Properties>().avx2_lowering_strategy = avx2_lowering_strategy;
  }
}

ApplyLowerTransposePatternsOp ApplyLowerTransposePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::vector::VectorTransposeLoweringAttr lowering_strategy, ::mlir::BoolAttr avx2_lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(lowering_strategy)>(lowering_strategy), std::forward<decltype(avx2_lowering_strategy)>(avx2_lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerTransposePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerTransposePatternsOp ApplyLowerTransposePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::vector::VectorTransposeLoweringAttr lowering_strategy, ::mlir::BoolAttr avx2_lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(lowering_strategy)>(lowering_strategy), std::forward<decltype(avx2_lowering_strategy)>(avx2_lowering_strategy));
}

void ApplyLowerTransposePatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorTransposeLoweringAttr lowering_strategy, ::mlir::BoolAttr avx2_lowering_strategy) {
  if (lowering_strategy) {
    odsState.getOrAddProperties<Properties>().lowering_strategy = lowering_strategy;
  }
  if (avx2_lowering_strategy) {
    odsState.getOrAddProperties<Properties>().avx2_lowering_strategy = avx2_lowering_strategy;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerTransposePatternsOp ApplyLowerTransposePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorTransposeLoweringAttr lowering_strategy, ::mlir::BoolAttr avx2_lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy), std::forward<decltype(avx2_lowering_strategy)>(avx2_lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerTransposePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerTransposePatternsOp ApplyLowerTransposePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorTransposeLoweringAttr lowering_strategy, ::mlir::BoolAttr avx2_lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy), std::forward<decltype(avx2_lowering_strategy)>(avx2_lowering_strategy));
}

void ApplyLowerTransposePatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::vector::VectorTransposeLowering lowering_strategy, bool avx2_lowering_strategy) {
  odsState.getOrAddProperties<Properties>().lowering_strategy = ::mlir::vector::VectorTransposeLoweringAttr::get(odsBuilder.getContext(), lowering_strategy);
  odsState.getOrAddProperties<Properties>().avx2_lowering_strategy = odsBuilder.getBoolAttr(avx2_lowering_strategy);
}

ApplyLowerTransposePatternsOp ApplyLowerTransposePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::vector::VectorTransposeLowering lowering_strategy, bool avx2_lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(lowering_strategy)>(lowering_strategy), std::forward<decltype(avx2_lowering_strategy)>(avx2_lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerTransposePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerTransposePatternsOp ApplyLowerTransposePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::vector::VectorTransposeLowering lowering_strategy, bool avx2_lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(lowering_strategy)>(lowering_strategy), std::forward<decltype(avx2_lowering_strategy)>(avx2_lowering_strategy));
}

void ApplyLowerTransposePatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorTransposeLowering lowering_strategy, bool avx2_lowering_strategy) {
  odsState.getOrAddProperties<Properties>().lowering_strategy = ::mlir::vector::VectorTransposeLoweringAttr::get(odsBuilder.getContext(), lowering_strategy);
  odsState.getOrAddProperties<Properties>().avx2_lowering_strategy = odsBuilder.getBoolAttr(avx2_lowering_strategy);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyLowerTransposePatternsOp ApplyLowerTransposePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorTransposeLowering lowering_strategy, bool avx2_lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy), std::forward<decltype(avx2_lowering_strategy)>(avx2_lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerTransposePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerTransposePatternsOp ApplyLowerTransposePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorTransposeLowering lowering_strategy, bool avx2_lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy), std::forward<decltype(avx2_lowering_strategy)>(avx2_lowering_strategy));
}

void ApplyLowerTransposePatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    (void)odsState.getOrAddProperties<ApplyLowerTransposePatternsOp::Properties>();
    ::mlir::PropertyRef properties = odsState.getRawProperties();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ApplyLowerTransposePatternsOp ApplyLowerTransposePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerTransposePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerTransposePatternsOp ApplyLowerTransposePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyLowerTransposePatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyLowerTransposePatternsOp ApplyLowerTransposePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyLowerTransposePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyLowerTransposePatternsOp ApplyLowerTransposePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

void ApplyLowerTransposePatternsOp::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.lowering_strategy)
    properties.lowering_strategy = ::mlir::vector::VectorTransposeLoweringAttr::get(odsBuilder.getContext(), vector::VectorTransposeLowering::EltWise);
  if (!properties.avx2_lowering_strategy)
    properties.avx2_lowering_strategy = odsBuilder.getBoolAttr(false);
}

::llvm::LogicalResult ApplyLowerTransposePatternsOp::verifyInvariantsImpl() {
  auto tblgen_avx2_lowering_strategy = getProperties().avx2_lowering_strategy; (void)tblgen_avx2_lowering_strategy;
  auto tblgen_lowering_strategy = getProperties().lowering_strategy; (void)tblgen_lowering_strategy;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps4(*this, tblgen_lowering_strategy, "lowering_strategy")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps5(*this, tblgen_avx2_lowering_strategy, "avx2_lowering_strategy")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult ApplyLowerTransposePatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyLowerTransposePatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::vector::VectorTransposeLoweringAttr lowering_strategyAttr;
  ::mlir::BoolAttr avx2_lowering_strategyAttr;
  bool lowering_strategyClause = false;
  bool avx2_lowering_strategyClause = false;
  while(true) {
if (succeeded(parser.parseOptionalKeyword("lowering_strategy"))) {

  if (lowering_strategyClause) {
    return parser.emitError(parser.getNameLoc())
          << "`lowering_strategy` clause can appear at most once in the expansion of the "
             "oilist directive";
  }
  lowering_strategyClause = true;
  if (parser.parseEqual())
    return ::mlir::failure();

  {
    ::llvm::StringRef attrStr;
    ::mlir::NamedAttrList attrStorage;
    auto loc = parser.getCurrentLocation();
    if (parser.parseOptionalKeyword(&attrStr, {"eltwise","llvmintr","shuffle_1d","shuffle_16x16"})) {
      ::mlir::StringAttr attrVal;
      ::mlir::OptionalParseResult parseResult =
        parser.parseOptionalAttribute(attrVal,
                                      parser.getBuilder().getNoneType(),
                                      "lowering_strategy", attrStorage);
      if (parseResult.has_value()) {
        if (failed(*parseResult))
          return ::mlir::failure();
        attrStr = attrVal.getValue();
      } else {
        return parser.emitError(loc, "expected string or keyword containing one of the following enum values for attribute 'lowering_strategy' [eltwise, llvmintr, shuffle_1d, shuffle_16x16]");
      }
    }
    if (!attrStr.empty()) {
      auto attrOptional = ::mlir::vector::symbolizeVectorTransposeLowering(attrStr);
      if (!attrOptional)
        return parser.emitError(loc, "invalid ")
               << "lowering_strategy attribute specification: \"" << attrStr << '"';;

      lowering_strategyAttr = ::mlir::vector::VectorTransposeLoweringAttr::get(parser.getBuilder().getContext(), *attrOptional);
        result.getOrAddProperties<ApplyLowerTransposePatternsOp::Properties>().lowering_strategy = lowering_strategyAttr;
    }
  }
    } else if (succeeded(parser.parseOptionalKeyword("avx2_lowering_strategy"))) {

  if (avx2_lowering_strategyClause) {
    return parser.emitError(parser.getNameLoc())
          << "`avx2_lowering_strategy` clause can appear at most once in the expansion of the "
             "oilist directive";
  }
  avx2_lowering_strategyClause = true;
  if (parser.parseEqual())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(avx2_lowering_strategyAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (avx2_lowering_strategyAttr) result.getOrAddProperties<ApplyLowerTransposePatternsOp::Properties>().avx2_lowering_strategy = avx2_lowering_strategyAttr;
    } else  {
    break;
  }
}
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyLowerTransposePatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (false || (getLoweringStrategyAttr() != ::mlir::vector::VectorTransposeLoweringAttr::get(::mlir::OpBuilder((*this)->getContext()).getContext(), vector::VectorTransposeLowering::EltWise))) {
  _odsPrinter << ' ' << "lowering_strategy";
  _odsPrinter << ' ' << "=";
  _odsPrinter << ' ';

  {
    auto caseValue = getLoweringStrategy();
    auto caseValueStr = stringifyVectorTransposeLowering(caseValue);
    _odsPrinter << caseValueStr;
  }
  }
  if (false || (getAvx2LoweringStrategyAttr() != ::mlir::OpBuilder((*this)->getContext()).getBoolAttr(false))) {
  _odsPrinter << ' ' << "avx2_lowering_strategy";
  _odsPrinter << ' ' << "=";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getAvx2LoweringStrategyAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("lowering_strategy");
  elidedAttrs.push_back("avx2_lowering_strategy");
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getLoweringStrategyAttr();
     if(attr && (attr == ::mlir::vector::VectorTransposeLoweringAttr::get(odsBuilder.getContext(), vector::VectorTransposeLowering::EltWise)))
       elidedAttrs.push_back("lowering_strategy");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getAvx2LoweringStrategyAttr();
     if(attr && (attr == odsBuilder.getBoolAttr(false)))
       elidedAttrs.push_back("avx2_lowering_strategy");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyLowerTransposePatternsOp)
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::detail::ApplyLowerTransposePatternsOpGenericAdaptorBase::Properties)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyMaterializeMasksPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyMaterializeMasksPatternsOpGenericAdaptorBase::ApplyMaterializeMasksPatternsOpGenericAdaptorBase(ApplyMaterializeMasksPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyMaterializeMasksPatternsOpAdaptor::ApplyMaterializeMasksPatternsOpAdaptor(ApplyMaterializeMasksPatternsOp op) : ApplyMaterializeMasksPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyMaterializeMasksPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyMaterializeMasksPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyMaterializeMasksPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyMaterializeMasksPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyMaterializeMasksPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyMaterializeMasksPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyMaterializeMasksPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyMaterializeMasksPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyMaterializeMasksPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyMaterializeMasksPatternsOp ApplyMaterializeMasksPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyMaterializeMasksPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyMaterializeMasksPatternsOp ApplyMaterializeMasksPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyMaterializeMasksPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyMaterializeMasksPatternsOp ApplyMaterializeMasksPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyMaterializeMasksPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyMaterializeMasksPatternsOp ApplyMaterializeMasksPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyMaterializeMasksPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyMaterializeMasksPatternsOp ApplyMaterializeMasksPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyMaterializeMasksPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyMaterializeMasksPatternsOp ApplyMaterializeMasksPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyMaterializeMasksPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyMaterializeMasksPatternsOp ApplyMaterializeMasksPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyMaterializeMasksPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyMaterializeMasksPatternsOp ApplyMaterializeMasksPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyMaterializeMasksPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyMaterializeMasksPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyMaterializeMasksPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyMaterializeMasksPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyMaterializeMasksPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyMultiReductionFlatteningPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyMultiReductionFlatteningPatternsOpGenericAdaptorBase::ApplyMultiReductionFlatteningPatternsOpGenericAdaptorBase(ApplyMultiReductionFlatteningPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::vector::VectorMultiReductionLoweringAttr ApplyMultiReductionFlatteningPatternsOpGenericAdaptorBase::getLoweringStrategyAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::vector::VectorMultiReductionLoweringAttr>(getProperties().lowering_strategy);
  return attr;
}

::mlir::vector::VectorMultiReductionLowering ApplyMultiReductionFlatteningPatternsOpGenericAdaptorBase::getLoweringStrategy() {
  auto attr = getLoweringStrategyAttr();
  return attr.getValue();
}


} // namespace detail
ApplyMultiReductionFlatteningPatternsOpAdaptor::ApplyMultiReductionFlatteningPatternsOpAdaptor(ApplyMultiReductionFlatteningPatternsOp op) : ApplyMultiReductionFlatteningPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyMultiReductionFlatteningPatternsOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_lowering_strategy = getProperties().lowering_strategy; (void)tblgen_lowering_strategy;

  if (tblgen_lowering_strategy && !((::llvm::isa<::mlir::vector::VectorMultiReductionLoweringAttr>(tblgen_lowering_strategy))))
    return emitError(loc, "'transform.apply_patterns.vector.multi_reduction_flattening' op attribute 'lowering_strategy' failed to satisfy constraint: control the lowering of `vector.multi_reduction`.");
  return ::mlir::success();
}

::llvm::LogicalResult ApplyMultiReductionFlatteningPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.lowering_strategy;
       auto attr = dict.get("lowering_strategy");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `lowering_strategy` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ApplyMultiReductionFlatteningPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.lowering_strategy;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("lowering_strategy",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyMultiReductionFlatteningPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.lowering_strategy.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ApplyMultiReductionFlatteningPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "lowering_strategy")
      return prop.lowering_strategy;
  return std::nullopt;
}

void ApplyMultiReductionFlatteningPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "lowering_strategy") {
       prop.lowering_strategy = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.lowering_strategy)>>(value);
       return;
    }
}

void ApplyMultiReductionFlatteningPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.lowering_strategy) attrs.append("lowering_strategy", prop.lowering_strategy);
}

::llvm::LogicalResult ApplyMultiReductionFlatteningPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getLoweringStrategyAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps6(attr, "lowering_strategy", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ApplyMultiReductionFlatteningPatternsOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.lowering_strategy)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ApplyMultiReductionFlatteningPatternsOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.lowering_strategy);
}

::mlir::vector::VectorMultiReductionLowering ApplyMultiReductionFlatteningPatternsOp::getLoweringStrategy() {
  auto attr = getLoweringStrategyAttr();
  return attr.getValue();
}

void ApplyMultiReductionFlatteningPatternsOp::setLoweringStrategy(::mlir::vector::VectorMultiReductionLowering attrValue) {
  getProperties().lowering_strategy = ::mlir::vector::VectorMultiReductionLoweringAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue);
}

void ApplyMultiReductionFlatteningPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  if (lowering_strategy) {
    odsState.getOrAddProperties<Properties>().lowering_strategy = lowering_strategy;
  }
}

ApplyMultiReductionFlatteningPatternsOp ApplyMultiReductionFlatteningPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(lowering_strategy)>(lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyMultiReductionFlatteningPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyMultiReductionFlatteningPatternsOp ApplyMultiReductionFlatteningPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(lowering_strategy)>(lowering_strategy));
}

void ApplyMultiReductionFlatteningPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  if (lowering_strategy) {
    odsState.getOrAddProperties<Properties>().lowering_strategy = lowering_strategy;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyMultiReductionFlatteningPatternsOp ApplyMultiReductionFlatteningPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyMultiReductionFlatteningPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyMultiReductionFlatteningPatternsOp ApplyMultiReductionFlatteningPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy));
}

void ApplyMultiReductionFlatteningPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  odsState.getOrAddProperties<Properties>().lowering_strategy = ::mlir::vector::VectorMultiReductionLoweringAttr::get(odsBuilder.getContext(), lowering_strategy);
}

ApplyMultiReductionFlatteningPatternsOp ApplyMultiReductionFlatteningPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(lowering_strategy)>(lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyMultiReductionFlatteningPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyMultiReductionFlatteningPatternsOp ApplyMultiReductionFlatteningPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(lowering_strategy)>(lowering_strategy));
}

void ApplyMultiReductionFlatteningPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  odsState.getOrAddProperties<Properties>().lowering_strategy = ::mlir::vector::VectorMultiReductionLoweringAttr::get(odsBuilder.getContext(), lowering_strategy);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyMultiReductionFlatteningPatternsOp ApplyMultiReductionFlatteningPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyMultiReductionFlatteningPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyMultiReductionFlatteningPatternsOp ApplyMultiReductionFlatteningPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy));
}

void ApplyMultiReductionFlatteningPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    (void)odsState.getOrAddProperties<ApplyMultiReductionFlatteningPatternsOp::Properties>();
    ::mlir::PropertyRef properties = odsState.getRawProperties();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ApplyMultiReductionFlatteningPatternsOp ApplyMultiReductionFlatteningPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyMultiReductionFlatteningPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyMultiReductionFlatteningPatternsOp ApplyMultiReductionFlatteningPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyMultiReductionFlatteningPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyMultiReductionFlatteningPatternsOp ApplyMultiReductionFlatteningPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyMultiReductionFlatteningPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyMultiReductionFlatteningPatternsOp ApplyMultiReductionFlatteningPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

void ApplyMultiReductionFlatteningPatternsOp::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.lowering_strategy)
    properties.lowering_strategy = ::mlir::vector::VectorMultiReductionLoweringAttr::get(odsBuilder.getContext(), vector::VectorMultiReductionLowering::InnerParallel);
}

::llvm::LogicalResult ApplyMultiReductionFlatteningPatternsOp::verifyInvariantsImpl() {
  auto tblgen_lowering_strategy = getProperties().lowering_strategy; (void)tblgen_lowering_strategy;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps6(*this, tblgen_lowering_strategy, "lowering_strategy")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult ApplyMultiReductionFlatteningPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyMultiReductionFlatteningPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategyAttr;
  if (::mlir::succeeded(parser.parseOptionalKeyword("lowering_strategy"))) {
  if (parser.parseEqual())
    return ::mlir::failure();

  {
    ::llvm::StringRef attrStr;
    ::mlir::NamedAttrList attrStorage;
    auto loc = parser.getCurrentLocation();
    if (parser.parseOptionalKeyword(&attrStr, {"innerparallel","innerreduction"})) {
      ::mlir::StringAttr attrVal;
      ::mlir::OptionalParseResult parseResult =
        parser.parseOptionalAttribute(attrVal,
                                      parser.getBuilder().getNoneType(),
                                      "lowering_strategy", attrStorage);
      if (parseResult.has_value()) {
        if (failed(*parseResult))
          return ::mlir::failure();
        attrStr = attrVal.getValue();
      } else {
        return parser.emitError(loc, "expected string or keyword containing one of the following enum values for attribute 'lowering_strategy' [innerparallel, innerreduction]");
      }
    }
    if (!attrStr.empty()) {
      auto attrOptional = ::mlir::vector::symbolizeVectorMultiReductionLowering(attrStr);
      if (!attrOptional)
        return parser.emitError(loc, "invalid ")
               << "lowering_strategy attribute specification: \"" << attrStr << '"';;

      lowering_strategyAttr = ::mlir::vector::VectorMultiReductionLoweringAttr::get(parser.getBuilder().getContext(), *attrOptional);
        result.getOrAddProperties<ApplyMultiReductionFlatteningPatternsOp::Properties>().lowering_strategy = lowering_strategyAttr;
    }
  }
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyMultiReductionFlatteningPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getLoweringStrategyAttr() != ::mlir::vector::VectorMultiReductionLoweringAttr::get(::mlir::OpBuilder((*this)->getContext()).getContext(), vector::VectorMultiReductionLowering::InnerParallel)) {
    _odsPrinter << ' ' << "lowering_strategy";
    _odsPrinter << ' ' << "=";
    _odsPrinter << ' ';

    {
      auto caseValue = getLoweringStrategy();
      auto caseValueStr = stringifyVectorMultiReductionLowering(caseValue);
      _odsPrinter << caseValueStr;
    }
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("lowering_strategy");
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getLoweringStrategyAttr();
     if(attr && (attr == ::mlir::vector::VectorMultiReductionLoweringAttr::get(odsBuilder.getContext(), vector::VectorMultiReductionLowering::InnerParallel)))
       elidedAttrs.push_back("lowering_strategy");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyMultiReductionFlatteningPatternsOp)
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::detail::ApplyMultiReductionFlatteningPatternsOpGenericAdaptorBase::Properties)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyMultiReductionUnrollingPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyMultiReductionUnrollingPatternsOpGenericAdaptorBase::ApplyMultiReductionUnrollingPatternsOpGenericAdaptorBase(ApplyMultiReductionUnrollingPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::vector::VectorMultiReductionLoweringAttr ApplyMultiReductionUnrollingPatternsOpGenericAdaptorBase::getLoweringStrategyAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::vector::VectorMultiReductionLoweringAttr>(getProperties().lowering_strategy);
  return attr;
}

::mlir::vector::VectorMultiReductionLowering ApplyMultiReductionUnrollingPatternsOpGenericAdaptorBase::getLoweringStrategy() {
  auto attr = getLoweringStrategyAttr();
  return attr.getValue();
}


} // namespace detail
ApplyMultiReductionUnrollingPatternsOpAdaptor::ApplyMultiReductionUnrollingPatternsOpAdaptor(ApplyMultiReductionUnrollingPatternsOp op) : ApplyMultiReductionUnrollingPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyMultiReductionUnrollingPatternsOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_lowering_strategy = getProperties().lowering_strategy; (void)tblgen_lowering_strategy;

  if (tblgen_lowering_strategy && !((::llvm::isa<::mlir::vector::VectorMultiReductionLoweringAttr>(tblgen_lowering_strategy))))
    return emitError(loc, "'transform.apply_patterns.vector.multi_reduction_unrolling' op attribute 'lowering_strategy' failed to satisfy constraint: control the lowering of `vector.multi_reduction`.");
  return ::mlir::success();
}

::llvm::LogicalResult ApplyMultiReductionUnrollingPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.lowering_strategy;
       auto attr = dict.get("lowering_strategy");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `lowering_strategy` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ApplyMultiReductionUnrollingPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.lowering_strategy;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("lowering_strategy",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyMultiReductionUnrollingPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.lowering_strategy.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ApplyMultiReductionUnrollingPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "lowering_strategy")
      return prop.lowering_strategy;
  return std::nullopt;
}

void ApplyMultiReductionUnrollingPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "lowering_strategy") {
       prop.lowering_strategy = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.lowering_strategy)>>(value);
       return;
    }
}

void ApplyMultiReductionUnrollingPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.lowering_strategy) attrs.append("lowering_strategy", prop.lowering_strategy);
}

::llvm::LogicalResult ApplyMultiReductionUnrollingPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getLoweringStrategyAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps6(attr, "lowering_strategy", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ApplyMultiReductionUnrollingPatternsOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.lowering_strategy)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ApplyMultiReductionUnrollingPatternsOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.lowering_strategy);
}

::mlir::vector::VectorMultiReductionLowering ApplyMultiReductionUnrollingPatternsOp::getLoweringStrategy() {
  auto attr = getLoweringStrategyAttr();
  return attr.getValue();
}

void ApplyMultiReductionUnrollingPatternsOp::setLoweringStrategy(::mlir::vector::VectorMultiReductionLowering attrValue) {
  getProperties().lowering_strategy = ::mlir::vector::VectorMultiReductionLoweringAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue);
}

void ApplyMultiReductionUnrollingPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  if (lowering_strategy) {
    odsState.getOrAddProperties<Properties>().lowering_strategy = lowering_strategy;
  }
}

ApplyMultiReductionUnrollingPatternsOp ApplyMultiReductionUnrollingPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(lowering_strategy)>(lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyMultiReductionUnrollingPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyMultiReductionUnrollingPatternsOp ApplyMultiReductionUnrollingPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(lowering_strategy)>(lowering_strategy));
}

void ApplyMultiReductionUnrollingPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  if (lowering_strategy) {
    odsState.getOrAddProperties<Properties>().lowering_strategy = lowering_strategy;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyMultiReductionUnrollingPatternsOp ApplyMultiReductionUnrollingPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyMultiReductionUnrollingPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyMultiReductionUnrollingPatternsOp ApplyMultiReductionUnrollingPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy));
}

void ApplyMultiReductionUnrollingPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  odsState.getOrAddProperties<Properties>().lowering_strategy = ::mlir::vector::VectorMultiReductionLoweringAttr::get(odsBuilder.getContext(), lowering_strategy);
}

ApplyMultiReductionUnrollingPatternsOp ApplyMultiReductionUnrollingPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(lowering_strategy)>(lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyMultiReductionUnrollingPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyMultiReductionUnrollingPatternsOp ApplyMultiReductionUnrollingPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(lowering_strategy)>(lowering_strategy));
}

void ApplyMultiReductionUnrollingPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  odsState.getOrAddProperties<Properties>().lowering_strategy = ::mlir::vector::VectorMultiReductionLoweringAttr::get(odsBuilder.getContext(), lowering_strategy);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyMultiReductionUnrollingPatternsOp ApplyMultiReductionUnrollingPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyMultiReductionUnrollingPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyMultiReductionUnrollingPatternsOp ApplyMultiReductionUnrollingPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy));
}

void ApplyMultiReductionUnrollingPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    (void)odsState.getOrAddProperties<ApplyMultiReductionUnrollingPatternsOp::Properties>();
    ::mlir::PropertyRef properties = odsState.getRawProperties();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ApplyMultiReductionUnrollingPatternsOp ApplyMultiReductionUnrollingPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyMultiReductionUnrollingPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyMultiReductionUnrollingPatternsOp ApplyMultiReductionUnrollingPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyMultiReductionUnrollingPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyMultiReductionUnrollingPatternsOp ApplyMultiReductionUnrollingPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyMultiReductionUnrollingPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyMultiReductionUnrollingPatternsOp ApplyMultiReductionUnrollingPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

void ApplyMultiReductionUnrollingPatternsOp::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.lowering_strategy)
    properties.lowering_strategy = ::mlir::vector::VectorMultiReductionLoweringAttr::get(odsBuilder.getContext(), vector::VectorMultiReductionLowering::InnerParallel);
}

::llvm::LogicalResult ApplyMultiReductionUnrollingPatternsOp::verifyInvariantsImpl() {
  auto tblgen_lowering_strategy = getProperties().lowering_strategy; (void)tblgen_lowering_strategy;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps6(*this, tblgen_lowering_strategy, "lowering_strategy")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult ApplyMultiReductionUnrollingPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyMultiReductionUnrollingPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategyAttr;
  if (::mlir::succeeded(parser.parseOptionalKeyword("lowering_strategy"))) {
  if (parser.parseEqual())
    return ::mlir::failure();

  {
    ::llvm::StringRef attrStr;
    ::mlir::NamedAttrList attrStorage;
    auto loc = parser.getCurrentLocation();
    if (parser.parseOptionalKeyword(&attrStr, {"innerparallel","innerreduction"})) {
      ::mlir::StringAttr attrVal;
      ::mlir::OptionalParseResult parseResult =
        parser.parseOptionalAttribute(attrVal,
                                      parser.getBuilder().getNoneType(),
                                      "lowering_strategy", attrStorage);
      if (parseResult.has_value()) {
        if (failed(*parseResult))
          return ::mlir::failure();
        attrStr = attrVal.getValue();
      } else {
        return parser.emitError(loc, "expected string or keyword containing one of the following enum values for attribute 'lowering_strategy' [innerparallel, innerreduction]");
      }
    }
    if (!attrStr.empty()) {
      auto attrOptional = ::mlir::vector::symbolizeVectorMultiReductionLowering(attrStr);
      if (!attrOptional)
        return parser.emitError(loc, "invalid ")
               << "lowering_strategy attribute specification: \"" << attrStr << '"';;

      lowering_strategyAttr = ::mlir::vector::VectorMultiReductionLoweringAttr::get(parser.getBuilder().getContext(), *attrOptional);
        result.getOrAddProperties<ApplyMultiReductionUnrollingPatternsOp::Properties>().lowering_strategy = lowering_strategyAttr;
    }
  }
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyMultiReductionUnrollingPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getLoweringStrategyAttr() != ::mlir::vector::VectorMultiReductionLoweringAttr::get(::mlir::OpBuilder((*this)->getContext()).getContext(), vector::VectorMultiReductionLowering::InnerParallel)) {
    _odsPrinter << ' ' << "lowering_strategy";
    _odsPrinter << ' ' << "=";
    _odsPrinter << ' ';

    {
      auto caseValue = getLoweringStrategy();
      auto caseValueStr = stringifyVectorMultiReductionLowering(caseValue);
      _odsPrinter << caseValueStr;
    }
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("lowering_strategy");
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getLoweringStrategyAttr();
     if(attr && (attr == ::mlir::vector::VectorMultiReductionLoweringAttr::get(odsBuilder.getContext(), vector::VectorMultiReductionLowering::InnerParallel)))
       elidedAttrs.push_back("lowering_strategy");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyMultiReductionUnrollingPatternsOp)
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::detail::ApplyMultiReductionUnrollingPatternsOpGenericAdaptorBase::Properties)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyRankReducingSubviewPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyRankReducingSubviewPatternsOpGenericAdaptorBase::ApplyRankReducingSubviewPatternsOpGenericAdaptorBase(ApplyRankReducingSubviewPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyRankReducingSubviewPatternsOpAdaptor::ApplyRankReducingSubviewPatternsOpAdaptor(ApplyRankReducingSubviewPatternsOp op) : ApplyRankReducingSubviewPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyRankReducingSubviewPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyRankReducingSubviewPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyRankReducingSubviewPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyRankReducingSubviewPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyRankReducingSubviewPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyRankReducingSubviewPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyRankReducingSubviewPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyRankReducingSubviewPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyRankReducingSubviewPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyRankReducingSubviewPatternsOp ApplyRankReducingSubviewPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyRankReducingSubviewPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyRankReducingSubviewPatternsOp ApplyRankReducingSubviewPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyRankReducingSubviewPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyRankReducingSubviewPatternsOp ApplyRankReducingSubviewPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyRankReducingSubviewPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyRankReducingSubviewPatternsOp ApplyRankReducingSubviewPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyRankReducingSubviewPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyRankReducingSubviewPatternsOp ApplyRankReducingSubviewPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyRankReducingSubviewPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyRankReducingSubviewPatternsOp ApplyRankReducingSubviewPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyRankReducingSubviewPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyRankReducingSubviewPatternsOp ApplyRankReducingSubviewPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyRankReducingSubviewPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyRankReducingSubviewPatternsOp ApplyRankReducingSubviewPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyRankReducingSubviewPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyRankReducingSubviewPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyRankReducingSubviewPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyRankReducingSubviewPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyRankReducingSubviewPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyReorderMultiReductionPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyReorderMultiReductionPatternsOpGenericAdaptorBase::ApplyReorderMultiReductionPatternsOpGenericAdaptorBase(ApplyReorderMultiReductionPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::vector::VectorMultiReductionLoweringAttr ApplyReorderMultiReductionPatternsOpGenericAdaptorBase::getLoweringStrategyAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::vector::VectorMultiReductionLoweringAttr>(getProperties().lowering_strategy);
  return attr;
}

::mlir::vector::VectorMultiReductionLowering ApplyReorderMultiReductionPatternsOpGenericAdaptorBase::getLoweringStrategy() {
  auto attr = getLoweringStrategyAttr();
  return attr.getValue();
}


} // namespace detail
ApplyReorderMultiReductionPatternsOpAdaptor::ApplyReorderMultiReductionPatternsOpAdaptor(ApplyReorderMultiReductionPatternsOp op) : ApplyReorderMultiReductionPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyReorderMultiReductionPatternsOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_lowering_strategy = getProperties().lowering_strategy; (void)tblgen_lowering_strategy;

  if (tblgen_lowering_strategy && !((::llvm::isa<::mlir::vector::VectorMultiReductionLoweringAttr>(tblgen_lowering_strategy))))
    return emitError(loc, "'transform.apply_patterns.vector.reorder_multi_reduction_dims' op attribute 'lowering_strategy' failed to satisfy constraint: control the lowering of `vector.multi_reduction`.");
  return ::mlir::success();
}

::llvm::LogicalResult ApplyReorderMultiReductionPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.lowering_strategy;
       auto attr = dict.get("lowering_strategy");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `lowering_strategy` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ApplyReorderMultiReductionPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.lowering_strategy;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("lowering_strategy",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyReorderMultiReductionPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.lowering_strategy.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ApplyReorderMultiReductionPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "lowering_strategy")
      return prop.lowering_strategy;
  return std::nullopt;
}

void ApplyReorderMultiReductionPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "lowering_strategy") {
       prop.lowering_strategy = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.lowering_strategy)>>(value);
       return;
    }
}

void ApplyReorderMultiReductionPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.lowering_strategy) attrs.append("lowering_strategy", prop.lowering_strategy);
}

::llvm::LogicalResult ApplyReorderMultiReductionPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getLoweringStrategyAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps6(attr, "lowering_strategy", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ApplyReorderMultiReductionPatternsOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.lowering_strategy)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ApplyReorderMultiReductionPatternsOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.lowering_strategy);
}

::mlir::vector::VectorMultiReductionLowering ApplyReorderMultiReductionPatternsOp::getLoweringStrategy() {
  auto attr = getLoweringStrategyAttr();
  return attr.getValue();
}

void ApplyReorderMultiReductionPatternsOp::setLoweringStrategy(::mlir::vector::VectorMultiReductionLowering attrValue) {
  getProperties().lowering_strategy = ::mlir::vector::VectorMultiReductionLoweringAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue);
}

void ApplyReorderMultiReductionPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  if (lowering_strategy) {
    odsState.getOrAddProperties<Properties>().lowering_strategy = lowering_strategy;
  }
}

ApplyReorderMultiReductionPatternsOp ApplyReorderMultiReductionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(lowering_strategy)>(lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyReorderMultiReductionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyReorderMultiReductionPatternsOp ApplyReorderMultiReductionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(lowering_strategy)>(lowering_strategy));
}

void ApplyReorderMultiReductionPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  if (lowering_strategy) {
    odsState.getOrAddProperties<Properties>().lowering_strategy = lowering_strategy;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyReorderMultiReductionPatternsOp ApplyReorderMultiReductionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyReorderMultiReductionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyReorderMultiReductionPatternsOp ApplyReorderMultiReductionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy));
}

void ApplyReorderMultiReductionPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  odsState.getOrAddProperties<Properties>().lowering_strategy = ::mlir::vector::VectorMultiReductionLoweringAttr::get(odsBuilder.getContext(), lowering_strategy);
}

ApplyReorderMultiReductionPatternsOp ApplyReorderMultiReductionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(lowering_strategy)>(lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyReorderMultiReductionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyReorderMultiReductionPatternsOp ApplyReorderMultiReductionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(lowering_strategy)>(lowering_strategy));
}

void ApplyReorderMultiReductionPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  odsState.getOrAddProperties<Properties>().lowering_strategy = ::mlir::vector::VectorMultiReductionLoweringAttr::get(odsBuilder.getContext(), lowering_strategy);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyReorderMultiReductionPatternsOp ApplyReorderMultiReductionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplyReorderMultiReductionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyReorderMultiReductionPatternsOp ApplyReorderMultiReductionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorMultiReductionLowering lowering_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(lowering_strategy)>(lowering_strategy));
}

void ApplyReorderMultiReductionPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    (void)odsState.getOrAddProperties<ApplyReorderMultiReductionPatternsOp::Properties>();
    ::mlir::PropertyRef properties = odsState.getRawProperties();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ApplyReorderMultiReductionPatternsOp ApplyReorderMultiReductionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyReorderMultiReductionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyReorderMultiReductionPatternsOp ApplyReorderMultiReductionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyReorderMultiReductionPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyReorderMultiReductionPatternsOp ApplyReorderMultiReductionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyReorderMultiReductionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyReorderMultiReductionPatternsOp ApplyReorderMultiReductionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

void ApplyReorderMultiReductionPatternsOp::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.lowering_strategy)
    properties.lowering_strategy = ::mlir::vector::VectorMultiReductionLoweringAttr::get(odsBuilder.getContext(), vector::VectorMultiReductionLowering::InnerParallel);
}

::llvm::LogicalResult ApplyReorderMultiReductionPatternsOp::verifyInvariantsImpl() {
  auto tblgen_lowering_strategy = getProperties().lowering_strategy; (void)tblgen_lowering_strategy;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps6(*this, tblgen_lowering_strategy, "lowering_strategy")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult ApplyReorderMultiReductionPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyReorderMultiReductionPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::vector::VectorMultiReductionLoweringAttr lowering_strategyAttr;
  if (::mlir::succeeded(parser.parseOptionalKeyword("lowering_strategy"))) {
  if (parser.parseEqual())
    return ::mlir::failure();

  {
    ::llvm::StringRef attrStr;
    ::mlir::NamedAttrList attrStorage;
    auto loc = parser.getCurrentLocation();
    if (parser.parseOptionalKeyword(&attrStr, {"innerparallel","innerreduction"})) {
      ::mlir::StringAttr attrVal;
      ::mlir::OptionalParseResult parseResult =
        parser.parseOptionalAttribute(attrVal,
                                      parser.getBuilder().getNoneType(),
                                      "lowering_strategy", attrStorage);
      if (parseResult.has_value()) {
        if (failed(*parseResult))
          return ::mlir::failure();
        attrStr = attrVal.getValue();
      } else {
        return parser.emitError(loc, "expected string or keyword containing one of the following enum values for attribute 'lowering_strategy' [innerparallel, innerreduction]");
      }
    }
    if (!attrStr.empty()) {
      auto attrOptional = ::mlir::vector::symbolizeVectorMultiReductionLowering(attrStr);
      if (!attrOptional)
        return parser.emitError(loc, "invalid ")
               << "lowering_strategy attribute specification: \"" << attrStr << '"';;

      lowering_strategyAttr = ::mlir::vector::VectorMultiReductionLoweringAttr::get(parser.getBuilder().getContext(), *attrOptional);
        result.getOrAddProperties<ApplyReorderMultiReductionPatternsOp::Properties>().lowering_strategy = lowering_strategyAttr;
    }
  }
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyReorderMultiReductionPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getLoweringStrategyAttr() != ::mlir::vector::VectorMultiReductionLoweringAttr::get(::mlir::OpBuilder((*this)->getContext()).getContext(), vector::VectorMultiReductionLowering::InnerParallel)) {
    _odsPrinter << ' ' << "lowering_strategy";
    _odsPrinter << ' ' << "=";
    _odsPrinter << ' ';

    {
      auto caseValue = getLoweringStrategy();
      auto caseValueStr = stringifyVectorMultiReductionLowering(caseValue);
      _odsPrinter << caseValueStr;
    }
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("lowering_strategy");
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getLoweringStrategyAttr();
     if(attr && (attr == ::mlir::vector::VectorMultiReductionLoweringAttr::get(odsBuilder.getContext(), vector::VectorMultiReductionLowering::InnerParallel)))
       elidedAttrs.push_back("lowering_strategy");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyReorderMultiReductionPatternsOp)
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::detail::ApplyReorderMultiReductionPatternsOpGenericAdaptorBase::Properties)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyRewriteNarrowTypePatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyRewriteNarrowTypePatternsOpGenericAdaptorBase::ApplyRewriteNarrowTypePatternsOpGenericAdaptorBase(ApplyRewriteNarrowTypePatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyRewriteNarrowTypePatternsOpAdaptor::ApplyRewriteNarrowTypePatternsOpAdaptor(ApplyRewriteNarrowTypePatternsOp op) : ApplyRewriteNarrowTypePatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyRewriteNarrowTypePatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyRewriteNarrowTypePatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyRewriteNarrowTypePatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyRewriteNarrowTypePatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyRewriteNarrowTypePatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyRewriteNarrowTypePatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyRewriteNarrowTypePatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyRewriteNarrowTypePatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyRewriteNarrowTypePatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyRewriteNarrowTypePatternsOp ApplyRewriteNarrowTypePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyRewriteNarrowTypePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyRewriteNarrowTypePatternsOp ApplyRewriteNarrowTypePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyRewriteNarrowTypePatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyRewriteNarrowTypePatternsOp ApplyRewriteNarrowTypePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyRewriteNarrowTypePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyRewriteNarrowTypePatternsOp ApplyRewriteNarrowTypePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyRewriteNarrowTypePatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyRewriteNarrowTypePatternsOp ApplyRewriteNarrowTypePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyRewriteNarrowTypePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyRewriteNarrowTypePatternsOp ApplyRewriteNarrowTypePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyRewriteNarrowTypePatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyRewriteNarrowTypePatternsOp ApplyRewriteNarrowTypePatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyRewriteNarrowTypePatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyRewriteNarrowTypePatternsOp ApplyRewriteNarrowTypePatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyRewriteNarrowTypePatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyRewriteNarrowTypePatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyRewriteNarrowTypePatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyRewriteNarrowTypePatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyRewriteNarrowTypePatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplySinkVectorMemPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplySinkVectorMemPatternsOpGenericAdaptorBase::ApplySinkVectorMemPatternsOpGenericAdaptorBase(ApplySinkVectorMemPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplySinkVectorMemPatternsOpAdaptor::ApplySinkVectorMemPatternsOpAdaptor(ApplySinkVectorMemPatternsOp op) : ApplySinkVectorMemPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplySinkVectorMemPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplySinkVectorMemPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplySinkVectorMemPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplySinkVectorMemPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplySinkVectorMemPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplySinkVectorMemPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplySinkVectorMemPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplySinkVectorMemPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplySinkVectorMemPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplySinkVectorMemPatternsOp ApplySinkVectorMemPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplySinkVectorMemPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplySinkVectorMemPatternsOp ApplySinkVectorMemPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplySinkVectorMemPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplySinkVectorMemPatternsOp ApplySinkVectorMemPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplySinkVectorMemPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplySinkVectorMemPatternsOp ApplySinkVectorMemPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplySinkVectorMemPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplySinkVectorMemPatternsOp ApplySinkVectorMemPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplySinkVectorMemPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplySinkVectorMemPatternsOp ApplySinkVectorMemPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplySinkVectorMemPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplySinkVectorMemPatternsOp ApplySinkVectorMemPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplySinkVectorMemPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplySinkVectorMemPatternsOp ApplySinkVectorMemPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplySinkVectorMemPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplySinkVectorMemPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplySinkVectorMemPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplySinkVectorMemPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplySinkVectorMemPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplySinkVectorPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplySinkVectorPatternsOpGenericAdaptorBase::ApplySinkVectorPatternsOpGenericAdaptorBase(ApplySinkVectorPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplySinkVectorPatternsOpAdaptor::ApplySinkVectorPatternsOpAdaptor(ApplySinkVectorPatternsOp op) : ApplySinkVectorPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplySinkVectorPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplySinkVectorPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplySinkVectorPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplySinkVectorPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplySinkVectorPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplySinkVectorPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplySinkVectorPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplySinkVectorPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplySinkVectorPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplySinkVectorPatternsOp ApplySinkVectorPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplySinkVectorPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplySinkVectorPatternsOp ApplySinkVectorPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplySinkVectorPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplySinkVectorPatternsOp ApplySinkVectorPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplySinkVectorPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplySinkVectorPatternsOp ApplySinkVectorPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplySinkVectorPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplySinkVectorPatternsOp ApplySinkVectorPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplySinkVectorPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplySinkVectorPatternsOp ApplySinkVectorPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplySinkVectorPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplySinkVectorPatternsOp ApplySinkVectorPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplySinkVectorPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplySinkVectorPatternsOp ApplySinkVectorPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplySinkVectorPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplySinkVectorPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplySinkVectorPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplySinkVectorPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplySinkVectorPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplySplitTransferFullPartialPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplySplitTransferFullPartialPatternsOpGenericAdaptorBase::ApplySplitTransferFullPartialPatternsOpGenericAdaptorBase(ApplySplitTransferFullPartialPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::vector::VectorTransferSplitAttr ApplySplitTransferFullPartialPatternsOpGenericAdaptorBase::getSplitTransferStrategyAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::vector::VectorTransferSplitAttr>(getProperties().split_transfer_strategy);
  return attr;
}

::mlir::vector::VectorTransferSplit ApplySplitTransferFullPartialPatternsOpGenericAdaptorBase::getSplitTransferStrategy() {
  auto attr = getSplitTransferStrategyAttr();
  return attr.getValue();
}


} // namespace detail
ApplySplitTransferFullPartialPatternsOpAdaptor::ApplySplitTransferFullPartialPatternsOpAdaptor(ApplySplitTransferFullPartialPatternsOp op) : ApplySplitTransferFullPartialPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplySplitTransferFullPartialPatternsOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_split_transfer_strategy = getProperties().split_transfer_strategy; (void)tblgen_split_transfer_strategy;

  if (tblgen_split_transfer_strategy && !((::llvm::isa<::mlir::vector::VectorTransferSplitAttr>(tblgen_split_transfer_strategy))))
    return emitError(loc, "'transform.apply_patterns.vector.split_transfer_full_partial' op attribute 'split_transfer_strategy' failed to satisfy constraint: control the splitting of `vector.transfer` operations into in-bounds and out-of-bounds variants.");
  return ::mlir::success();
}

::llvm::LogicalResult ApplySplitTransferFullPartialPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.split_transfer_strategy;
       auto attr = dict.get("split_transfer_strategy");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `split_transfer_strategy` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ApplySplitTransferFullPartialPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.split_transfer_strategy;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("split_transfer_strategy",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplySplitTransferFullPartialPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.split_transfer_strategy.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ApplySplitTransferFullPartialPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "split_transfer_strategy")
      return prop.split_transfer_strategy;
  return std::nullopt;
}

void ApplySplitTransferFullPartialPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "split_transfer_strategy") {
       prop.split_transfer_strategy = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.split_transfer_strategy)>>(value);
       return;
    }
}

void ApplySplitTransferFullPartialPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.split_transfer_strategy) attrs.append("split_transfer_strategy", prop.split_transfer_strategy);
}

::llvm::LogicalResult ApplySplitTransferFullPartialPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getSplitTransferStrategyAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps7(attr, "split_transfer_strategy", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ApplySplitTransferFullPartialPatternsOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.split_transfer_strategy)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ApplySplitTransferFullPartialPatternsOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.split_transfer_strategy);
}

::mlir::vector::VectorTransferSplit ApplySplitTransferFullPartialPatternsOp::getSplitTransferStrategy() {
  auto attr = getSplitTransferStrategyAttr();
  return attr.getValue();
}

void ApplySplitTransferFullPartialPatternsOp::setSplitTransferStrategy(::mlir::vector::VectorTransferSplit attrValue) {
  getProperties().split_transfer_strategy = ::mlir::vector::VectorTransferSplitAttr::get(::mlir::Builder((*this)->getContext()).getContext(), attrValue);
}

void ApplySplitTransferFullPartialPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::vector::VectorTransferSplitAttr split_transfer_strategy) {
  if (split_transfer_strategy) {
    odsState.getOrAddProperties<Properties>().split_transfer_strategy = split_transfer_strategy;
  }
}

ApplySplitTransferFullPartialPatternsOp ApplySplitTransferFullPartialPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::vector::VectorTransferSplitAttr split_transfer_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(split_transfer_strategy)>(split_transfer_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplySplitTransferFullPartialPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplySplitTransferFullPartialPatternsOp ApplySplitTransferFullPartialPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::vector::VectorTransferSplitAttr split_transfer_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(split_transfer_strategy)>(split_transfer_strategy));
}

void ApplySplitTransferFullPartialPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorTransferSplitAttr split_transfer_strategy) {
  if (split_transfer_strategy) {
    odsState.getOrAddProperties<Properties>().split_transfer_strategy = split_transfer_strategy;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplySplitTransferFullPartialPatternsOp ApplySplitTransferFullPartialPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorTransferSplitAttr split_transfer_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(split_transfer_strategy)>(split_transfer_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplySplitTransferFullPartialPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplySplitTransferFullPartialPatternsOp ApplySplitTransferFullPartialPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorTransferSplitAttr split_transfer_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(split_transfer_strategy)>(split_transfer_strategy));
}

void ApplySplitTransferFullPartialPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::vector::VectorTransferSplit split_transfer_strategy) {
  odsState.getOrAddProperties<Properties>().split_transfer_strategy = ::mlir::vector::VectorTransferSplitAttr::get(odsBuilder.getContext(), split_transfer_strategy);
}

ApplySplitTransferFullPartialPatternsOp ApplySplitTransferFullPartialPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::vector::VectorTransferSplit split_transfer_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(split_transfer_strategy)>(split_transfer_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplySplitTransferFullPartialPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplySplitTransferFullPartialPatternsOp ApplySplitTransferFullPartialPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::vector::VectorTransferSplit split_transfer_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(split_transfer_strategy)>(split_transfer_strategy));
}

void ApplySplitTransferFullPartialPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorTransferSplit split_transfer_strategy) {
  odsState.getOrAddProperties<Properties>().split_transfer_strategy = ::mlir::vector::VectorTransferSplitAttr::get(odsBuilder.getContext(), split_transfer_strategy);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplySplitTransferFullPartialPatternsOp ApplySplitTransferFullPartialPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorTransferSplit split_transfer_strategy) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(split_transfer_strategy)>(split_transfer_strategy));
  auto __res__ = ::llvm::dyn_cast<ApplySplitTransferFullPartialPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplySplitTransferFullPartialPatternsOp ApplySplitTransferFullPartialPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::vector::VectorTransferSplit split_transfer_strategy) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(split_transfer_strategy)>(split_transfer_strategy));
}

void ApplySplitTransferFullPartialPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    (void)odsState.getOrAddProperties<ApplySplitTransferFullPartialPatternsOp::Properties>();
    ::mlir::PropertyRef properties = odsState.getRawProperties();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ApplySplitTransferFullPartialPatternsOp ApplySplitTransferFullPartialPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplySplitTransferFullPartialPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplySplitTransferFullPartialPatternsOp ApplySplitTransferFullPartialPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplySplitTransferFullPartialPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplySplitTransferFullPartialPatternsOp ApplySplitTransferFullPartialPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplySplitTransferFullPartialPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplySplitTransferFullPartialPatternsOp ApplySplitTransferFullPartialPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

void ApplySplitTransferFullPartialPatternsOp::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.split_transfer_strategy)
    properties.split_transfer_strategy = ::mlir::vector::VectorTransferSplitAttr::get(odsBuilder.getContext(), vector::VectorTransferSplit::LinalgCopy);
}

::llvm::LogicalResult ApplySplitTransferFullPartialPatternsOp::verifyInvariantsImpl() {
  auto tblgen_split_transfer_strategy = getProperties().split_transfer_strategy; (void)tblgen_split_transfer_strategy;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps7(*this, tblgen_split_transfer_strategy, "split_transfer_strategy")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult ApplySplitTransferFullPartialPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplySplitTransferFullPartialPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::vector::VectorTransferSplitAttr split_transfer_strategyAttr;
  if (::mlir::succeeded(parser.parseOptionalKeyword("split_transfer_strategy"))) {
  if (parser.parseEqual())
    return ::mlir::failure();

  {
    ::llvm::StringRef attrStr;
    ::mlir::NamedAttrList attrStorage;
    auto loc = parser.getCurrentLocation();
    if (parser.parseOptionalKeyword(&attrStr, {"none"})) {
      ::mlir::StringAttr attrVal;
      ::mlir::OptionalParseResult parseResult =
        parser.parseOptionalAttribute(attrVal,
                                      parser.getBuilder().getNoneType(),
                                      "split_transfer_strategy", attrStorage);
      if (parseResult.has_value()) {
        if (failed(*parseResult))
          return ::mlir::failure();
        attrStr = attrVal.getValue();
      } else {
        return parser.emitError(loc, "expected string or keyword containing one of the following enum values for attribute 'split_transfer_strategy' [none, vector-transfer, linalg-copy, force-in-bounds]");
      }
    }
    if (!attrStr.empty()) {
      auto attrOptional = ::mlir::vector::symbolizeVectorTransferSplit(attrStr);
      if (!attrOptional)
        return parser.emitError(loc, "invalid ")
               << "split_transfer_strategy attribute specification: \"" << attrStr << '"';;

      split_transfer_strategyAttr = ::mlir::vector::VectorTransferSplitAttr::get(parser.getBuilder().getContext(), *attrOptional);
        result.getOrAddProperties<ApplySplitTransferFullPartialPatternsOp::Properties>().split_transfer_strategy = split_transfer_strategyAttr;
    }
  }
  }
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplySplitTransferFullPartialPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (getSplitTransferStrategyAttr() != ::mlir::vector::VectorTransferSplitAttr::get(::mlir::OpBuilder((*this)->getContext()).getContext(), vector::VectorTransferSplit::LinalgCopy)) {
    _odsPrinter << ' ' << "split_transfer_strategy";
    _odsPrinter << ' ' << "=";
    _odsPrinter << ' ';

    {
      auto caseValue = getSplitTransferStrategy();
      auto caseValueStr = stringifyVectorTransferSplit(caseValue);
      switch (caseValue) {
      case ::mlir::vector::VectorTransferSplit::None:
        _odsPrinter << caseValueStr;
        break;
      default:
        _odsPrinter << '"' << caseValueStr << '"';
        break;
      }
    }
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("split_transfer_strategy");
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getSplitTransferStrategyAttr();
     if(attr && (attr == ::mlir::vector::VectorTransferSplitAttr::get(odsBuilder.getContext(), vector::VectorTransferSplit::LinalgCopy)))
       elidedAttrs.push_back("split_transfer_strategy");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplySplitTransferFullPartialPatternsOp)
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::detail::ApplySplitTransferFullPartialPatternsOpGenericAdaptorBase::Properties)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyTransferPermutationPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyTransferPermutationPatternsOpGenericAdaptorBase::ApplyTransferPermutationPatternsOpGenericAdaptorBase(ApplyTransferPermutationPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyTransferPermutationPatternsOpAdaptor::ApplyTransferPermutationPatternsOpAdaptor(ApplyTransferPermutationPatternsOp op) : ApplyTransferPermutationPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyTransferPermutationPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyTransferPermutationPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyTransferPermutationPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyTransferPermutationPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyTransferPermutationPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyTransferPermutationPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyTransferPermutationPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyTransferPermutationPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyTransferPermutationPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyTransferPermutationPatternsOp ApplyTransferPermutationPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyTransferPermutationPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyTransferPermutationPatternsOp ApplyTransferPermutationPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyTransferPermutationPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyTransferPermutationPatternsOp ApplyTransferPermutationPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyTransferPermutationPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyTransferPermutationPatternsOp ApplyTransferPermutationPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyTransferPermutationPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyTransferPermutationPatternsOp ApplyTransferPermutationPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyTransferPermutationPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyTransferPermutationPatternsOp ApplyTransferPermutationPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyTransferPermutationPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyTransferPermutationPatternsOp ApplyTransferPermutationPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyTransferPermutationPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyTransferPermutationPatternsOp ApplyTransferPermutationPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyTransferPermutationPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyTransferPermutationPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyTransferPermutationPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyTransferPermutationPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyTransferPermutationPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyTransferToScfPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyTransferToScfPatternsOpGenericAdaptorBase::ApplyTransferToScfPatternsOpGenericAdaptorBase(ApplyTransferToScfPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::IntegerAttr ApplyTransferToScfPatternsOpGenericAdaptorBase::getMaxTransferRankAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::IntegerAttr>(getProperties().max_transfer_rank);
  return attr;
}

uint64_t ApplyTransferToScfPatternsOpGenericAdaptorBase::getMaxTransferRank() {
  auto attr = getMaxTransferRankAttr();
  return attr.getValue().getZExtValue();
}

::mlir::BoolAttr ApplyTransferToScfPatternsOpGenericAdaptorBase::getFullUnrollAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().full_unroll);
  return attr;
}

bool ApplyTransferToScfPatternsOpGenericAdaptorBase::getFullUnroll() {
  auto attr = getFullUnrollAttr();
  return attr.getValue();
}


} // namespace detail
ApplyTransferToScfPatternsOpAdaptor::ApplyTransferToScfPatternsOpAdaptor(ApplyTransferToScfPatternsOp op) : ApplyTransferToScfPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyTransferToScfPatternsOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_full_unroll = getProperties().full_unroll; (void)tblgen_full_unroll;
  auto tblgen_max_transfer_rank = getProperties().max_transfer_rank; (void)tblgen_max_transfer_rank;

  if (tblgen_max_transfer_rank && !(((::llvm::isa<::mlir::IntegerAttr>(tblgen_max_transfer_rank))) && ((::llvm::cast<::mlir::IntegerAttr>(tblgen_max_transfer_rank).getType().isSignlessInteger(64)))))
    return emitError(loc, "'transform.apply_patterns.vector.transfer_to_scf' op attribute 'max_transfer_rank' failed to satisfy constraint: 64-bit signless integer attribute");

  if (tblgen_full_unroll && !((::llvm::isa<::mlir::BoolAttr>(tblgen_full_unroll))))
    return emitError(loc, "'transform.apply_patterns.vector.transfer_to_scf' op attribute 'full_unroll' failed to satisfy constraint: bool attribute");
  return ::mlir::success();
}

::llvm::LogicalResult ApplyTransferToScfPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.full_unroll;
       auto attr = dict.get("full_unroll");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `full_unroll` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.max_transfer_rank;
       auto attr = dict.get("max_transfer_rank");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `max_transfer_rank` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ApplyTransferToScfPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.full_unroll;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("full_unroll",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.max_transfer_rank;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("max_transfer_rank",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyTransferToScfPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.full_unroll.getAsOpaquePointer()), 
    llvm::hash_value(prop.max_transfer_rank.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ApplyTransferToScfPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "full_unroll")
      return prop.full_unroll;

    if (name == "max_transfer_rank")
      return prop.max_transfer_rank;
  return std::nullopt;
}

void ApplyTransferToScfPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "full_unroll") {
       prop.full_unroll = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.full_unroll)>>(value);
       return;
    }

    if (name == "max_transfer_rank") {
       prop.max_transfer_rank = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.max_transfer_rank)>>(value);
       return;
    }
}

void ApplyTransferToScfPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.full_unroll) attrs.append("full_unroll", prop.full_unroll);

    if (prop.max_transfer_rank) attrs.append("max_transfer_rank", prop.max_transfer_rank);
}

::llvm::LogicalResult ApplyTransferToScfPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getFullUnrollAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps5(attr, "full_unroll", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getMaxTransferRankAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps3(attr, "max_transfer_rank", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ApplyTransferToScfPatternsOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.full_unroll)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.max_transfer_rank)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ApplyTransferToScfPatternsOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.full_unroll);

  writer.writeOptionalAttribute(prop.max_transfer_rank);
}

uint64_t ApplyTransferToScfPatternsOp::getMaxTransferRank() {
  auto attr = getMaxTransferRankAttr();
  return attr.getValue().getZExtValue();
}

bool ApplyTransferToScfPatternsOp::getFullUnroll() {
  auto attr = getFullUnrollAttr();
  return attr.getValue();
}

void ApplyTransferToScfPatternsOp::setMaxTransferRank(uint64_t attrValue) {
  getProperties().max_transfer_rank = ::mlir::Builder((*this)->getContext()).getIntegerAttr(::mlir::Builder((*this)->getContext()).getIntegerType(64), attrValue);
}

void ApplyTransferToScfPatternsOp::setFullUnroll(bool attrValue) {
  getProperties().full_unroll = ::mlir::Builder((*this)->getContext()).getBoolAttr(attrValue);
}

void ApplyTransferToScfPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::IntegerAttr max_transfer_rank, ::mlir::BoolAttr full_unroll) {
  if (max_transfer_rank) {
    odsState.getOrAddProperties<Properties>().max_transfer_rank = max_transfer_rank;
  }
  if (full_unroll) {
    odsState.getOrAddProperties<Properties>().full_unroll = full_unroll;
  }
}

ApplyTransferToScfPatternsOp ApplyTransferToScfPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::IntegerAttr max_transfer_rank, ::mlir::BoolAttr full_unroll) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(max_transfer_rank)>(max_transfer_rank), std::forward<decltype(full_unroll)>(full_unroll));
  auto __res__ = ::llvm::dyn_cast<ApplyTransferToScfPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyTransferToScfPatternsOp ApplyTransferToScfPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::IntegerAttr max_transfer_rank, ::mlir::BoolAttr full_unroll) {
  return create(builder, builder.getLoc(), std::forward<decltype(max_transfer_rank)>(max_transfer_rank), std::forward<decltype(full_unroll)>(full_unroll));
}

void ApplyTransferToScfPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr max_transfer_rank, ::mlir::BoolAttr full_unroll) {
  if (max_transfer_rank) {
    odsState.getOrAddProperties<Properties>().max_transfer_rank = max_transfer_rank;
  }
  if (full_unroll) {
    odsState.getOrAddProperties<Properties>().full_unroll = full_unroll;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyTransferToScfPatternsOp ApplyTransferToScfPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr max_transfer_rank, ::mlir::BoolAttr full_unroll) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(max_transfer_rank)>(max_transfer_rank), std::forward<decltype(full_unroll)>(full_unroll));
  auto __res__ = ::llvm::dyn_cast<ApplyTransferToScfPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyTransferToScfPatternsOp ApplyTransferToScfPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::IntegerAttr max_transfer_rank, ::mlir::BoolAttr full_unroll) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(max_transfer_rank)>(max_transfer_rank), std::forward<decltype(full_unroll)>(full_unroll));
}

void ApplyTransferToScfPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, uint64_t max_transfer_rank, bool full_unroll) {
  odsState.getOrAddProperties<Properties>().max_transfer_rank = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(64), max_transfer_rank);
  odsState.getOrAddProperties<Properties>().full_unroll = odsBuilder.getBoolAttr(full_unroll);
}

ApplyTransferToScfPatternsOp ApplyTransferToScfPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, uint64_t max_transfer_rank, bool full_unroll) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(max_transfer_rank)>(max_transfer_rank), std::forward<decltype(full_unroll)>(full_unroll));
  auto __res__ = ::llvm::dyn_cast<ApplyTransferToScfPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyTransferToScfPatternsOp ApplyTransferToScfPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, uint64_t max_transfer_rank, bool full_unroll) {
  return create(builder, builder.getLoc(), std::forward<decltype(max_transfer_rank)>(max_transfer_rank), std::forward<decltype(full_unroll)>(full_unroll));
}

void ApplyTransferToScfPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, uint64_t max_transfer_rank, bool full_unroll) {
  odsState.getOrAddProperties<Properties>().max_transfer_rank = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(64), max_transfer_rank);
  odsState.getOrAddProperties<Properties>().full_unroll = odsBuilder.getBoolAttr(full_unroll);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyTransferToScfPatternsOp ApplyTransferToScfPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, uint64_t max_transfer_rank, bool full_unroll) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(max_transfer_rank)>(max_transfer_rank), std::forward<decltype(full_unroll)>(full_unroll));
  auto __res__ = ::llvm::dyn_cast<ApplyTransferToScfPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyTransferToScfPatternsOp ApplyTransferToScfPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, uint64_t max_transfer_rank, bool full_unroll) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(max_transfer_rank)>(max_transfer_rank), std::forward<decltype(full_unroll)>(full_unroll));
}

void ApplyTransferToScfPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    (void)odsState.getOrAddProperties<ApplyTransferToScfPatternsOp::Properties>();
    ::mlir::PropertyRef properties = odsState.getRawProperties();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ApplyTransferToScfPatternsOp ApplyTransferToScfPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyTransferToScfPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyTransferToScfPatternsOp ApplyTransferToScfPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyTransferToScfPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyTransferToScfPatternsOp ApplyTransferToScfPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyTransferToScfPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyTransferToScfPatternsOp ApplyTransferToScfPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

void ApplyTransferToScfPatternsOp::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.max_transfer_rank)
    properties.max_transfer_rank = odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(64), 1);
  if (!properties.full_unroll)
    properties.full_unroll = odsBuilder.getBoolAttr(false);
}

::llvm::LogicalResult ApplyTransferToScfPatternsOp::verifyInvariantsImpl() {
  auto tblgen_full_unroll = getProperties().full_unroll; (void)tblgen_full_unroll;
  auto tblgen_max_transfer_rank = getProperties().max_transfer_rank; (void)tblgen_max_transfer_rank;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps3(*this, tblgen_max_transfer_rank, "max_transfer_rank")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps5(*this, tblgen_full_unroll, "full_unroll")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult ApplyTransferToScfPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyTransferToScfPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  ::mlir::IntegerAttr max_transfer_rankAttr;
  ::mlir::BoolAttr full_unrollAttr;
  bool max_transfer_rankClause = false;
  bool full_unrollClause = false;
  while(true) {
if (succeeded(parser.parseOptionalKeyword("max_transfer_rank"))) {

  if (max_transfer_rankClause) {
    return parser.emitError(parser.getNameLoc())
          << "`max_transfer_rank` clause can appear at most once in the expansion of the "
             "oilist directive";
  }
  max_transfer_rankClause = true;
  if (parser.parseEqual())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(max_transfer_rankAttr, parser.getBuilder().getIntegerType(64))) {
    return ::mlir::failure();
  }
  if (max_transfer_rankAttr) result.getOrAddProperties<ApplyTransferToScfPatternsOp::Properties>().max_transfer_rank = max_transfer_rankAttr;
    } else if (succeeded(parser.parseOptionalKeyword("full_unroll"))) {

  if (full_unrollClause) {
    return parser.emitError(parser.getNameLoc())
          << "`full_unroll` clause can appear at most once in the expansion of the "
             "oilist directive";
  }
  full_unrollClause = true;
  if (parser.parseEqual())
    return ::mlir::failure();

  if (parser.parseCustomAttributeWithFallback(full_unrollAttr, parser.getBuilder().getIntegerType(1))) {
    return ::mlir::failure();
  }
  if (full_unrollAttr) result.getOrAddProperties<ApplyTransferToScfPatternsOp::Properties>().full_unroll = full_unrollAttr;
    } else  {
    break;
  }
}
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyTransferToScfPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  if (false || (getMaxTransferRankAttr() != ::mlir::OpBuilder((*this)->getContext()).getIntegerAttr(::mlir::OpBuilder((*this)->getContext()).getIntegerType(64), 1))) {
  _odsPrinter << ' ' << "max_transfer_rank";
  _odsPrinter << ' ' << "=";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getMaxTransferRankAttr());
  }
  if (false || (getFullUnrollAttr() != ::mlir::OpBuilder((*this)->getContext()).getBoolAttr(false))) {
  _odsPrinter << ' ' << "full_unroll";
  _odsPrinter << ' ' << "=";
  _odsPrinter << ' ';
  _odsPrinter.printAttributeWithoutType(getFullUnrollAttr());
  }
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  elidedAttrs.push_back("max_transfer_rank");
  elidedAttrs.push_back("full_unroll");
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getMaxTransferRankAttr();
     if(attr && (attr == odsBuilder.getIntegerAttr(odsBuilder.getIntegerType(64), 1)))
       elidedAttrs.push_back("max_transfer_rank");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getFullUnrollAttr();
     if(attr && (attr == odsBuilder.getBoolAttr(false)))
       elidedAttrs.push_back("full_unroll");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyTransferToScfPatternsOp)
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::detail::ApplyTransferToScfPatternsOpGenericAdaptorBase::Properties)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyUnrollFromElementsPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyUnrollFromElementsPatternsOpGenericAdaptorBase::ApplyUnrollFromElementsPatternsOpGenericAdaptorBase(ApplyUnrollFromElementsPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyUnrollFromElementsPatternsOpAdaptor::ApplyUnrollFromElementsPatternsOpAdaptor(ApplyUnrollFromElementsPatternsOp op) : ApplyUnrollFromElementsPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyUnrollFromElementsPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyUnrollFromElementsPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyUnrollFromElementsPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyUnrollFromElementsPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyUnrollFromElementsPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyUnrollFromElementsPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyUnrollFromElementsPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyUnrollFromElementsPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyUnrollFromElementsPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyUnrollFromElementsPatternsOp ApplyUnrollFromElementsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyUnrollFromElementsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyUnrollFromElementsPatternsOp ApplyUnrollFromElementsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyUnrollFromElementsPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyUnrollFromElementsPatternsOp ApplyUnrollFromElementsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyUnrollFromElementsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyUnrollFromElementsPatternsOp ApplyUnrollFromElementsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyUnrollFromElementsPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyUnrollFromElementsPatternsOp ApplyUnrollFromElementsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyUnrollFromElementsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyUnrollFromElementsPatternsOp ApplyUnrollFromElementsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyUnrollFromElementsPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyUnrollFromElementsPatternsOp ApplyUnrollFromElementsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyUnrollFromElementsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyUnrollFromElementsPatternsOp ApplyUnrollFromElementsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyUnrollFromElementsPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyUnrollFromElementsPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyUnrollFromElementsPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyUnrollFromElementsPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyUnrollFromElementsPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyUnrollToElementsPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyUnrollToElementsPatternsOpGenericAdaptorBase::ApplyUnrollToElementsPatternsOpGenericAdaptorBase(ApplyUnrollToElementsPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyUnrollToElementsPatternsOpAdaptor::ApplyUnrollToElementsPatternsOpAdaptor(ApplyUnrollToElementsPatternsOp op) : ApplyUnrollToElementsPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyUnrollToElementsPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyUnrollToElementsPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyUnrollToElementsPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyUnrollToElementsPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyUnrollToElementsPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyUnrollToElementsPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyUnrollToElementsPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyUnrollToElementsPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyUnrollToElementsPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyUnrollToElementsPatternsOp ApplyUnrollToElementsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyUnrollToElementsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyUnrollToElementsPatternsOp ApplyUnrollToElementsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyUnrollToElementsPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyUnrollToElementsPatternsOp ApplyUnrollToElementsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyUnrollToElementsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyUnrollToElementsPatternsOp ApplyUnrollToElementsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyUnrollToElementsPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyUnrollToElementsPatternsOp ApplyUnrollToElementsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyUnrollToElementsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyUnrollToElementsPatternsOp ApplyUnrollToElementsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyUnrollToElementsPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyUnrollToElementsPatternsOp ApplyUnrollToElementsPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyUnrollToElementsPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyUnrollToElementsPatternsOp ApplyUnrollToElementsPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyUnrollToElementsPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyUnrollToElementsPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyUnrollToElementsPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyUnrollToElementsPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyUnrollToElementsPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyVectorReductionToContractPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyVectorReductionToContractPatternsOpGenericAdaptorBase::ApplyVectorReductionToContractPatternsOpGenericAdaptorBase(ApplyVectorReductionToContractPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}


} // namespace detail
ApplyVectorReductionToContractPatternsOpAdaptor::ApplyVectorReductionToContractPatternsOpAdaptor(ApplyVectorReductionToContractPatternsOp op) : ApplyVectorReductionToContractPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyVectorReductionToContractPatternsOpAdaptor::verify(::mlir::Location loc) {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyVectorReductionToContractPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }
      return ::mlir::success();
}

::mlir::Attribute ApplyVectorReductionToContractPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyVectorReductionToContractPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine();
}

std::optional<mlir::Attribute> ApplyVectorReductionToContractPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
  return std::nullopt;
}

void ApplyVectorReductionToContractPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
}

void ApplyVectorReductionToContractPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
}

::llvm::LogicalResult ApplyVectorReductionToContractPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    return ::mlir::success();
}

void ApplyVectorReductionToContractPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState) {
}

ApplyVectorReductionToContractPatternsOp ApplyVectorReductionToContractPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__);
  auto __res__ = ::llvm::dyn_cast<ApplyVectorReductionToContractPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyVectorReductionToContractPatternsOp ApplyVectorReductionToContractPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder) {
  return create(builder, builder.getLoc());
}

void ApplyVectorReductionToContractPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes) {
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyVectorReductionToContractPatternsOp ApplyVectorReductionToContractPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes));
  auto __res__ = ::llvm::dyn_cast<ApplyVectorReductionToContractPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyVectorReductionToContractPatternsOp ApplyVectorReductionToContractPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes));
}

void ApplyVectorReductionToContractPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyVectorReductionToContractPatternsOp ApplyVectorReductionToContractPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyVectorReductionToContractPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyVectorReductionToContractPatternsOp ApplyVectorReductionToContractPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyVectorReductionToContractPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyVectorReductionToContractPatternsOp ApplyVectorReductionToContractPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyVectorReductionToContractPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyVectorReductionToContractPatternsOp ApplyVectorReductionToContractPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

::llvm::LogicalResult ApplyVectorReductionToContractPatternsOp::verifyInvariantsImpl() {
  return ::mlir::success();
}

::llvm::LogicalResult ApplyVectorReductionToContractPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyVectorReductionToContractPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyVectorReductionToContractPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyVectorReductionToContractPatternsOp)

namespace mlir::transform {


//===----------------------------------------------------------------------===//
// ::mlir::transform::ApplyVectorToLLVMConversionPatternsOp definitions
//===----------------------------------------------------------------------===//

namespace detail {

ApplyVectorToLLVMConversionPatternsOpGenericAdaptorBase::ApplyVectorToLLVMConversionPatternsOpGenericAdaptorBase(ApplyVectorToLLVMConversionPatternsOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}

::mlir::BoolAttr ApplyVectorToLLVMConversionPatternsOpGenericAdaptorBase::getReassociateFpReductionsAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().reassociate_fp_reductions);
  return attr;
}

bool ApplyVectorToLLVMConversionPatternsOpGenericAdaptorBase::getReassociateFpReductions() {
  auto attr = getReassociateFpReductionsAttr();
  return attr.getValue();
}

::mlir::BoolAttr ApplyVectorToLLVMConversionPatternsOpGenericAdaptorBase::getForce_32bitVectorIndicesAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().force_32bit_vector_indices);
  return attr;
}

bool ApplyVectorToLLVMConversionPatternsOpGenericAdaptorBase::getForce_32bitVectorIndices() {
  auto attr = getForce_32bitVectorIndicesAttr();
  return attr.getValue();
}

::mlir::BoolAttr ApplyVectorToLLVMConversionPatternsOpGenericAdaptorBase::getUseVectorAlignmentAttr() {
  auto attr = ::llvm::dyn_cast_or_null<::mlir::BoolAttr>(getProperties().use_vector_alignment);
  return attr;
}

bool ApplyVectorToLLVMConversionPatternsOpGenericAdaptorBase::getUseVectorAlignment() {
  auto attr = getUseVectorAlignmentAttr();
  return attr.getValue();
}


} // namespace detail
ApplyVectorToLLVMConversionPatternsOpAdaptor::ApplyVectorToLLVMConversionPatternsOpAdaptor(ApplyVectorToLLVMConversionPatternsOp op) : ApplyVectorToLLVMConversionPatternsOpGenericAdaptor(op->getOperands(), op) {}

::llvm::LogicalResult ApplyVectorToLLVMConversionPatternsOpAdaptor::verify(::mlir::Location loc) {
  auto tblgen_force_32bit_vector_indices = getProperties().force_32bit_vector_indices; (void)tblgen_force_32bit_vector_indices;
  auto tblgen_reassociate_fp_reductions = getProperties().reassociate_fp_reductions; (void)tblgen_reassociate_fp_reductions;
  auto tblgen_use_vector_alignment = getProperties().use_vector_alignment; (void)tblgen_use_vector_alignment;

  if (tblgen_reassociate_fp_reductions && !((::llvm::isa<::mlir::BoolAttr>(tblgen_reassociate_fp_reductions))))
    return emitError(loc, "'transform.apply_conversion_patterns.vector.vector_to_llvm' op attribute 'reassociate_fp_reductions' failed to satisfy constraint: bool attribute");

  if (tblgen_force_32bit_vector_indices && !((::llvm::isa<::mlir::BoolAttr>(tblgen_force_32bit_vector_indices))))
    return emitError(loc, "'transform.apply_conversion_patterns.vector.vector_to_llvm' op attribute 'force_32bit_vector_indices' failed to satisfy constraint: bool attribute");

  if (tblgen_use_vector_alignment && !((::llvm::isa<::mlir::BoolAttr>(tblgen_use_vector_alignment))))
    return emitError(loc, "'transform.apply_conversion_patterns.vector.vector_to_llvm' op attribute 'use_vector_alignment' failed to satisfy constraint: bool attribute");
  return ::mlir::success();
}

::llvm::LogicalResult ApplyVectorToLLVMConversionPatternsOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
  ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(attr);
  if (!dict) {
    emitError() << "expected DictionaryAttr to set properties";
    return ::mlir::failure();
  }

  {
    auto &propStorage = prop.force_32bit_vector_indices;
       auto attr = dict.get("force_32bit_vector_indices");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `force_32bit_vector_indices` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.reassociate_fp_reductions;
       auto attr = dict.get("reassociate_fp_reductions");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `reassociate_fp_reductions` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }

  {
    auto &propStorage = prop.use_vector_alignment;
       auto attr = dict.get("use_vector_alignment");
    if (attr) {
      auto convertedAttr = ::llvm::dyn_cast<std::remove_reference_t<decltype(propStorage)>>(attr);
      if (convertedAttr) {
        propStorage = convertedAttr;
      } else {
        emitError() << "Invalid attribute `use_vector_alignment` in property conversion: " << attr;
        return ::mlir::failure();
      }
    }
  }
  return ::mlir::success();
}

::mlir::Attribute ApplyVectorToLLVMConversionPatternsOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
    ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
    ::mlir::Builder odsBuilder{ctx};

    {
      const auto &propStorage = prop.force_32bit_vector_indices;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("force_32bit_vector_indices",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.reassociate_fp_reductions;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("reassociate_fp_reductions",
                                       propStorage));
    }

    {
      const auto &propStorage = prop.use_vector_alignment;
      if (propStorage)
        attrs.push_back(odsBuilder.getNamedAttr("use_vector_alignment",
                                       propStorage));
    }

  if (!attrs.empty())
    return odsBuilder.getDictionaryAttr(attrs);
  return {};
}

llvm::hash_code ApplyVectorToLLVMConversionPatternsOp::computePropertiesHash(const Properties &prop) {
  using llvm::hash_value;
  return llvm::hash_combine(
    llvm::hash_value(prop.force_32bit_vector_indices.getAsOpaquePointer()), 
    llvm::hash_value(prop.reassociate_fp_reductions.getAsOpaquePointer()), 
    llvm::hash_value(prop.use_vector_alignment.getAsOpaquePointer()));
}

std::optional<mlir::Attribute> ApplyVectorToLLVMConversionPatternsOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
    if (name == "force_32bit_vector_indices")
      return prop.force_32bit_vector_indices;

    if (name == "reassociate_fp_reductions")
      return prop.reassociate_fp_reductions;

    if (name == "use_vector_alignment")
      return prop.use_vector_alignment;
  return std::nullopt;
}

void ApplyVectorToLLVMConversionPatternsOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
    if (name == "force_32bit_vector_indices") {
       prop.force_32bit_vector_indices = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.force_32bit_vector_indices)>>(value);
       return;
    }

    if (name == "reassociate_fp_reductions") {
       prop.reassociate_fp_reductions = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.reassociate_fp_reductions)>>(value);
       return;
    }

    if (name == "use_vector_alignment") {
       prop.use_vector_alignment = ::llvm::dyn_cast_or_null<std::remove_reference_t<decltype(prop.use_vector_alignment)>>(value);
       return;
    }
}

void ApplyVectorToLLVMConversionPatternsOp::populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs) {
    if (prop.force_32bit_vector_indices) attrs.append("force_32bit_vector_indices", prop.force_32bit_vector_indices);

    if (prop.reassociate_fp_reductions) attrs.append("reassociate_fp_reductions", prop.reassociate_fp_reductions);

    if (prop.use_vector_alignment) attrs.append("use_vector_alignment", prop.use_vector_alignment);
}

::llvm::LogicalResult ApplyVectorToLLVMConversionPatternsOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
    {
      ::mlir::Attribute attr = attrs.get(getForce_32bitVectorIndicesAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps5(attr, "force_32bit_vector_indices", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getReassociateFpReductionsAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps5(attr, "reassociate_fp_reductions", emitError)))
        return ::mlir::failure();
    }

    {
      ::mlir::Attribute attr = attrs.get(getUseVectorAlignmentAttrName(opName));
      if (attr && ::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps5(attr, "use_vector_alignment", emitError)))
        return ::mlir::failure();
    }
    return ::mlir::success();
}

::llvm::LogicalResult ApplyVectorToLLVMConversionPatternsOp::readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state) {
  auto &prop = state.getOrAddProperties<Properties>(); (void)prop;
  if (::mlir::failed(reader.readOptionalAttribute(prop.force_32bit_vector_indices)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.reassociate_fp_reductions)))
    return ::mlir::failure();

  if (::mlir::failed(reader.readOptionalAttribute(prop.use_vector_alignment)))
    return ::mlir::failure();
  return ::mlir::success();
}

void ApplyVectorToLLVMConversionPatternsOp::writeProperties(::mlir::DialectBytecodeWriter &writer) {
  auto &prop = getProperties(); (void)prop;

  writer.writeOptionalAttribute(prop.force_32bit_vector_indices);

  writer.writeOptionalAttribute(prop.reassociate_fp_reductions);

  writer.writeOptionalAttribute(prop.use_vector_alignment);
}

bool ApplyVectorToLLVMConversionPatternsOp::getReassociateFpReductions() {
  auto attr = getReassociateFpReductionsAttr();
  return attr.getValue();
}

bool ApplyVectorToLLVMConversionPatternsOp::getForce_32bitVectorIndices() {
  auto attr = getForce_32bitVectorIndicesAttr();
  return attr.getValue();
}

bool ApplyVectorToLLVMConversionPatternsOp::getUseVectorAlignment() {
  auto attr = getUseVectorAlignmentAttr();
  return attr.getValue();
}

void ApplyVectorToLLVMConversionPatternsOp::setReassociateFpReductions(bool attrValue) {
  getProperties().reassociate_fp_reductions = ::mlir::Builder((*this)->getContext()).getBoolAttr(attrValue);
}

void ApplyVectorToLLVMConversionPatternsOp::setForce_32bitVectorIndices(bool attrValue) {
  getProperties().force_32bit_vector_indices = ::mlir::Builder((*this)->getContext()).getBoolAttr(attrValue);
}

void ApplyVectorToLLVMConversionPatternsOp::setUseVectorAlignment(bool attrValue) {
  getProperties().use_vector_alignment = ::mlir::Builder((*this)->getContext()).getBoolAttr(attrValue);
}

void ApplyVectorToLLVMConversionPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::BoolAttr reassociate_fp_reductions, ::mlir::BoolAttr force_32bit_vector_indices, ::mlir::BoolAttr use_vector_alignment) {
  if (reassociate_fp_reductions) {
    odsState.getOrAddProperties<Properties>().reassociate_fp_reductions = reassociate_fp_reductions;
  }
  if (force_32bit_vector_indices) {
    odsState.getOrAddProperties<Properties>().force_32bit_vector_indices = force_32bit_vector_indices;
  }
  if (use_vector_alignment) {
    odsState.getOrAddProperties<Properties>().use_vector_alignment = use_vector_alignment;
  }
}

ApplyVectorToLLVMConversionPatternsOp ApplyVectorToLLVMConversionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::BoolAttr reassociate_fp_reductions, ::mlir::BoolAttr force_32bit_vector_indices, ::mlir::BoolAttr use_vector_alignment) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(reassociate_fp_reductions)>(reassociate_fp_reductions), std::forward<decltype(force_32bit_vector_indices)>(force_32bit_vector_indices), std::forward<decltype(use_vector_alignment)>(use_vector_alignment));
  auto __res__ = ::llvm::dyn_cast<ApplyVectorToLLVMConversionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyVectorToLLVMConversionPatternsOp ApplyVectorToLLVMConversionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::BoolAttr reassociate_fp_reductions, ::mlir::BoolAttr force_32bit_vector_indices, ::mlir::BoolAttr use_vector_alignment) {
  return create(builder, builder.getLoc(), std::forward<decltype(reassociate_fp_reductions)>(reassociate_fp_reductions), std::forward<decltype(force_32bit_vector_indices)>(force_32bit_vector_indices), std::forward<decltype(use_vector_alignment)>(use_vector_alignment));
}

void ApplyVectorToLLVMConversionPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::BoolAttr reassociate_fp_reductions, ::mlir::BoolAttr force_32bit_vector_indices, ::mlir::BoolAttr use_vector_alignment) {
  if (reassociate_fp_reductions) {
    odsState.getOrAddProperties<Properties>().reassociate_fp_reductions = reassociate_fp_reductions;
  }
  if (force_32bit_vector_indices) {
    odsState.getOrAddProperties<Properties>().force_32bit_vector_indices = force_32bit_vector_indices;
  }
  if (use_vector_alignment) {
    odsState.getOrAddProperties<Properties>().use_vector_alignment = use_vector_alignment;
  }
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyVectorToLLVMConversionPatternsOp ApplyVectorToLLVMConversionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::BoolAttr reassociate_fp_reductions, ::mlir::BoolAttr force_32bit_vector_indices, ::mlir::BoolAttr use_vector_alignment) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(reassociate_fp_reductions)>(reassociate_fp_reductions), std::forward<decltype(force_32bit_vector_indices)>(force_32bit_vector_indices), std::forward<decltype(use_vector_alignment)>(use_vector_alignment));
  auto __res__ = ::llvm::dyn_cast<ApplyVectorToLLVMConversionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyVectorToLLVMConversionPatternsOp ApplyVectorToLLVMConversionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::BoolAttr reassociate_fp_reductions, ::mlir::BoolAttr force_32bit_vector_indices, ::mlir::BoolAttr use_vector_alignment) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(reassociate_fp_reductions)>(reassociate_fp_reductions), std::forward<decltype(force_32bit_vector_indices)>(force_32bit_vector_indices), std::forward<decltype(use_vector_alignment)>(use_vector_alignment));
}

void ApplyVectorToLLVMConversionPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, bool reassociate_fp_reductions, bool force_32bit_vector_indices, bool use_vector_alignment) {
  odsState.getOrAddProperties<Properties>().reassociate_fp_reductions = odsBuilder.getBoolAttr(reassociate_fp_reductions);
  odsState.getOrAddProperties<Properties>().force_32bit_vector_indices = odsBuilder.getBoolAttr(force_32bit_vector_indices);
  odsState.getOrAddProperties<Properties>().use_vector_alignment = odsBuilder.getBoolAttr(use_vector_alignment);
}

ApplyVectorToLLVMConversionPatternsOp ApplyVectorToLLVMConversionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, bool reassociate_fp_reductions, bool force_32bit_vector_indices, bool use_vector_alignment) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(reassociate_fp_reductions)>(reassociate_fp_reductions), std::forward<decltype(force_32bit_vector_indices)>(force_32bit_vector_indices), std::forward<decltype(use_vector_alignment)>(use_vector_alignment));
  auto __res__ = ::llvm::dyn_cast<ApplyVectorToLLVMConversionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyVectorToLLVMConversionPatternsOp ApplyVectorToLLVMConversionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, bool reassociate_fp_reductions, bool force_32bit_vector_indices, bool use_vector_alignment) {
  return create(builder, builder.getLoc(), std::forward<decltype(reassociate_fp_reductions)>(reassociate_fp_reductions), std::forward<decltype(force_32bit_vector_indices)>(force_32bit_vector_indices), std::forward<decltype(use_vector_alignment)>(use_vector_alignment));
}

void ApplyVectorToLLVMConversionPatternsOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, bool reassociate_fp_reductions, bool force_32bit_vector_indices, bool use_vector_alignment) {
  odsState.getOrAddProperties<Properties>().reassociate_fp_reductions = odsBuilder.getBoolAttr(reassociate_fp_reductions);
  odsState.getOrAddProperties<Properties>().force_32bit_vector_indices = odsBuilder.getBoolAttr(force_32bit_vector_indices);
  odsState.getOrAddProperties<Properties>().use_vector_alignment = odsBuilder.getBoolAttr(use_vector_alignment);
  assert(resultTypes.size() == 0u && "mismatched number of results");
  odsState.addTypes(resultTypes);
}

ApplyVectorToLLVMConversionPatternsOp ApplyVectorToLLVMConversionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, bool reassociate_fp_reductions, bool force_32bit_vector_indices, bool use_vector_alignment) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(reassociate_fp_reductions)>(reassociate_fp_reductions), std::forward<decltype(force_32bit_vector_indices)>(force_32bit_vector_indices), std::forward<decltype(use_vector_alignment)>(use_vector_alignment));
  auto __res__ = ::llvm::dyn_cast<ApplyVectorToLLVMConversionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyVectorToLLVMConversionPatternsOp ApplyVectorToLLVMConversionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, bool reassociate_fp_reductions, bool force_32bit_vector_indices, bool use_vector_alignment) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(reassociate_fp_reductions)>(reassociate_fp_reductions), std::forward<decltype(force_32bit_vector_indices)>(force_32bit_vector_indices), std::forward<decltype(use_vector_alignment)>(use_vector_alignment));
}

void ApplyVectorToLLVMConversionPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.addAttributes(attributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);

  if (!attributes.empty()) {
    (void)odsState.getOrAddProperties<ApplyVectorToLLVMConversionPatternsOp::Properties>();
    ::mlir::PropertyRef properties = odsState.getRawProperties();
    std::optional<::mlir::RegisteredOperationName> info =
      odsState.name.getRegisteredInfo();
    if (failed(info->setOpPropertiesFromAttribute(odsState.name, properties,
        odsState.attributes.getDictionary(odsState.getContext()), nullptr)))
      ::llvm::report_fatal_error("Property conversion failed.");
  }
}

ApplyVectorToLLVMConversionPatternsOp ApplyVectorToLLVMConversionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
  auto __res__ = ::llvm::dyn_cast<ApplyVectorToLLVMConversionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyVectorToLLVMConversionPatternsOp ApplyVectorToLLVMConversionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(attributes)>(attributes));
}

void ApplyVectorToLLVMConversionPatternsOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  assert(operands.size() == 0u && "mismatched number of parameters");
  odsState.addOperands(operands);
  odsState.useProperties(const_cast<Properties&>(properties));
  odsState.addAttributes(discardableAttributes);
  assert(resultTypes.size() == 0u && "mismatched number of return types");
  odsState.addTypes(resultTypes);
}

ApplyVectorToLLVMConversionPatternsOp ApplyVectorToLLVMConversionPatternsOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  ::mlir::OperationState __state__(location, getOperationName());
  build(builder, __state__, std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
  auto __res__ = ::llvm::dyn_cast<ApplyVectorToLLVMConversionPatternsOp>(builder.create(__state__));
  assert(__res__ && "builder didn't return the right type");
  return __res__;
}

ApplyVectorToLLVMConversionPatternsOp ApplyVectorToLLVMConversionPatternsOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
  return create(builder, builder.getLoc(), std::forward<decltype(resultTypes)>(resultTypes), std::forward<decltype(operands)>(operands), std::forward<decltype(properties)>(properties), std::forward<decltype(discardableAttributes)>(discardableAttributes));
}

void ApplyVectorToLLVMConversionPatternsOp::populateDefaultProperties(::mlir::OperationName opName, Properties &properties) {
  ::mlir::Builder odsBuilder(opName.getContext());
  if (!properties.reassociate_fp_reductions)
    properties.reassociate_fp_reductions = odsBuilder.getBoolAttr(false);
  if (!properties.force_32bit_vector_indices)
    properties.force_32bit_vector_indices = odsBuilder.getBoolAttr(true);
  if (!properties.use_vector_alignment)
    properties.use_vector_alignment = odsBuilder.getBoolAttr(false);
}

::llvm::LogicalResult ApplyVectorToLLVMConversionPatternsOp::verifyInvariantsImpl() {
  auto tblgen_force_32bit_vector_indices = getProperties().force_32bit_vector_indices; (void)tblgen_force_32bit_vector_indices;
  auto tblgen_reassociate_fp_reductions = getProperties().reassociate_fp_reductions; (void)tblgen_reassociate_fp_reductions;
  auto tblgen_use_vector_alignment = getProperties().use_vector_alignment; (void)tblgen_use_vector_alignment;

  if (::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps5(*this, tblgen_reassociate_fp_reductions, "reassociate_fp_reductions")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps5(*this, tblgen_force_32bit_vector_indices, "force_32bit_vector_indices")))
    return ::mlir::failure();

  if (::mlir::failed(__mlir_ods_local_attr_constraint_VectorTransformOps5(*this, tblgen_use_vector_alignment, "use_vector_alignment")))
    return ::mlir::failure();
  return ::mlir::success();
}

::llvm::LogicalResult ApplyVectorToLLVMConversionPatternsOp::verifyInvariants() {
  return verifyInvariantsImpl();
}

::mlir::ParseResult ApplyVectorToLLVMConversionPatternsOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
  {
    auto loc = parser.getCurrentLocation();(void)loc;
    if (parser.parseOptionalAttrDict(result.attributes))
      return ::mlir::failure();
    if (failed(verifyInherentAttrs(result.name, result.attributes, [&]() {
        return parser.emitError(loc) << "'" << result.name.getStringRef() << "' op ";
      })))
      return ::mlir::failure();
  }
  return ::mlir::success();
}

void ApplyVectorToLLVMConversionPatternsOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
  ::llvm::SmallVector<::llvm::StringRef, 2> elidedAttrs;
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getReassociateFpReductionsAttr();
     if(attr && (attr == odsBuilder.getBoolAttr(false)))
       elidedAttrs.push_back("reassociate_fp_reductions");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getForce_32bitVectorIndicesAttr();
     if(attr && (attr == odsBuilder.getBoolAttr(true)))
       elidedAttrs.push_back("force_32bit_vector_indices");
  }
  {
     ::mlir::Builder odsBuilder(getContext());
     ::mlir::Attribute attr = getUseVectorAlignmentAttr();
     if(attr && (attr == odsBuilder.getBoolAttr(false)))
       elidedAttrs.push_back("use_vector_alignment");
  }
  _odsPrinter.printOptionalAttrDict((*this)->getAttrs(), elidedAttrs);
}


} // namespace mlir::transform
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::ApplyVectorToLLVMConversionPatternsOp)
MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::transform::detail::ApplyVectorToLLVMConversionPatternsOpGenericAdaptorBase::Properties)


#endif // GET_OP_CLASSES

