| 1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
| 2 | |* *| |
| 3 | |* AttrDef Declarations *| |
| 4 | |* *| |
| 5 | |* Automatically generated file, do not edit! *| |
| 6 | |* *| |
| 7 | \*===----------------------------------------------------------------------===*/ |
| 8 | |
| 9 | #ifdef GET_ATTRDEF_CLASSES |
| 10 | #undef GET_ATTRDEF_CLASSES |
| 11 | |
| 12 | |
| 13 | namespace mlir { |
| 14 | class AsmParser; |
| 15 | class AsmPrinter; |
| 16 | } // namespace mlir |
| 17 | namespace test { |
| 18 | class SimpleAAttr; |
| 19 | class CompoundAAttr; |
| 20 | class CompoundAttrNestedAttr; |
| 21 | class AttrWithSelfTypeParamAttr; |
| 22 | class AttrWithTypeBuilderAttr; |
| 23 | class AttrWithTraitAttr; |
| 24 | class TestDecimalShapeAttr; |
| 25 | class TestI64ElementsAttr; |
| 26 | class TestSubElementsAccessAttr; |
| 27 | class CompoundNestedInnerAttr; |
| 28 | class CompoundNestedOuterAttr; |
| 29 | class CompoundNestedOuterQualAttr; |
| 30 | class TestAttrWithFormatAttr; |
| 31 | class TestAttrWithOptionalSignedAttr; |
| 32 | class TestAttrWithOptionalUnsignedAttr; |
| 33 | class TestAttrWithOptionalEnumAttr; |
| 34 | class TestAttrUglyAttr; |
| 35 | class TestAttrParamsAttr; |
| 36 | class TestAttrWithTypeParamAttr; |
| 37 | class TestAttrSelfTypeParameterFormatAttr; |
| 38 | class TestAttrSelfTypeParameterStructFormatAttr; |
| 39 | class TestOverrideBuilderAttr; |
| 40 | class TestExtern1DI64ElementsAttr; |
| 41 | class ArrayOfUglyAttrsAttr; |
| 42 | class ArrayOfIntsAttr; |
| 43 | /// allowed i32 cases: 0, 1 |
| 44 | /// Enum cases: |
| 45 | /// * a (`a`) |
| 46 | /// * b (`b`) |
| 47 | class SimpleEnumAttr; |
| 48 | class ArrayOfEnumsAttr; |
| 49 | class TestCustomAnchorAttr; |
| 50 | /// Iterator type |
| 51 | class IteratorTypeAttr; |
| 52 | class TestCopyCountAttr; |
| 53 | class TestConditionalAliasAttr; |
| 54 | class TestCustomFloatAttr; |
| 55 | class TestCustomStructAttr; |
| 56 | class TestConstMemorySpaceAttr; |
| 57 | class TestCustomLocationAttr; |
| 58 | class TestOpAsmAttrInterfaceAttr; |
| 59 | class TestOpAsmAttrInterfaceTablegenDefaultAttr; |
| 60 | class SlashAttr; |
| 61 | class TestCustomStorageCtorAttrAttr; |
| 62 | /// a test enum |
| 63 | class TestEnumAttr; |
| 64 | /// a test bit enum |
| 65 | /// Enum cases: |
| 66 | /// * read (`Read`) |
| 67 | /// * write (`Write`) |
| 68 | /// * execute (`Execute`) |
| 69 | class TestBitEnumAttr; |
| 70 | /// another test bit enum |
| 71 | /// Enum cases: |
| 72 | /// * user (`User`) |
| 73 | /// * group (`Group`) |
| 74 | /// * other (`Other`) |
| 75 | class TestBitEnumVerticalBarAttr; |
| 76 | class SimpleAAttr : public ::mlir::Attribute::AttrBase<SimpleAAttr, ::mlir::Attribute, ::mlir::AttributeStorage> { |
| 77 | public: |
| 78 | using Base::Base; |
| 79 | static constexpr ::llvm::StringLiteral name = "test.smpla" ; |
| 80 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 81 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 82 | return {"smpla" }; |
| 83 | } |
| 84 | |
| 85 | }; |
| 86 | namespace detail { |
| 87 | struct CompoundAAttrStorage; |
| 88 | } // namespace detail |
| 89 | class CompoundAAttr : public ::mlir::Attribute::AttrBase<CompoundAAttr, ::mlir::Attribute, detail::CompoundAAttrStorage> { |
| 90 | public: |
| 91 | using Base::Base; |
| 92 | static constexpr ::llvm::StringLiteral name = "test.cmpnd_a" ; |
| 93 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 94 | static CompoundAAttr get(::mlir::MLIRContext *context, int widthOfSomething, ::mlir::Type oneType, ::llvm::ArrayRef<int> arrayOfInts); |
| 95 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 96 | return {"cmpnd_a" }; |
| 97 | } |
| 98 | |
| 99 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 100 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 101 | int getWidthOfSomething() const; |
| 102 | ::mlir::Type getOneType() const; |
| 103 | ::llvm::ArrayRef<int> getArrayOfInts() const; |
| 104 | }; |
| 105 | namespace detail { |
| 106 | struct CompoundAttrNestedAttrStorage; |
| 107 | } // namespace detail |
| 108 | class CompoundAttrNestedAttr : public ::mlir::Attribute::AttrBase<CompoundAttrNestedAttr, ::mlir::Attribute, detail::CompoundAttrNestedAttrStorage> { |
| 109 | public: |
| 110 | using Base::Base; |
| 111 | static constexpr ::llvm::StringLiteral name = "test.cmpnd_nested" ; |
| 112 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 113 | using Base::getChecked; |
| 114 | static CompoundAttrNestedAttr get(::mlir::MLIRContext *context, ::test::CompoundAAttr nested); |
| 115 | static CompoundAttrNestedAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::test::CompoundAAttr nested); |
| 116 | static ::llvm::LogicalResult verifyInvariantsImpl(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::test::CompoundAAttr nested); |
| 117 | static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::test::CompoundAAttr nested); |
| 118 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 119 | return {"cmpnd_nested" }; |
| 120 | } |
| 121 | |
| 122 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 123 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 124 | ::test::CompoundAAttr getNested() const; |
| 125 | }; |
| 126 | namespace detail { |
| 127 | struct AttrWithSelfTypeParamAttrStorage; |
| 128 | } // namespace detail |
| 129 | class AttrWithSelfTypeParamAttr : public ::mlir::Attribute::AttrBase<AttrWithSelfTypeParamAttr, ::mlir::Attribute, detail::AttrWithSelfTypeParamAttrStorage, ::mlir::TypedAttr::Trait> { |
| 130 | public: |
| 131 | using Base::Base; |
| 132 | static constexpr ::llvm::StringLiteral name = "test.attr_with_self_type_param" ; |
| 133 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 134 | static AttrWithSelfTypeParamAttr get(::mlir::MLIRContext *context, ::mlir::Type type); |
| 135 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 136 | return {"attr_with_self_type_param" }; |
| 137 | } |
| 138 | |
| 139 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 140 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 141 | ::mlir::Type getType() const; |
| 142 | }; |
| 143 | namespace detail { |
| 144 | struct AttrWithTypeBuilderAttrStorage; |
| 145 | } // namespace detail |
| 146 | class AttrWithTypeBuilderAttr : public ::mlir::Attribute::AttrBase<AttrWithTypeBuilderAttr, ::mlir::Attribute, detail::AttrWithTypeBuilderAttrStorage, ::mlir::TypedAttr::Trait> { |
| 147 | public: |
| 148 | using Base::Base; |
| 149 | static constexpr ::llvm::StringLiteral name = "test.attr_with_type_builder" ; |
| 150 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 151 | static AttrWithTypeBuilderAttr get(::mlir::MLIRContext *context, ::mlir::IntegerAttr attr, mlir::Type type); |
| 152 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 153 | return {"attr_with_type_builder" }; |
| 154 | } |
| 155 | |
| 156 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 157 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 158 | ::mlir::IntegerAttr getAttr() const; |
| 159 | mlir::Type getType() const; |
| 160 | }; |
| 161 | class AttrWithTraitAttr : public ::mlir::Attribute::AttrBase<AttrWithTraitAttr, ::mlir::Attribute, ::mlir::AttributeStorage, ::mlir::AttributeTrait::TestAttrTrait> { |
| 162 | public: |
| 163 | using Base::Base; |
| 164 | static constexpr ::llvm::StringLiteral name = "test.attr_with_trait" ; |
| 165 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 166 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 167 | return {"attr_with_trait" }; |
| 168 | } |
| 169 | |
| 170 | }; |
| 171 | namespace detail { |
| 172 | struct TestDecimalShapeAttrStorage; |
| 173 | } // namespace detail |
| 174 | class TestDecimalShapeAttr : public ::mlir::Attribute::AttrBase<TestDecimalShapeAttr, ::mlir::Attribute, detail::TestDecimalShapeAttrStorage> { |
| 175 | public: |
| 176 | using Base::Base; |
| 177 | static constexpr ::llvm::StringLiteral name = "test.decimal_shape" ; |
| 178 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 179 | static TestDecimalShapeAttr get(::mlir::MLIRContext *context, ::llvm::ArrayRef<int64_t> shape); |
| 180 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 181 | return {"decimal_shape" }; |
| 182 | } |
| 183 | |
| 184 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 185 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 186 | ::llvm::ArrayRef<int64_t> getShape() const; |
| 187 | }; |
| 188 | namespace detail { |
| 189 | struct TestI64ElementsAttrStorage; |
| 190 | } // namespace detail |
| 191 | class TestI64ElementsAttr : public ::mlir::Attribute::AttrBase<TestI64ElementsAttr, ::mlir::Attribute, detail::TestI64ElementsAttrStorage, ::mlir::TypedAttr::Trait, ::mlir::ElementsAttr::Trait> { |
| 192 | public: |
| 193 | using Base::Base; |
| 194 | /// The set of data types that can be iterated by this attribute. |
| 195 | using ContiguousIterableTypesT = std::tuple<uint64_t>; |
| 196 | using NonContiguousIterableTypesT = std::tuple<mlir::Attribute, llvm::APInt>; |
| 197 | |
| 198 | /// Provide begin iterators for the various iterable types. |
| 199 | // * uint64_t |
| 200 | mlir::FailureOr<const uint64_t *> |
| 201 | try_value_begin_impl(OverloadToken<uint64_t>) const { |
| 202 | return getElements().begin(); |
| 203 | } |
| 204 | // * Attribute |
| 205 | auto try_value_begin_impl(OverloadToken<mlir::Attribute>) const { |
| 206 | mlir::Type elementType = getType().getElementType(); |
| 207 | return mlir::success(Y: llvm::map_range(C: getElements(), F: [=](uint64_t value) { |
| 208 | return mlir::IntegerAttr::get(type: elementType, |
| 209 | value: llvm::APInt(/*numBits=*/64, value)); |
| 210 | }).begin()); |
| 211 | } |
| 212 | // * APInt |
| 213 | auto try_value_begin_impl(OverloadToken<llvm::APInt>) const { |
| 214 | return mlir::success(Y: llvm::map_range(C: getElements(), F: [=](uint64_t value) { |
| 215 | return llvm::APInt(/*numBits=*/64, value); |
| 216 | }).begin()); |
| 217 | } |
| 218 | static constexpr ::llvm::StringLiteral name = "test.i64_elements" ; |
| 219 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 220 | using Base::getChecked; |
| 221 | static TestI64ElementsAttr get(::mlir::MLIRContext *context, ::mlir::ShapedType type, ::llvm::ArrayRef<uint64_t> elements); |
| 222 | static TestI64ElementsAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::mlir::ShapedType type, ::llvm::ArrayRef<uint64_t> elements); |
| 223 | static ::llvm::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::ShapedType type, ::llvm::ArrayRef<uint64_t> elements); |
| 224 | static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::ShapedType type, ::llvm::ArrayRef<uint64_t> elements); |
| 225 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 226 | return {"i64_elements" }; |
| 227 | } |
| 228 | |
| 229 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 230 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 231 | ::mlir::ShapedType getType() const; |
| 232 | ::llvm::ArrayRef<uint64_t> getElements() const; |
| 233 | }; |
| 234 | namespace detail { |
| 235 | struct TestSubElementsAccessAttrStorage; |
| 236 | } // namespace detail |
| 237 | class TestSubElementsAccessAttr : public ::mlir::Attribute::AttrBase<TestSubElementsAccessAttr, ::mlir::Attribute, detail::TestSubElementsAccessAttrStorage> { |
| 238 | public: |
| 239 | using Base::Base; |
| 240 | static constexpr ::llvm::StringLiteral name = "test.sub_elements_access" ; |
| 241 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 242 | static TestSubElementsAccessAttr get(::mlir::MLIRContext *context, ::mlir::Attribute first, ::mlir::Attribute second, ::mlir::Attribute third); |
| 243 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 244 | return {"sub_elements_access" }; |
| 245 | } |
| 246 | |
| 247 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 248 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 249 | ::mlir::Attribute getFirst() const; |
| 250 | ::mlir::Attribute getSecond() const; |
| 251 | ::mlir::Attribute getThird() const; |
| 252 | }; |
| 253 | namespace detail { |
| 254 | struct CompoundNestedInnerAttrStorage; |
| 255 | } // namespace detail |
| 256 | class CompoundNestedInnerAttr : public ::mlir::Attribute::AttrBase<CompoundNestedInnerAttr, ::mlir::Attribute, detail::CompoundNestedInnerAttrStorage> { |
| 257 | public: |
| 258 | using Base::Base; |
| 259 | static constexpr ::llvm::StringLiteral name = "test.cmpnd_nested_inner" ; |
| 260 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 261 | using Base::getChecked; |
| 262 | static CompoundNestedInnerAttr get(::mlir::MLIRContext *context, int some_int, ::test::CompoundAAttr cmpdA); |
| 263 | static CompoundNestedInnerAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, int some_int, ::test::CompoundAAttr cmpdA); |
| 264 | static ::llvm::LogicalResult verifyInvariantsImpl(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, int some_int, ::test::CompoundAAttr cmpdA); |
| 265 | static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, int some_int, ::test::CompoundAAttr cmpdA); |
| 266 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 267 | return {"cmpnd_nested_inner" }; |
| 268 | } |
| 269 | |
| 270 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 271 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 272 | int getSomeInt() const; |
| 273 | ::test::CompoundAAttr getCmpdA() const; |
| 274 | }; |
| 275 | namespace detail { |
| 276 | struct CompoundNestedOuterAttrStorage; |
| 277 | } // namespace detail |
| 278 | class CompoundNestedOuterAttr : public ::mlir::Attribute::AttrBase<CompoundNestedOuterAttr, ::mlir::Attribute, detail::CompoundNestedOuterAttrStorage> { |
| 279 | public: |
| 280 | using Base::Base; |
| 281 | static constexpr ::llvm::StringLiteral name = "test.cmpnd_nested_outer" ; |
| 282 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 283 | using Base::getChecked; |
| 284 | static CompoundNestedOuterAttr get(::mlir::MLIRContext *context, ::test::CompoundNestedInnerAttr inner); |
| 285 | static CompoundNestedOuterAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::test::CompoundNestedInnerAttr inner); |
| 286 | static ::llvm::LogicalResult verifyInvariantsImpl(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::test::CompoundNestedInnerAttr inner); |
| 287 | static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::test::CompoundNestedInnerAttr inner); |
| 288 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 289 | return {"cmpnd_nested_outer" }; |
| 290 | } |
| 291 | |
| 292 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 293 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 294 | ::test::CompoundNestedInnerAttr getInner() const; |
| 295 | }; |
| 296 | namespace detail { |
| 297 | struct CompoundNestedOuterQualAttrStorage; |
| 298 | } // namespace detail |
| 299 | class CompoundNestedOuterQualAttr : public ::mlir::Attribute::AttrBase<CompoundNestedOuterQualAttr, ::mlir::Attribute, detail::CompoundNestedOuterQualAttrStorage> { |
| 300 | public: |
| 301 | using Base::Base; |
| 302 | static constexpr ::llvm::StringLiteral name = "test.cmpnd_nested_outer_qual" ; |
| 303 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 304 | using Base::getChecked; |
| 305 | static CompoundNestedOuterQualAttr get(::mlir::MLIRContext *context, ::test::CompoundNestedInnerAttr inner); |
| 306 | static CompoundNestedOuterQualAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::test::CompoundNestedInnerAttr inner); |
| 307 | static ::llvm::LogicalResult verifyInvariantsImpl(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::test::CompoundNestedInnerAttr inner); |
| 308 | static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::test::CompoundNestedInnerAttr inner); |
| 309 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 310 | return {"cmpnd_nested_outer_qual" }; |
| 311 | } |
| 312 | |
| 313 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 314 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 315 | ::test::CompoundNestedInnerAttr getInner() const; |
| 316 | }; |
| 317 | namespace detail { |
| 318 | struct TestAttrWithFormatAttrStorage; |
| 319 | } // namespace detail |
| 320 | class TestAttrWithFormatAttr : public ::mlir::Attribute::AttrBase<TestAttrWithFormatAttr, ::mlir::Attribute, detail::TestAttrWithFormatAttrStorage> { |
| 321 | public: |
| 322 | using Base::Base; |
| 323 | static constexpr ::llvm::StringLiteral name = "test.attr_with_format" ; |
| 324 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 325 | using Base::getChecked; |
| 326 | static TestAttrWithFormatAttr get(::mlir::MLIRContext *context, int64_t one, std::string two, ::mlir::IntegerAttr three, ::llvm::ArrayRef<int> four, uint64_t five, ::llvm::ArrayRef<int> six, ::llvm::ArrayRef<AttrWithTypeBuilderAttr> arrayOfAttrWithTypeBuilderAttr); |
| 327 | static TestAttrWithFormatAttr getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, int64_t one, std::string two, ::mlir::IntegerAttr three, ::llvm::ArrayRef<int> four, uint64_t five, ::llvm::ArrayRef<int> six, ::llvm::ArrayRef<AttrWithTypeBuilderAttr> arrayOfAttrWithTypeBuilderAttr); |
| 328 | static ::llvm::LogicalResult verify(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, int64_t one, std::string two, ::mlir::IntegerAttr three, ::llvm::ArrayRef<int> four, uint64_t five, ::llvm::ArrayRef<int> six, ::llvm::ArrayRef<AttrWithTypeBuilderAttr> arrayOfAttrWithTypeBuilderAttr); |
| 329 | static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, int64_t one, std::string two, ::mlir::IntegerAttr three, ::llvm::ArrayRef<int> four, uint64_t five, ::llvm::ArrayRef<int> six, ::llvm::ArrayRef<AttrWithTypeBuilderAttr> arrayOfAttrWithTypeBuilderAttr); |
| 330 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 331 | return {"attr_with_format" }; |
| 332 | } |
| 333 | |
| 334 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 335 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 336 | int64_t getOne() const; |
| 337 | llvm::StringRef getTwo() const; |
| 338 | ::mlir::IntegerAttr getThree() const; |
| 339 | ::llvm::ArrayRef<int> getFour() const; |
| 340 | uint64_t getFive() const; |
| 341 | ::llvm::ArrayRef<int> getSix() const; |
| 342 | ::llvm::ArrayRef<AttrWithTypeBuilderAttr> getArrayOfAttrWithTypeBuilderAttr() const; |
| 343 | }; |
| 344 | namespace detail { |
| 345 | struct TestAttrWithOptionalSignedAttrStorage; |
| 346 | } // namespace detail |
| 347 | class TestAttrWithOptionalSignedAttr : public ::mlir::Attribute::AttrBase<TestAttrWithOptionalSignedAttr, ::mlir::Attribute, detail::TestAttrWithOptionalSignedAttrStorage> { |
| 348 | public: |
| 349 | using Base::Base; |
| 350 | static constexpr ::llvm::StringLiteral name = "test.attr_with_optional_signed" ; |
| 351 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 352 | static TestAttrWithOptionalSignedAttr get(::mlir::MLIRContext *context, std::optional<int64_t> value); |
| 353 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 354 | return {"attr_with_optional_signed" }; |
| 355 | } |
| 356 | |
| 357 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 358 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 359 | std::optional<int64_t> getValue() const; |
| 360 | }; |
| 361 | namespace detail { |
| 362 | struct TestAttrWithOptionalUnsignedAttrStorage; |
| 363 | } // namespace detail |
| 364 | class TestAttrWithOptionalUnsignedAttr : public ::mlir::Attribute::AttrBase<TestAttrWithOptionalUnsignedAttr, ::mlir::Attribute, detail::TestAttrWithOptionalUnsignedAttrStorage> { |
| 365 | public: |
| 366 | using Base::Base; |
| 367 | static constexpr ::llvm::StringLiteral name = "test.attr_with_optional_unsigned" ; |
| 368 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 369 | static TestAttrWithOptionalUnsignedAttr get(::mlir::MLIRContext *context, std::optional<uint64_t> value); |
| 370 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 371 | return {"attr_with_optional_unsigned" }; |
| 372 | } |
| 373 | |
| 374 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 375 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 376 | std::optional<uint64_t> getValue() const; |
| 377 | }; |
| 378 | namespace detail { |
| 379 | struct TestAttrWithOptionalEnumAttrStorage; |
| 380 | } // namespace detail |
| 381 | class TestAttrWithOptionalEnumAttr : public ::mlir::Attribute::AttrBase<TestAttrWithOptionalEnumAttr, ::mlir::Attribute, detail::TestAttrWithOptionalEnumAttrStorage> { |
| 382 | public: |
| 383 | using Base::Base; |
| 384 | static constexpr ::llvm::StringLiteral name = "test.attr_with_optional_enum" ; |
| 385 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 386 | static TestAttrWithOptionalEnumAttr get(::mlir::MLIRContext *context, std::optional<SimpleEnum> value); |
| 387 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 388 | return {"attr_with_optional_enum" }; |
| 389 | } |
| 390 | |
| 391 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 392 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 393 | std::optional<SimpleEnum> getValue() const; |
| 394 | }; |
| 395 | namespace detail { |
| 396 | struct TestAttrUglyAttrStorage; |
| 397 | } // namespace detail |
| 398 | class TestAttrUglyAttr : public ::mlir::Attribute::AttrBase<TestAttrUglyAttr, ::mlir::Attribute, detail::TestAttrUglyAttrStorage> { |
| 399 | public: |
| 400 | using Base::Base; |
| 401 | static constexpr ::llvm::StringLiteral name = "test.attr_ugly" ; |
| 402 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 403 | static TestAttrUglyAttr get(::mlir::MLIRContext *context, ::mlir::Attribute attr); |
| 404 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 405 | return {"attr_ugly" }; |
| 406 | } |
| 407 | |
| 408 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 409 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 410 | ::mlir::Attribute getAttr() const; |
| 411 | }; |
| 412 | namespace detail { |
| 413 | struct TestAttrParamsAttrStorage; |
| 414 | } // namespace detail |
| 415 | class TestAttrParamsAttr : public ::mlir::Attribute::AttrBase<TestAttrParamsAttr, ::mlir::Attribute, detail::TestAttrParamsAttrStorage> { |
| 416 | public: |
| 417 | using Base::Base; |
| 418 | static constexpr ::llvm::StringLiteral name = "test.attr_params" ; |
| 419 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 420 | static TestAttrParamsAttr get(::mlir::MLIRContext *context, int v0, int v1); |
| 421 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 422 | return {"attr_params" }; |
| 423 | } |
| 424 | |
| 425 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 426 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 427 | int getV0() const; |
| 428 | int getV1() const; |
| 429 | }; |
| 430 | namespace detail { |
| 431 | struct TestAttrWithTypeParamAttrStorage; |
| 432 | } // namespace detail |
| 433 | class TestAttrWithTypeParamAttr : public ::mlir::Attribute::AttrBase<TestAttrWithTypeParamAttr, ::mlir::Attribute, detail::TestAttrWithTypeParamAttrStorage> { |
| 434 | public: |
| 435 | using Base::Base; |
| 436 | static constexpr ::llvm::StringLiteral name = "test.attr_with_type" ; |
| 437 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 438 | static TestAttrWithTypeParamAttr get(::mlir::MLIRContext *context, ::mlir::IntegerType int_type, ::mlir::Type any_type); |
| 439 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 440 | return {"attr_with_type" }; |
| 441 | } |
| 442 | |
| 443 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 444 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 445 | ::mlir::IntegerType getIntType() const; |
| 446 | ::mlir::Type getAnyType() const; |
| 447 | }; |
| 448 | namespace detail { |
| 449 | struct TestAttrSelfTypeParameterFormatAttrStorage; |
| 450 | } // namespace detail |
| 451 | class TestAttrSelfTypeParameterFormatAttr : public ::mlir::Attribute::AttrBase<TestAttrSelfTypeParameterFormatAttr, ::mlir::Attribute, detail::TestAttrSelfTypeParameterFormatAttrStorage, ::mlir::TypedAttr::Trait> { |
| 452 | public: |
| 453 | using Base::Base; |
| 454 | static constexpr ::llvm::StringLiteral name = "test.attr_self_type_format" ; |
| 455 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 456 | static TestAttrSelfTypeParameterFormatAttr get(::mlir::MLIRContext *context, int a, ::mlir::Type type); |
| 457 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 458 | return {"attr_self_type_format" }; |
| 459 | } |
| 460 | |
| 461 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 462 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 463 | int getA() const; |
| 464 | ::mlir::Type getType() const; |
| 465 | }; |
| 466 | namespace detail { |
| 467 | struct TestAttrSelfTypeParameterStructFormatAttrStorage; |
| 468 | } // namespace detail |
| 469 | class TestAttrSelfTypeParameterStructFormatAttr : public ::mlir::Attribute::AttrBase<TestAttrSelfTypeParameterStructFormatAttr, ::mlir::Attribute, detail::TestAttrSelfTypeParameterStructFormatAttrStorage, ::mlir::TypedAttr::Trait> { |
| 470 | public: |
| 471 | using Base::Base; |
| 472 | static constexpr ::llvm::StringLiteral name = "test.attr_self_type_struct_format" ; |
| 473 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 474 | static TestAttrSelfTypeParameterStructFormatAttr get(::mlir::MLIRContext *context, int a, ::mlir::Type type); |
| 475 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 476 | return {"attr_self_type_struct_format" }; |
| 477 | } |
| 478 | |
| 479 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 480 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 481 | int getA() const; |
| 482 | ::mlir::Type getType() const; |
| 483 | }; |
| 484 | namespace detail { |
| 485 | struct TestOverrideBuilderAttrStorage; |
| 486 | } // namespace detail |
| 487 | class TestOverrideBuilderAttr : public ::mlir::Attribute::AttrBase<TestOverrideBuilderAttr, ::mlir::Attribute, detail::TestOverrideBuilderAttrStorage> { |
| 488 | public: |
| 489 | using Base::Base; |
| 490 | static constexpr ::llvm::StringLiteral name = "test.override_builder" ; |
| 491 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 492 | static ::mlir::Attribute get(::mlir::MLIRContext *context, int a); |
| 493 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 494 | return {"override_builder" }; |
| 495 | } |
| 496 | |
| 497 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 498 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 499 | int getA() const; |
| 500 | }; |
| 501 | namespace detail { |
| 502 | struct TestExtern1DI64ElementsAttrStorage; |
| 503 | } // namespace detail |
| 504 | class TestExtern1DI64ElementsAttr : public ::mlir::Attribute::AttrBase<TestExtern1DI64ElementsAttr, ::mlir::Attribute, detail::TestExtern1DI64ElementsAttrStorage, ::mlir::TypedAttr::Trait, ::mlir::ElementsAttr::Trait> { |
| 505 | public: |
| 506 | using Base::Base; |
| 507 | /// Return the elements referenced by this attribute. |
| 508 | llvm::ArrayRef<uint64_t> getElements() const; |
| 509 | |
| 510 | /// The set of data types that can be iterated by this attribute. |
| 511 | using ContiguousIterableTypesT = std::tuple<uint64_t>; |
| 512 | |
| 513 | /// Provide begin iterators for the various iterable types. |
| 514 | // * uint64_t |
| 515 | mlir::FailureOr<const uint64_t *> |
| 516 | try_value_begin_impl(OverloadToken<uint64_t>) const { |
| 517 | return getElements().begin(); |
| 518 | } |
| 519 | static constexpr ::llvm::StringLiteral name = "test.e1di64_elements" ; |
| 520 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 521 | static TestExtern1DI64ElementsAttr get(::mlir::MLIRContext *context, ::mlir::ShapedType type, TestDialectResourceBlobHandle handle); |
| 522 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 523 | return {"e1di64_elements" }; |
| 524 | } |
| 525 | |
| 526 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 527 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 528 | ::mlir::ShapedType getType() const; |
| 529 | TestDialectResourceBlobHandle getHandle() const; |
| 530 | }; |
| 531 | namespace detail { |
| 532 | struct ArrayOfUglyAttrsAttrStorage; |
| 533 | } // namespace detail |
| 534 | class ArrayOfUglyAttrsAttr : public ::mlir::Attribute::AttrBase<ArrayOfUglyAttrsAttr, ::mlir::Attribute, detail::ArrayOfUglyAttrsAttrStorage> { |
| 535 | public: |
| 536 | using Base::Base; |
| 537 | auto begin() const { return getValue().begin(); } |
| 538 | auto end() const { return getValue().end(); } |
| 539 | bool empty() const { return getValue().empty(); } |
| 540 | size_t size() const { return getValue().size(); } |
| 541 | auto &front() const { return getValue().front(); } |
| 542 | auto &back() const { return getValue().back(); } |
| 543 | auto &operator[](size_t index) { return getValue()[index]; } |
| 544 | operator ::llvm::ArrayRef<TestAttrUglyAttr>() const { return getValue(); } |
| 545 | static constexpr ::llvm::StringLiteral name = "test.array_of_ugly" ; |
| 546 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 547 | static ArrayOfUglyAttrsAttr get(::mlir::MLIRContext *context, ::llvm::ArrayRef<TestAttrUglyAttr> value); |
| 548 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 549 | return {"array_of_ugly" }; |
| 550 | } |
| 551 | |
| 552 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 553 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 554 | ::llvm::ArrayRef<TestAttrUglyAttr> getValue() const; |
| 555 | }; |
| 556 | namespace detail { |
| 557 | struct ArrayOfIntsAttrStorage; |
| 558 | } // namespace detail |
| 559 | class ArrayOfIntsAttr : public ::mlir::Attribute::AttrBase<ArrayOfIntsAttr, ::mlir::Attribute, detail::ArrayOfIntsAttrStorage> { |
| 560 | public: |
| 561 | using Base::Base; |
| 562 | auto begin() const { return getValue().begin(); } |
| 563 | auto end() const { return getValue().end(); } |
| 564 | bool empty() const { return getValue().empty(); } |
| 565 | size_t size() const { return getValue().size(); } |
| 566 | auto &front() const { return getValue().front(); } |
| 567 | auto &back() const { return getValue().back(); } |
| 568 | auto &operator[](size_t index) { return getValue()[index]; } |
| 569 | operator ::llvm::ArrayRef<int32_t>() const { return getValue(); } |
| 570 | static constexpr ::llvm::StringLiteral name = "test.array_of_ints" ; |
| 571 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 572 | static ArrayOfIntsAttr get(::mlir::MLIRContext *context, ::llvm::ArrayRef<int32_t> value); |
| 573 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 574 | return {"array_of_ints" }; |
| 575 | } |
| 576 | |
| 577 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 578 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 579 | ::llvm::ArrayRef<int32_t> getValue() const; |
| 580 | }; |
| 581 | namespace detail { |
| 582 | struct SimpleEnumAttrStorage; |
| 583 | } // namespace detail |
| 584 | class SimpleEnumAttr : public ::mlir::Attribute::AttrBase<SimpleEnumAttr, ::mlir::Attribute, detail::SimpleEnumAttrStorage> { |
| 585 | public: |
| 586 | using Base::Base; |
| 587 | static constexpr ::llvm::StringLiteral name = "test.simple_enum" ; |
| 588 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 589 | static SimpleEnumAttr get(::mlir::MLIRContext *context, ::test::SimpleEnum value); |
| 590 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 591 | return {"simple_enum" }; |
| 592 | } |
| 593 | |
| 594 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 595 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 596 | ::test::SimpleEnum getValue() const; |
| 597 | }; |
| 598 | namespace detail { |
| 599 | struct ArrayOfEnumsAttrStorage; |
| 600 | } // namespace detail |
| 601 | class ArrayOfEnumsAttr : public ::mlir::Attribute::AttrBase<ArrayOfEnumsAttr, ::mlir::Attribute, detail::ArrayOfEnumsAttrStorage> { |
| 602 | public: |
| 603 | using Base::Base; |
| 604 | auto begin() const { return getValue().begin(); } |
| 605 | auto end() const { return getValue().end(); } |
| 606 | bool empty() const { return getValue().empty(); } |
| 607 | size_t size() const { return getValue().size(); } |
| 608 | auto &front() const { return getValue().front(); } |
| 609 | auto &back() const { return getValue().back(); } |
| 610 | auto &operator[](size_t index) { return getValue()[index]; } |
| 611 | operator ::llvm::ArrayRef<SimpleEnumAttr>() const { return getValue(); } |
| 612 | static constexpr ::llvm::StringLiteral name = "test.array_of_enums" ; |
| 613 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 614 | static ArrayOfEnumsAttr get(::mlir::MLIRContext *context, ::llvm::ArrayRef<SimpleEnumAttr> value); |
| 615 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 616 | return {"array_of_enums" }; |
| 617 | } |
| 618 | |
| 619 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 620 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 621 | ::llvm::ArrayRef<SimpleEnumAttr> getValue() const; |
| 622 | }; |
| 623 | namespace detail { |
| 624 | struct TestCustomAnchorAttrStorage; |
| 625 | } // namespace detail |
| 626 | class TestCustomAnchorAttr : public ::mlir::Attribute::AttrBase<TestCustomAnchorAttr, ::mlir::Attribute, detail::TestCustomAnchorAttrStorage> { |
| 627 | public: |
| 628 | using Base::Base; |
| 629 | static constexpr ::llvm::StringLiteral name = "test.custom_anchor" ; |
| 630 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 631 | static TestCustomAnchorAttr get(::mlir::MLIRContext *context, int a, std::optional<int> b); |
| 632 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 633 | return {"custom_anchor" }; |
| 634 | } |
| 635 | |
| 636 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 637 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 638 | int getA() const; |
| 639 | std::optional<int> getB() const; |
| 640 | }; |
| 641 | namespace detail { |
| 642 | struct IteratorTypeAttrStorage; |
| 643 | } // namespace detail |
| 644 | class IteratorTypeAttr : public ::mlir::Attribute::AttrBase<IteratorTypeAttr, ::mlir::Attribute, detail::IteratorTypeAttrStorage> { |
| 645 | public: |
| 646 | using Base::Base; |
| 647 | static constexpr ::llvm::StringLiteral name = "test.iterator_type" ; |
| 648 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 649 | static IteratorTypeAttr get(::mlir::MLIRContext *context, ::mlir::utils::IteratorType value); |
| 650 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 651 | return {"iterator_type" }; |
| 652 | } |
| 653 | |
| 654 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 655 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 656 | ::mlir::utils::IteratorType getValue() const; |
| 657 | }; |
| 658 | namespace detail { |
| 659 | struct TestCopyCountAttrStorage; |
| 660 | } // namespace detail |
| 661 | class TestCopyCountAttr : public ::mlir::Attribute::AttrBase<TestCopyCountAttr, ::mlir::Attribute, detail::TestCopyCountAttrStorage> { |
| 662 | public: |
| 663 | using Base::Base; |
| 664 | static constexpr ::llvm::StringLiteral name = "test.copy_count" ; |
| 665 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 666 | static TestCopyCountAttr get(::mlir::MLIRContext *context, CopyCount copy_count); |
| 667 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 668 | return {"copy_count" }; |
| 669 | } |
| 670 | |
| 671 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 672 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 673 | const CopyCount &getCopyCount() const; |
| 674 | }; |
| 675 | namespace detail { |
| 676 | struct TestConditionalAliasAttrStorage; |
| 677 | } // namespace detail |
| 678 | class TestConditionalAliasAttr : public ::mlir::Attribute::AttrBase<TestConditionalAliasAttr, ::mlir::Attribute, detail::TestConditionalAliasAttrStorage> { |
| 679 | public: |
| 680 | using Base::Base; |
| 681 | static constexpr ::llvm::StringLiteral name = "test.conditional_alias" ; |
| 682 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 683 | static TestConditionalAliasAttr get(::mlir::MLIRContext *context, mlir::StringAttr value); |
| 684 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 685 | return {"conditional_alias" }; |
| 686 | } |
| 687 | |
| 688 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 689 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 690 | mlir::StringAttr getValue() const; |
| 691 | }; |
| 692 | namespace detail { |
| 693 | struct TestCustomFloatAttrStorage; |
| 694 | } // namespace detail |
| 695 | class TestCustomFloatAttr : public ::mlir::Attribute::AttrBase<TestCustomFloatAttr, ::mlir::Attribute, detail::TestCustomFloatAttrStorage> { |
| 696 | public: |
| 697 | using Base::Base; |
| 698 | static constexpr ::llvm::StringLiteral name = "test.custom_float" ; |
| 699 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 700 | static TestCustomFloatAttr get(::mlir::MLIRContext *context, mlir::StringAttr type_str, ::llvm::APFloat value); |
| 701 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 702 | return {"custom_float" }; |
| 703 | } |
| 704 | |
| 705 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 706 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 707 | mlir::StringAttr getTypeStr() const; |
| 708 | ::llvm::APFloat getValue() const; |
| 709 | }; |
| 710 | namespace detail { |
| 711 | struct TestCustomStructAttrStorage; |
| 712 | } // namespace detail |
| 713 | class TestCustomStructAttr : public ::mlir::Attribute::AttrBase<TestCustomStructAttr, ::mlir::Attribute, detail::TestCustomStructAttrStorage> { |
| 714 | public: |
| 715 | using Base::Base; |
| 716 | static constexpr ::llvm::StringLiteral name = "test.custom_struct" ; |
| 717 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 718 | static TestCustomStructAttr get(::mlir::MLIRContext *context, mlir::StringAttr type_str, int64_t value, mlir::ArrayAttr opt_value); |
| 719 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 720 | return {"custom_struct" }; |
| 721 | } |
| 722 | |
| 723 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 724 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 725 | mlir::StringAttr getTypeStr() const; |
| 726 | int64_t getValue() const; |
| 727 | mlir::ArrayAttr getOptValue() const; |
| 728 | }; |
| 729 | namespace detail { |
| 730 | struct TestConstMemorySpaceAttrStorage; |
| 731 | } // namespace detail |
| 732 | class TestConstMemorySpaceAttr : public ::mlir::Attribute::AttrBase<TestConstMemorySpaceAttr, ::mlir::Attribute, detail::TestConstMemorySpaceAttrStorage, ::mlir::ptr::MemorySpaceAttrInterface::Trait> { |
| 733 | public: |
| 734 | using Base::Base; |
| 735 | static constexpr ::llvm::StringLiteral name = "test.const_memory_space" ; |
| 736 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 737 | static TestConstMemorySpaceAttr get(::mlir::MLIRContext *context, unsigned addressSpace); |
| 738 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 739 | return {"const_memory_space" }; |
| 740 | } |
| 741 | |
| 742 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 743 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 744 | unsigned getAddressSpace() const; |
| 745 | bool isValidLoad(::mlir::Type type, ::mlir::ptr::AtomicOrdering ordering, ::mlir::IntegerAttr alignment, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) const; |
| 746 | bool isValidStore(::mlir::Type type, ::mlir::ptr::AtomicOrdering ordering, ::mlir::IntegerAttr alignment, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) const; |
| 747 | bool isValidAtomicOp(::mlir::ptr::AtomicBinOp op, ::mlir::Type type, ::mlir::ptr::AtomicOrdering ordering, ::mlir::IntegerAttr alignment, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) const; |
| 748 | bool isValidAtomicXchg(::mlir::Type type, ::mlir::ptr::AtomicOrdering successOrdering, ::mlir::ptr::AtomicOrdering failureOrdering, ::mlir::IntegerAttr alignment, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) const; |
| 749 | bool isValidAddrSpaceCast(::mlir::Type tgt, ::mlir::Type src, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) const; |
| 750 | bool isValidPtrIntCast(::mlir::Type intLikeTy, ::mlir::Type ptrLikeTy, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) const; |
| 751 | }; |
| 752 | namespace detail { |
| 753 | struct TestCustomLocationAttrStorage; |
| 754 | } // namespace detail |
| 755 | class TestCustomLocationAttr : public ::mlir::Attribute::AttrBase<TestCustomLocationAttr, ::mlir::LocationAttr, detail::TestCustomLocationAttrStorage, ::mlir::AttributeTrait::IsLocation> { |
| 756 | public: |
| 757 | using Base::Base; |
| 758 | static constexpr ::llvm::StringLiteral name = "test.custom_location" ; |
| 759 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 760 | static TestCustomLocationAttr get(::mlir::MLIRContext *context, mlir::StringAttr file, unsigned line); |
| 761 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 762 | return {"custom_location" }; |
| 763 | } |
| 764 | |
| 765 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 766 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 767 | mlir::StringAttr getFile() const; |
| 768 | unsigned getLine() const; |
| 769 | }; |
| 770 | namespace detail { |
| 771 | struct TestOpAsmAttrInterfaceAttrStorage; |
| 772 | } // namespace detail |
| 773 | class TestOpAsmAttrInterfaceAttr : public ::mlir::Attribute::AttrBase<TestOpAsmAttrInterfaceAttr, ::mlir::Attribute, detail::TestOpAsmAttrInterfaceAttrStorage, ::mlir::OpAsmAttrInterface::Trait> { |
| 774 | public: |
| 775 | using Base::Base; |
| 776 | static constexpr ::llvm::StringLiteral name = "test.op_asm_attr_interface" ; |
| 777 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 778 | static TestOpAsmAttrInterfaceAttr get(::mlir::MLIRContext *context, mlir::StringAttr value); |
| 779 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 780 | return {"op_asm_attr_interface" }; |
| 781 | } |
| 782 | |
| 783 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 784 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 785 | mlir::StringAttr getValue() const; |
| 786 | ::mlir::OpAsmAliasResult getAlias(::llvm::raw_ostream&os) const; |
| 787 | }; |
| 788 | namespace detail { |
| 789 | struct TestOpAsmAttrInterfaceTablegenDefaultAttrStorage; |
| 790 | } // namespace detail |
| 791 | class TestOpAsmAttrInterfaceTablegenDefaultAttr : public ::mlir::Attribute::AttrBase<TestOpAsmAttrInterfaceTablegenDefaultAttr, ::mlir::Attribute, detail::TestOpAsmAttrInterfaceTablegenDefaultAttrStorage, ::mlir::OpAsmAttrInterface::Trait> { |
| 792 | public: |
| 793 | using Base::Base; |
| 794 | static constexpr ::llvm::StringLiteral name = "test.op_asm_attr_interface_tablegen_default" ; |
| 795 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 796 | static TestOpAsmAttrInterfaceTablegenDefaultAttr get(::mlir::MLIRContext *context, mlir::StringAttr value); |
| 797 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 798 | return {"op_asm_attr_interface_tablegen_default" }; |
| 799 | } |
| 800 | |
| 801 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 802 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 803 | mlir::StringAttr getValue() const; |
| 804 | ::mlir::OpAsmAliasResult getAlias(::llvm::raw_ostream &os) const; |
| 805 | }; |
| 806 | namespace detail { |
| 807 | struct SlashAttrStorage; |
| 808 | } // namespace detail |
| 809 | class SlashAttr : public ::mlir::Attribute::AttrBase<SlashAttr, ::mlir::Attribute, detail::SlashAttrStorage> { |
| 810 | public: |
| 811 | using Base::Base; |
| 812 | static constexpr ::llvm::StringLiteral name = "test.slash_attr" ; |
| 813 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 814 | static SlashAttr get(::mlir::MLIRContext *context, int lhs, int rhs); |
| 815 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 816 | return {"slash_attr" }; |
| 817 | } |
| 818 | |
| 819 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 820 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 821 | int getLhs() const; |
| 822 | int getRhs() const; |
| 823 | }; |
| 824 | namespace detail { |
| 825 | struct TestCustomStorageCtorAttrAttrStorage; |
| 826 | } // namespace detail |
| 827 | class TestCustomStorageCtorAttrAttr : public ::mlir::Attribute::AttrBase<TestCustomStorageCtorAttrAttr, ::mlir::Attribute, detail::TestCustomStorageCtorAttrAttrStorage> { |
| 828 | public: |
| 829 | using Base::Base; |
| 830 | static constexpr ::llvm::StringLiteral name = "test.custom_storage_ctor_attr" ; |
| 831 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 832 | static TestCustomStorageCtorAttrAttr get(::mlir::MLIRContext *context, int value); |
| 833 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 834 | return {"custom_storage_ctor_attr" }; |
| 835 | } |
| 836 | |
| 837 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 838 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 839 | int getValue() const; |
| 840 | }; |
| 841 | namespace detail { |
| 842 | struct TestEnumAttrStorage; |
| 843 | } // namespace detail |
| 844 | class TestEnumAttr : public ::mlir::Attribute::AttrBase<TestEnumAttr, ::mlir::Attribute, detail::TestEnumAttrStorage> { |
| 845 | public: |
| 846 | using Base::Base; |
| 847 | static constexpr ::llvm::StringLiteral name = "test.enum" ; |
| 848 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 849 | static TestEnumAttr get(::mlir::MLIRContext *context, test::TestEnum value); |
| 850 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 851 | return {"enum" }; |
| 852 | } |
| 853 | |
| 854 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 855 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 856 | test::TestEnum getValue() const; |
| 857 | }; |
| 858 | namespace detail { |
| 859 | struct TestBitEnumAttrStorage; |
| 860 | } // namespace detail |
| 861 | class TestBitEnumAttr : public ::mlir::Attribute::AttrBase<TestBitEnumAttr, ::mlir::Attribute, detail::TestBitEnumAttrStorage> { |
| 862 | public: |
| 863 | using Base::Base; |
| 864 | static constexpr ::llvm::StringLiteral name = "test.bit_enum" ; |
| 865 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 866 | static TestBitEnumAttr get(::mlir::MLIRContext *context, test::TestBitEnum value); |
| 867 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 868 | return {"bit_enum" }; |
| 869 | } |
| 870 | |
| 871 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 872 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 873 | test::TestBitEnum getValue() const; |
| 874 | }; |
| 875 | namespace detail { |
| 876 | struct TestBitEnumVerticalBarAttrStorage; |
| 877 | } // namespace detail |
| 878 | class TestBitEnumVerticalBarAttr : public ::mlir::Attribute::AttrBase<TestBitEnumVerticalBarAttr, ::mlir::Attribute, detail::TestBitEnumVerticalBarAttrStorage> { |
| 879 | public: |
| 880 | using Base::Base; |
| 881 | static constexpr ::llvm::StringLiteral name = "test.bit_enum_vbar" ; |
| 882 | static constexpr ::llvm::StringLiteral dialectName = "test" ; |
| 883 | static TestBitEnumVerticalBarAttr get(::mlir::MLIRContext *context, test::TestBitEnumVerticalBar value); |
| 884 | static constexpr ::llvm::StringLiteral getMnemonic() { |
| 885 | return {"bit_enum_vbar" }; |
| 886 | } |
| 887 | |
| 888 | static ::mlir::Attribute parse(::mlir::AsmParser &odsParser, ::mlir::Type odsType); |
| 889 | void print(::mlir::AsmPrinter &odsPrinter) const; |
| 890 | test::TestBitEnumVerticalBar getValue() const; |
| 891 | }; |
| 892 | } // namespace test |
| 893 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::SimpleAAttr) |
| 894 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::CompoundAAttr) |
| 895 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::CompoundAttrNestedAttr) |
| 896 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::AttrWithSelfTypeParamAttr) |
| 897 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::AttrWithTypeBuilderAttr) |
| 898 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::AttrWithTraitAttr) |
| 899 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestDecimalShapeAttr) |
| 900 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestI64ElementsAttr) |
| 901 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestSubElementsAccessAttr) |
| 902 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::CompoundNestedInnerAttr) |
| 903 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::CompoundNestedOuterAttr) |
| 904 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::CompoundNestedOuterQualAttr) |
| 905 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrWithFormatAttr) |
| 906 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrWithOptionalSignedAttr) |
| 907 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrWithOptionalUnsignedAttr) |
| 908 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrWithOptionalEnumAttr) |
| 909 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrUglyAttr) |
| 910 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrParamsAttr) |
| 911 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrWithTypeParamAttr) |
| 912 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrSelfTypeParameterFormatAttr) |
| 913 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestAttrSelfTypeParameterStructFormatAttr) |
| 914 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestOverrideBuilderAttr) |
| 915 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestExtern1DI64ElementsAttr) |
| 916 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::ArrayOfUglyAttrsAttr) |
| 917 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::ArrayOfIntsAttr) |
| 918 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::SimpleEnumAttr) |
| 919 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::ArrayOfEnumsAttr) |
| 920 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestCustomAnchorAttr) |
| 921 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::IteratorTypeAttr) |
| 922 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestCopyCountAttr) |
| 923 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestConditionalAliasAttr) |
| 924 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestCustomFloatAttr) |
| 925 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestCustomStructAttr) |
| 926 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestConstMemorySpaceAttr) |
| 927 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestCustomLocationAttr) |
| 928 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestOpAsmAttrInterfaceAttr) |
| 929 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestOpAsmAttrInterfaceTablegenDefaultAttr) |
| 930 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::SlashAttr) |
| 931 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestCustomStorageCtorAttrAttr) |
| 932 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestEnumAttr) |
| 933 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestBitEnumAttr) |
| 934 | MLIR_DECLARE_EXPLICIT_TYPE_ID(::test::TestBitEnumVerticalBarAttr) |
| 935 | |
| 936 | #endif // GET_ATTRDEF_CLASSES |
| 937 | |
| 938 | |