10#if defined(GET_OP_CLASSES) || defined(GET_OP_FWD_DEFINES)
11#undef GET_OP_FWD_DEFINES
42 auto &propStorage = this->path;
43 return ::llvm::cast<::mlir::StringAttr>(propStorage);
45 void setPath(const ::mlir::StringAttr &propValue) {
46 this->path = propValue;
52 auto &propStorage = this->sym_name;
53 return ::llvm::cast<::mlir::StringAttr>(propStorage);
56 this->sym_name = propValue;
60 rhs.
path == this->path &&
65 return !(*
this == rhs);
90template <
typename RangeT>
92 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
99 template <
typename LateInst = IncludeOp,
typename = std::enable_if_t<std::is_same_v<LateInst, IncludeOp>>>
108 return {std::next(odsOperands.begin(), valueRange.first),
109 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
124 ::mlir::LogicalResult
verify(::mlir::Location loc);
126class IncludeOp :
public ::mlir::Op<IncludeOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::HasParent<::mlir::ModuleOp>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::SymbolOpInterface::Trait> {
131 template <
typename RangeT>
136 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"path"), ::llvm::StringRef(
"sym_name")};
137 return ::llvm::ArrayRef(attrNames);
141 return getAttributeNameForIndex(0);
145 return getAttributeNameForIndex(name, 0);
149 return getAttributeNameForIndex(1);
153 return getAttributeNameForIndex(name, 1);
157 return ::llvm::StringLiteral(
"include.from");
163 ::mlir::Operation::result_range
getODSResults(
unsigned index);
164 static ::mlir::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
167 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
170 static ::mlir::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
171 static ::mlir::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
180 void setPath(::llvm::StringRef attrValue);
181 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::StringAttr path);
182 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::StringAttr sym_name, ::mlir::StringAttr path);
183 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::llvm::StringRef sym_name, ::llvm::StringRef path);
184 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef sym_name, ::llvm::StringRef path);
185 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
188 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
189 void print(::mlir::OpAsmPrinter &_odsPrinter);
191 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
192 return getAttributeNameForIndex((*this)->getName(), index);
195 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
196 assert(index < 2 &&
"invalid attribute index");
197 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
198 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
199 "dependent dialect loading?");
200 return name.getAttributeNames()[index];
204 static IncludeOp create(::mlir::Location, ::llvm::StringRef name, ::llvm::StringRef path);
205 static IncludeOp create(::mlir::Location, ::mlir::StringAttr name, ::mlir::StringAttr path);
207 ::mlir::FailureOr<mlir::OwningOpRef<mlir::ModuleOp>>
openModule();
IncludeOpAdaptor(IncludeOp op)
IncludeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
::mlir::LogicalResult verify(::mlir::Location loc)
IncludeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
IncludeOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
RangeT getODSOperands(unsigned index)
IncludeOpGenericAdaptor(RangeT values, LateInst op)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
static IncludeOp create(::mlir::Location, ::llvm::StringRef name, ::llvm::StringRef path)
::mlir::StringAttr getPathAttrName()
void setPathAttr(::mlir::StringAttr attr)
::mlir::LogicalResult verifyInvariants()
::llvm::StringRef getSymName()
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
static constexpr ::llvm::StringLiteral getOperationName()
IncludeOpGenericAdaptor< RangeT > GenericAdaptor
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
static llvm::hash_code computePropertiesHash(const Properties &prop)
FoldAdaptor::Properties Properties
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
::mlir::StringAttr getSymNameAttrName(::mlir::OperationName name)
void setSymName(::llvm::StringRef attrValue)
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
::llvm::StringRef getPath()
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::StringAttr getSymNameAttr()
void print(::mlir::OpAsmPrinter &_odsPrinter)
::mlir::StringAttr getSymNameAttrName()
static IncludeOp create(::mlir::Location, ::mlir::StringAttr name, ::mlir::StringAttr path)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::StringAttr sym_name, ::mlir::StringAttr path)
::mlir::FailureOr< mlir::OwningOpRef< mlir::ModuleOp > > openModule()
Opens the module this include references but doesn't insert it into the parent module.
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
void setSymNameAttr(::mlir::StringAttr attr)
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::FailureOr< mlir::ModuleOp > inlineAndErase()
Opens the module this include references and replace this include with that module.
::mlir::StringAttr getPathAttr()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::mlir::Operation::result_range getODSResults(unsigned index)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::Operation::operand_range getODSOperands(unsigned index)
void setPath(::llvm::StringRef attrValue)
::mlir::StringAttr getPathAttrName(::mlir::OperationName name)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::LogicalResult verifyInvariantsImpl()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::DictionaryAttr odsAttrs
::std::optional<::mlir::OperationName > odsOpName
const Properties & getProperties()
::llvm::StringRef getPath()
::mlir::DictionaryAttr getAttributes()
::mlir::StringAttr getSymNameAttr()
::mlir::RegionRange odsRegions
::mlir::StringAttr getPathAttr()
IncludeOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
::llvm::StringRef getSymName()
bool operator==(const Properties &rhs) const
void setPath(const ::mlir::StringAttr &propValue)
::mlir::StringAttr pathTy
::mlir::StringAttr sym_nameTy
void setSymName(const ::mlir::StringAttr &propValue)
bool operator!=(const Properties &rhs) const