10#if defined(GET_OP_CLASSES) || defined(GET_OP_FWD_DEFINES)
11#undef GET_OP_FWD_DEFINES
48 using mapTy = ::mlir::AffineMapAttr;
52 auto &propStorage = this->map;
53 return ::llvm::cast<::mlir::AffineMapAttr>(propStorage);
55 void setMap(const ::mlir::AffineMapAttr &propValue) {
56 this->map = propValue;
62 auto &propStorage = this->numDims;
63 return ::llvm::cast<::mlir::IntegerAttr>(propStorage);
66 this->numDims = propValue;
70 rhs.
map == this->map &&
75 return !(*
this == rhs);
95 ::mlir::AffineMap
getMap();
100template <
typename RangeT>
102 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
109 template <
typename LateInst = ApplyMapOp,
typename = std::enable_if_t<std::is_same_v<LateInst, ApplyMapOp>>>
118 return {std::next(odsOperands.begin(), valueRange.first),
119 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
138 ::mlir::LogicalResult
verify(::mlir::Location loc);
140class ApplyMapOp :
public ::mlir::Op<ApplyMapOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::IndexType>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::VariadicOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
145 template <
typename RangeT>
150 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"map"), ::llvm::StringRef(
"numDims")};
151 return ::llvm::ArrayRef(attrNames);
155 return getAttributeNameForIndex(0);
159 return getAttributeNameForIndex(name, 0);
163 return getAttributeNameForIndex(1);
167 return getAttributeNameForIndex(name, 1);
171 return ::llvm::StringLiteral(
"poly.applymap");
179 ::mlir::Operation::result_range
getODSResults(
unsigned index);
180 static ::mlir::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
183 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
186 static ::mlir::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
187 static ::mlir::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
190 ::mlir::AffineMap
getMap();
194 void setMap(::mlir::AffineMap attrValue);
197 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMapAttr map, ::mlir::ValueRange mapOperands = {});
198 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMap map, ::mlir::ValueRange mapOperands = {});
199 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineExpr expr, ::mlir::ValueRange mapOperands = {});
202 ::mlir::LogicalResult
verify();
203 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
204 void print(::mlir::OpAsmPrinter &_odsPrinter);
205 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
207 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
208 return getAttributeNameForIndex((*this)->getName(), index);
211 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
212 assert(index < 2 &&
"invalid attribute index");
213 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
214 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
215 "dependent dialect loading?");
216 return name.getAttributeNames()[index];
225 return ::mlir::affine::AffineValueMap(
getAffineMap(), getOperands(), getResult());
230 return ::mlir::OperandRange{
231 getOperands().begin(),
232 getOperands().begin() +
getMap().getNumDims()};
237 return ::mlir::OperandRange{
238 getOperands().begin() +
getMap().getNumDims(),
239 getOperands().end()};
261 auto &propStorage = this->const_name;
262 return ::llvm::cast<::mlir::FlatSymbolRefAttr>(propStorage);
265 this->const_name = propValue;
273 return !(*
this == rhs);
296template <
typename RangeT>
298 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
305 template <
typename LateInst = ConstReadOp,
typename = std::enable_if_t<std::is_same_v<LateInst, ConstReadOp>>>
314 return {std::next(odsOperands.begin(), valueRange.first),
315 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
330 ::mlir::LogicalResult
verify(::mlir::Location loc);
332class ConstReadOp :
public ::mlir::Op<ConstReadOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::ZeroOperands, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::SymbolUserOpInterface::Trait> {
337 template <
typename RangeT>
342 static ::llvm::StringRef attrNames[] = {::llvm::StringRef(
"const_name")};
343 return ::llvm::ArrayRef(attrNames);
347 return getAttributeNameForIndex(0);
351 return getAttributeNameForIndex(name, 0);
355 return ::llvm::StringLiteral(
"poly.read_const");
361 ::mlir::Operation::result_range
getODSResults(
unsigned index);
363 static ::mlir::LogicalResult
setPropertiesFromAttr(
Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
366 static std::optional<mlir::Attribute>
getInherentAttr(::mlir::MLIRContext *ctx,
const Properties &prop, llvm::StringRef name);
369 static ::mlir::LogicalResult
verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
370 static ::mlir::LogicalResult
readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
376 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::FlatSymbolRefAttr const_name);
377 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::FlatSymbolRefAttr const_name);
378 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::llvm::StringRef const_name);
379 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::llvm::StringRef const_name);
380 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
383 ::mlir::LogicalResult
verifySymbolUses(::mlir::SymbolTableCollection &symbolTable);
384 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
385 void print(::mlir::OpAsmPrinter &_odsPrinter);
387 ::mlir::StringAttr getAttributeNameForIndex(
unsigned index) {
388 return getAttributeNameForIndex((*this)->getName(), index);
391 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name,
unsigned index) {
392 assert(index < 1 &&
"invalid attribute index");
393 assert(name.getStringRef() ==
getOperationName() &&
"invalid operation name");
394 assert(name.isRegistered() &&
"Operation isn't registered, missing a "
395 "dependent dialect loading?");
396 return name.getAttributeNames()[index];
428template <
typename RangeT>
430 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
433 UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs =
nullptr, const ::mlir::EmptyProperties &properties = {}, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
437 template <
typename LateInst = UnifiableCastOp,
typename = std::enable_if_t<std::is_same_v<LateInst, UnifiableCastOp>>>
446 return {std::next(odsOperands.begin(), valueRange.first),
447 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
466 ::mlir::LogicalResult
verify(::mlir::Location loc);
468class UnifiableCastOp :
public ::mlir::Op<UnifiableCastOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::OneResult, ::mlir::OpTrait::OneTypedResult<::mlir::Type>::Impl, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::ConditionallySpeculatable::Trait, ::mlir::OpTrait::AlwaysSpeculatableImplTrait, ::mlir::MemoryEffectOpInterface::Trait> {
473 template <
typename RangeT>
481 return ::llvm::StringLiteral(
"poly.unifiable_cast");
489 ::mlir::Operation::result_range
getODSResults(
unsigned index);
491 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input);
492 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value input);
493 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
496 ::mlir::LogicalResult
verify();
497 static ::mlir::ParseResult
parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
498 void print(::mlir::OpAsmPrinter &_odsPrinter);
499 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> &effects);
ApplyMapOpAdaptor(ApplyMapOp op)
::mlir::LogicalResult verify(::mlir::Location loc)
ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
RangeT getODSOperands(unsigned index)
ApplyMapOpGenericAdaptor(RangeT values, LateInst op)
ApplyMapOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
::mlir::ValueRange getSymbolOperands()
Returns all symbol operands.
::mlir::LogicalResult verifyInvariants()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::ValueRange getDimOperands()
Returns all dimension operands.
::mlir::affine::AffineValueMap getAffineValueMap()
Returns the affine value map computed from this operation.
::llvm::APInt getNumDims()
::mlir::StringAttr getNumDimsAttrName(::mlir::OperationName name)
::mlir::LogicalResult verify()
void print(::mlir::OpAsmPrinter &_odsPrinter)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
static constexpr ::llvm::StringLiteral getOperationName()
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
static llvm::hash_code computePropertiesHash(const Properties &prop)
FoldAdaptor::Properties Properties
::mlir::Operation::result_range getODSResults(unsigned index)
::mlir::StringAttr getMapAttrName(::mlir::OperationName name)
::mlir::LogicalResult verifyInvariantsImpl()
ApplyMapOpAdaptor Adaptor
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::AffineMapAttr map, ::mlir::ValueRange mapOperands={})
::mlir::StringAttr getMapAttrName()
::mlir::Operation::operand_range getMapOperands()
::mlir::AffineMap getMap()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::mlir::Operation::operand_range getODSOperands(unsigned index)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::AffineMapAttr getMapAttr()
ApplyMapOpGenericAdaptor< RangeT > GenericAdaptor
void writeProperties(::mlir::DialectBytecodeWriter &writer)
void setMap(::mlir::AffineMap attrValue)
void setNumDimsAttr(::mlir::IntegerAttr attr)
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::mlir::StringAttr getNumDimsAttrName()
::mlir::MutableOperandRange getMapOperandsMutable()
::mlir::AffineMap getAffineMap()
Returns the affine map to be applied by this operation.
void setMapAttr(::mlir::AffineMapAttr attr)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::IntegerAttr getNumDimsAttr()
void setNumDims(::llvm::APInt attrValue)
::mlir::LogicalResult verify(::mlir::Location loc)
ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
ConstReadOpAdaptor(ConstReadOp op)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
ConstReadOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
ConstReadOpGenericAdaptor(RangeT values, LateInst op)
RangeT getODSOperands(unsigned index)
void writeProperties(::mlir::DialectBytecodeWriter &writer)
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::FlatSymbolRefAttr getConstNameAttr()
static constexpr ::llvm::StringLiteral getOperationName()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
void print(::mlir::OpAsmPrinter &_odsPrinter)
FoldAdaptor::Properties Properties
::mlir::LogicalResult verifyInvariantsImpl()
::mlir::StringAttr getConstNameAttrName()
::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop)
ConstReadOpGenericAdaptor< RangeT > GenericAdaptor
::mlir::StringAttr getConstNameAttrName(::mlir::OperationName name)
static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value)
::mlir::Operation::operand_range getODSOperands(unsigned index)
static llvm::hash_code computePropertiesHash(const Properties &prop)
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
void setConstName(::llvm::StringRef attrValue)
::mlir::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
void setConstNameAttr(::mlir::FlatSymbolRefAttr attr)
::mlir::LogicalResult verifyInvariants()
::mlir::Operation::result_range getODSResults(unsigned index)
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type val, ::mlir::FlatSymbolRefAttr const_name)
ConstReadOpAdaptor Adaptor
static std::optional< mlir::Attribute > getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name)
static void populateInherentAttrs(::mlir::MLIRContext *ctx, const Properties &prop, ::mlir::NamedAttrList &attrs)
::mlir::LogicalResult verifySymbolUses(::mlir::SymbolTableCollection &symbolTable)
::mlir::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state)
::mlir::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError)
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::llvm::StringRef getConstName()
UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
UnifiableCastOpAdaptor(UnifiableCastOp op)
::mlir::LogicalResult verify(::mlir::Location loc)
UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
UnifiableCastOpGenericAdaptor(RangeT values, LateInst op)
RangeT getODSOperands(unsigned index)
UnifiableCastOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::OpaqueProperties properties, ::mlir::RegionRange regions={})
::mlir::LogicalResult verify()
std::pair< unsigned, unsigned > getODSResultIndexAndLength(unsigned index)
::mlir::LogicalResult verifyInvariantsImpl()
static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type result, ::mlir::Value input)
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
::mlir::OpOperand & getInputMutable()
GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute > > FoldAdaptor
::mlir::Operation::operand_range getODSOperands(unsigned index)
static constexpr ::llvm::StringLiteral getOperationName()
static ::llvm::ArrayRef<::llvm::StringRef > getAttributeNames()
::mlir::Value getResult()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index)
UnifiableCastOpGenericAdaptor< RangeT > GenericAdaptor
::mlir::LogicalResult verifyInvariants()
UnifiableCastOpAdaptor Adaptor
::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result)
::mlir::Operation::result_range getODSResults(unsigned index)
void print(::mlir::OpAsmPrinter &_odsPrinter)
const Properties & getProperties()
::mlir::AffineMap getMap()
::mlir::DictionaryAttr getAttributes()
::mlir::IntegerAttr getNumDimsAttr()
::mlir::DictionaryAttr odsAttrs
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::AffineMapAttr getMapAttr()
ApplyMapOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
::llvm::APInt getNumDims()
::mlir::RegionRange odsRegions
::std::optional<::mlir::OperationName > odsOpName
::mlir::DictionaryAttr getAttributes()
const Properties & getProperties()
::mlir::FlatSymbolRefAttr getConstNameAttr()
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
ConstReadOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const Properties &properties={}, ::mlir::RegionRange regions={})
::std::optional<::mlir::OperationName > odsOpName
::mlir::RegionRange odsRegions
::llvm::StringRef getConstName()
::mlir::DictionaryAttr odsAttrs
::mlir::DictionaryAttr getAttributes()
::std::optional<::mlir::OperationName > odsOpName
std::pair< unsigned, unsigned > getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize)
::mlir::RegionRange odsRegions
UnifiableCastOpGenericAdaptorBase(::mlir::DictionaryAttr attrs=nullptr, const ::mlir::EmptyProperties &properties={}, ::mlir::RegionRange regions={})
::mlir::DictionaryAttr odsAttrs
bool operator==(const Properties &rhs) const
::mlir::IntegerAttr numDimsTy
::mlir::AffineMapAttr mapTy
void setMap(const ::mlir::AffineMapAttr &propValue)
bool operator!=(const Properties &rhs) const
void setNumDims(const ::mlir::IntegerAttr &propValue)
::mlir::FlatSymbolRefAttr const_nameTy
bool operator==(const Properties &rhs) const
bool operator!=(const Properties &rhs) const
void setConstName(const ::mlir::FlatSymbolRefAttr &propValue)