1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op Declarations *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: DebugExtensionOps.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10namespace mlir::transform {
11
12/// Prints the parameter as a diagnostic remark
13/// This operation emits a diagnostic remark containing the string form of the
14/// attributes associated with the parameter provided as attribute. It takes
15/// as optional arguments:
16/// - an additional message text to prepend;
17/// - a handle pointing to operations the location of which will be used to
18/// emit the diagnostic; if multiple operations are associated, the
19/// diagnostic is emitted for all of their respective locations.
20///
21/// This operation always succeeds.
22class EmitParamAsRemarkOp;
23
24} // namespace mlir::transform
25namespace mlir::transform {
26
27/// Print a message as diagnostic remark attached to payload
28/// This operation emits a diagnostic remark with the given message at the
29/// location of each payload object associated with the argument. The argument
30/// may be an operation or a value handle.
31///
32/// This operation always succeeds.
33class EmitRemarkAtOp;
34
35} // namespace mlir::transform
36#ifdef GET_OP_CLASSES
37#undef GET_OP_CLASSES
38
39#include "mlir/Bytecode/BytecodeOpInterface.h"
40#include "mlir/IR/BuiltinAttributes.h"
41#include "mlir/IR/OpDefinition.h"
42#include "mlir/IR/Types.h"
43#include "mlir/Interfaces/SideEffectInterfaces.h"
44
45namespace mlir::transform {
46
47
48//===----------------------------------------------------------------------===//
49// ::mlir::transform::EmitParamAsRemarkOp declarations
50//===----------------------------------------------------------------------===//
51
52namespace detail {
53
54class EmitParamAsRemarkOpGenericAdaptorBase {
55public:
56 struct Properties {
57 using messageTy = ::mlir::StringAttr;
58 messageTy message;
59
60 auto getMessage() const {
61 auto &propStorage = this->message;
62 return ::llvm::dyn_cast_or_null<::mlir::StringAttr>(Val: propStorage);
63 }
64 void setMessage(const ::mlir::StringAttr &propValue) {
65 this->message = propValue;
66 }
67 bool operator==(const Properties &rhs) const {
68 return
69 rhs.message == this->message &&
70 true;
71 }
72 bool operator!=(const Properties &rhs) const {
73 return !(*this == rhs);
74 }
75 };
76protected:
77 ::mlir::DictionaryAttr odsAttrs;
78 ::std::optional<::mlir::OperationName> odsOpName;
79 Properties properties;
80 ::mlir::RegionRange odsRegions;
81public:
82 EmitParamAsRemarkOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
83 odsOpName.emplace(args: "transform.debug.emit_param_as_remark", args: odsAttrs.getContext());
84 }
85
86 EmitParamAsRemarkOpGenericAdaptorBase(EmitParamAsRemarkOp op);
87
88 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize);
89 const Properties &getProperties() {
90 return properties;
91 }
92
93 ::mlir::DictionaryAttr getAttributes() {
94 return odsAttrs;
95 }
96
97 ::mlir::StringAttr getMessageAttr() {
98 auto attr = ::llvm::dyn_cast_or_null<::mlir::StringAttr>(Val: getProperties().message);
99 return attr;
100 }
101
102 ::std::optional< ::llvm::StringRef > getMessage();
103};
104
105} // namespace detail
106template <typename RangeT>
107class EmitParamAsRemarkOpGenericAdaptor : public detail::EmitParamAsRemarkOpGenericAdaptorBase {
108 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
109 using Base = detail::EmitParamAsRemarkOpGenericAdaptorBase;
110 static constexpr int odsIndex_param = 0;
111 static constexpr int odsIndex_anchor = 1;
112public:
113 EmitParamAsRemarkOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
114
115 EmitParamAsRemarkOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EmitParamAsRemarkOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
116
117 EmitParamAsRemarkOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EmitParamAsRemarkOpGenericAdaptor(values, attrs, Properties{}, {}) {}
118
119 EmitParamAsRemarkOpGenericAdaptor(RangeT values, const EmitParamAsRemarkOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
120
121 template <typename LateInst = EmitParamAsRemarkOp, typename = std::enable_if_t<std::is_same_v<LateInst, EmitParamAsRemarkOp>>>
122 EmitParamAsRemarkOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
123
124 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
125 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
126 }
127
128 RangeT getODSOperands(unsigned index) {
129 auto valueRange = getODSOperandIndexAndLength(index);
130 return {std::next(odsOperands.begin(), valueRange.first),
131 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
132 }
133
134 ValueT getParam() {
135 return (*getODSOperands(index: 0).begin());
136 }
137
138 ValueT getAnchor() {
139 auto operands = getODSOperands(index: 1);
140 return operands.empty() ? ValueT{} : (*operands.begin());
141 }
142
143 RangeT getOperands() {
144 return odsOperands;
145 }
146
147private:
148 RangeT odsOperands;
149};
150class EmitParamAsRemarkOpAdaptor : public EmitParamAsRemarkOpGenericAdaptor<::mlir::ValueRange> {
151public:
152 using EmitParamAsRemarkOpGenericAdaptor::EmitParamAsRemarkOpGenericAdaptor;
153 EmitParamAsRemarkOpAdaptor(EmitParamAsRemarkOp op);
154
155 ::llvm::LogicalResult verify(::mlir::Location loc);
156};
157class EmitParamAsRemarkOp : public ::mlir::Op<EmitParamAsRemarkOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::AtLeastNOperands<1>::Impl, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::transform::TransformOpInterface::Trait, ::mlir::transform::MatchOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::transform::NavigationTransformOpTrait> {
158public:
159 using Op::Op;
160 using Op::print;
161 using Adaptor = EmitParamAsRemarkOpAdaptor;
162 template <typename RangeT>
163 using GenericAdaptor = EmitParamAsRemarkOpGenericAdaptor<RangeT>;
164 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
165 static constexpr int odsIndex_param = 0;
166 static constexpr int odsIndex_anchor = 1;
167 using Properties = FoldAdaptor::Properties;
168 using ::mlir::transform::TransformOpInterface::Trait<EmitParamAsRemarkOp>::allowsRepeatedHandleOperands;
169 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
170 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("message")};
171 return ::llvm::ArrayRef(attrNames);
172 }
173
174 ::mlir::StringAttr getMessageAttrName() {
175 return getAttributeNameForIndex(index: 0);
176 }
177
178 static ::mlir::StringAttr getMessageAttrName(::mlir::OperationName name) {
179 return getAttributeNameForIndex(name, index: 0);
180 }
181
182 static constexpr ::llvm::StringLiteral getOperationName() {
183 return ::llvm::StringLiteral("transform.debug.emit_param_as_remark");
184 }
185
186 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index);
187 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
188 auto [start, length] = getODSOperandIndexAndLength(index);
189 return getOperation()->getOperands().slice(n: start, m: length);
190 }
191
192 ::mlir::TypedValue<::mlir::transform::TransformParamTypeInterface> getParam() {
193 return ::llvm::cast<::mlir::TypedValue<::mlir::transform::TransformParamTypeInterface>>(Val: *getODSOperands(index: 0).begin());
194 }
195
196 ::mlir::TypedValue<::mlir::transform::TransformHandleTypeInterface> getAnchor() {
197 auto operands = getODSOperands(index: 1);
198 return operands.empty() ? ::mlir::TypedValue<::mlir::transform::TransformHandleTypeInterface>{} : ::llvm::cast<::mlir::TypedValue<::mlir::transform::TransformHandleTypeInterface>>(Val: *operands.begin());
199 }
200
201 ::mlir::OpOperand &getParamMutable() {
202 auto range = getODSOperandIndexAndLength(index: 0);
203 return getOperation()->getOpOperand(idx: range.first);
204 }
205
206 ::mlir::MutableOperandRange getAnchorMutable();
207 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
208 return {index, 1};
209 }
210
211 ::mlir::Operation::result_range getODSResults(unsigned index) {
212 auto valueRange = getODSResultIndexAndLength(index);
213 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
214 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
215 }
216
217 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
218 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
219 static llvm::hash_code computePropertiesHash(const Properties &prop);
220 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
221 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
222 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
223 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
224 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
225 void writeProperties(::mlir::DialectBytecodeWriter &writer);
226 ::mlir::StringAttr getMessageAttr() {
227 return ::llvm::dyn_cast_or_null<::mlir::StringAttr>(Val&: getProperties().message);
228 }
229
230 ::std::optional< ::llvm::StringRef > getMessage();
231 void setMessageAttr(::mlir::StringAttr attr) {
232 getProperties().message = attr;
233 }
234
235 void setMessage(::std::optional<::llvm::StringRef> attrValue);
236 ::mlir::Attribute removeMessageAttr() {
237 auto attr = getProperties().message;
238 getProperties().message = {};
239 return attr;
240 }
241
242 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value param, /*optional*/::mlir::Value anchor, /*optional*/::mlir::StringAttr message);
243 static EmitParamAsRemarkOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value param, /*optional*/::mlir::Value anchor, /*optional*/::mlir::StringAttr message);
244 static EmitParamAsRemarkOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value param, /*optional*/::mlir::Value anchor, /*optional*/::mlir::StringAttr message);
245 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value param, /*optional*/::mlir::Value anchor, /*optional*/::mlir::StringAttr message);
246 static EmitParamAsRemarkOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value param, /*optional*/::mlir::Value anchor, /*optional*/::mlir::StringAttr message);
247 static EmitParamAsRemarkOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value param, /*optional*/::mlir::Value anchor, /*optional*/::mlir::StringAttr message);
248 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
249 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
250 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
251 static EmitParamAsRemarkOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
252 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
253 static EmitParamAsRemarkOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
254 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
255 static EmitParamAsRemarkOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
256 static EmitParamAsRemarkOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
257 ::llvm::LogicalResult verifyInvariantsImpl();
258 ::llvm::LogicalResult verifyInvariants();
259 ::mlir::DiagnosedSilenceableFailure apply(::mlir::transform::TransformRewriter &rewriter, ::mlir::transform::TransformResults &transformResults, ::mlir::transform::TransformState &state);
260 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
261 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
262private:
263 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
264 return getAttributeNameForIndex(name: (*this)->getName(), index);
265 }
266
267 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
268 assert(index < 1 && "invalid attribute index");
269 assert(name.getStringRef() == getOperationName() && "invalid operation name");
270 assert(name.isRegistered() && "Operation isn't registered, missing a "
271 "dependent dialect loading?");
272 return name.getAttributeNames()[index];
273 }
274
275 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
276public:
277};
278
279} // namespace mlir::transform
280MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::transform::EmitParamAsRemarkOp)
281MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::transform::detail::EmitParamAsRemarkOpGenericAdaptorBase::Properties)
282
283namespace mlir::transform {
284
285
286//===----------------------------------------------------------------------===//
287// ::mlir::transform::EmitRemarkAtOp declarations
288//===----------------------------------------------------------------------===//
289
290namespace detail {
291
292class EmitRemarkAtOpGenericAdaptorBase {
293public:
294 struct Properties {
295 using messageTy = ::mlir::StringAttr;
296 messageTy message;
297
298 auto getMessage() const {
299 auto &propStorage = this->message;
300 return ::llvm::cast<::mlir::StringAttr>(Val: propStorage);
301 }
302 void setMessage(const ::mlir::StringAttr &propValue) {
303 this->message = propValue;
304 }
305 bool operator==(const Properties &rhs) const {
306 return
307 rhs.message == this->message &&
308 true;
309 }
310 bool operator!=(const Properties &rhs) const {
311 return !(*this == rhs);
312 }
313 };
314protected:
315 ::mlir::DictionaryAttr odsAttrs;
316 ::std::optional<::mlir::OperationName> odsOpName;
317 Properties properties;
318 ::mlir::RegionRange odsRegions;
319public:
320 EmitRemarkAtOpGenericAdaptorBase(::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : odsAttrs(attrs), properties(properties), odsRegions(regions) { if (odsAttrs)
321 odsOpName.emplace(args: "transform.debug.emit_remark_at", args: odsAttrs.getContext());
322 }
323
324 EmitRemarkAtOpGenericAdaptorBase(EmitRemarkAtOp op);
325
326 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index, unsigned odsOperandsSize) {
327 return {index, 1};
328 }
329
330 const Properties &getProperties() {
331 return properties;
332 }
333
334 ::mlir::DictionaryAttr getAttributes() {
335 return odsAttrs;
336 }
337
338 ::mlir::StringAttr getMessageAttr() {
339 auto attr = ::llvm::cast<::mlir::StringAttr>(Val: getProperties().message);
340 return attr;
341 }
342
343 ::llvm::StringRef getMessage();
344};
345
346} // namespace detail
347template <typename RangeT>
348class EmitRemarkAtOpGenericAdaptor : public detail::EmitRemarkAtOpGenericAdaptorBase {
349 using ValueT = ::llvm::detail::ValueOfRange<RangeT>;
350 using Base = detail::EmitRemarkAtOpGenericAdaptorBase;
351 static constexpr int odsIndex_at = 0;
352public:
353 EmitRemarkAtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, const Properties &properties, ::mlir::RegionRange regions = {}) : Base(attrs, properties, regions), odsOperands(values) {}
354
355 EmitRemarkAtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs, ::mlir::PropertyRef properties, ::mlir::RegionRange regions = {}) : EmitRemarkAtOpGenericAdaptor(values, attrs, (properties ? *properties.as<Properties *>() : Properties{}), regions) {}
356
357 EmitRemarkAtOpGenericAdaptor(RangeT values, ::mlir::DictionaryAttr attrs = nullptr) : EmitRemarkAtOpGenericAdaptor(values, attrs, Properties{}, {}) {}
358
359 EmitRemarkAtOpGenericAdaptor(RangeT values, const EmitRemarkAtOpGenericAdaptorBase &base) : Base(base), odsOperands(values) {}
360
361 template <typename LateInst = EmitRemarkAtOp, typename = std::enable_if_t<std::is_same_v<LateInst, EmitRemarkAtOp>>>
362 EmitRemarkAtOpGenericAdaptor(RangeT values, LateInst op) : Base(op), odsOperands(values) {}
363
364 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
365 return Base::getODSOperandIndexAndLength(index, odsOperandsSize: odsOperands.size());
366 }
367
368 RangeT getODSOperands(unsigned index) {
369 auto valueRange = getODSOperandIndexAndLength(index);
370 return {std::next(odsOperands.begin(), valueRange.first),
371 std::next(odsOperands.begin(), valueRange.first + valueRange.second)};
372 }
373
374 ValueT getAt() {
375 return (*getODSOperands(index: 0).begin());
376 }
377
378 RangeT getOperands() {
379 return odsOperands;
380 }
381
382private:
383 RangeT odsOperands;
384};
385class EmitRemarkAtOpAdaptor : public EmitRemarkAtOpGenericAdaptor<::mlir::ValueRange> {
386public:
387 using EmitRemarkAtOpGenericAdaptor::EmitRemarkAtOpGenericAdaptor;
388 EmitRemarkAtOpAdaptor(EmitRemarkAtOp op);
389
390 ::llvm::LogicalResult verify(::mlir::Location loc);
391};
392class EmitRemarkAtOp : public ::mlir::Op<EmitRemarkAtOp, ::mlir::OpTrait::ZeroRegions, ::mlir::OpTrait::ZeroResults, ::mlir::OpTrait::ZeroSuccessors, ::mlir::OpTrait::OneOperand, ::mlir::OpTrait::OpInvariants, ::mlir::BytecodeOpInterface::Trait, ::mlir::transform::TransformOpInterface::Trait, ::mlir::transform::MatchOpInterface::Trait, ::mlir::MemoryEffectOpInterface::Trait, ::mlir::transform::NavigationTransformOpTrait> {
393public:
394 using Op::Op;
395 using Op::print;
396 using Adaptor = EmitRemarkAtOpAdaptor;
397 template <typename RangeT>
398 using GenericAdaptor = EmitRemarkAtOpGenericAdaptor<RangeT>;
399 using FoldAdaptor = GenericAdaptor<::llvm::ArrayRef<::mlir::Attribute>>;
400 static constexpr int odsIndex_at = 0;
401 using Properties = FoldAdaptor::Properties;
402 using ::mlir::transform::TransformOpInterface::Trait<EmitRemarkAtOp>::allowsRepeatedHandleOperands;
403 static ::llvm::ArrayRef<::llvm::StringRef> getAttributeNames() {
404 static ::llvm::StringRef attrNames[] = {::llvm::StringRef("message")};
405 return ::llvm::ArrayRef(attrNames);
406 }
407
408 ::mlir::StringAttr getMessageAttrName() {
409 return getAttributeNameForIndex(index: 0);
410 }
411
412 static ::mlir::StringAttr getMessageAttrName(::mlir::OperationName name) {
413 return getAttributeNameForIndex(name, index: 0);
414 }
415
416 static constexpr ::llvm::StringLiteral getOperationName() {
417 return ::llvm::StringLiteral("transform.debug.emit_remark_at");
418 }
419
420 std::pair<unsigned, unsigned> getODSOperandIndexAndLength(unsigned index) {
421 return {index, 1};
422 }
423
424 ::mlir::Operation::operand_range getODSOperands(unsigned index) {
425 auto [start, length] = getODSOperandIndexAndLength(index);
426 return getOperation()->getOperands().slice(n: start, m: length);
427 }
428
429 ::mlir::TypedValue<::mlir::Type> getAt() {
430 return ::llvm::cast<::mlir::TypedValue<::mlir::Type>>(Val: *getODSOperands(index: 0).begin());
431 }
432
433 ::mlir::OpOperand &getAtMutable() {
434 auto range = getODSOperandIndexAndLength(index: 0);
435 return getOperation()->getOpOperand(idx: range.first);
436 }
437
438 std::pair<unsigned, unsigned> getODSResultIndexAndLength(unsigned index) {
439 return {index, 1};
440 }
441
442 ::mlir::Operation::result_range getODSResults(unsigned index) {
443 auto valueRange = getODSResultIndexAndLength(index);
444 return {std::next(x: getOperation()->result_begin(), n: valueRange.first),
445 std::next(x: getOperation()->result_begin(), n: valueRange.first + valueRange.second)};
446 }
447
448 static ::llvm::LogicalResult setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
449 static ::mlir::Attribute getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop);
450 static llvm::hash_code computePropertiesHash(const Properties &prop);
451 static std::optional<mlir::Attribute> getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name);
452 static void setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value);
453 static void walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor);
454 static ::llvm::LogicalResult verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError);
455 static ::llvm::LogicalResult readProperties(::mlir::DialectBytecodeReader &reader, ::mlir::OperationState &state);
456 void writeProperties(::mlir::DialectBytecodeWriter &writer);
457 ::mlir::StringAttr getMessageAttr() {
458 return ::llvm::cast<::mlir::StringAttr>(Val&: getProperties().message);
459 }
460
461 ::llvm::StringRef getMessage();
462 void setMessageAttr(::mlir::StringAttr attr) {
463 getProperties().message = attr;
464 }
465
466 void setMessage(::llvm::StringRef attrValue);
467 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value at, ::mlir::StringAttr message);
468 static EmitRemarkAtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value at, ::mlir::StringAttr message);
469 static EmitRemarkAtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value at, ::mlir::StringAttr message);
470 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value at, ::mlir::StringAttr message);
471 static EmitRemarkAtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value at, ::mlir::StringAttr message);
472 static EmitRemarkAtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value at, ::mlir::StringAttr message);
473 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value at, ::llvm::StringRef message);
474 static EmitRemarkAtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value at, ::llvm::StringRef message);
475 static EmitRemarkAtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value at, ::llvm::StringRef message);
476 static void build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value at, ::llvm::StringRef message);
477 static EmitRemarkAtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value at, ::llvm::StringRef message);
478 static EmitRemarkAtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value at, ::llvm::StringRef message);
479 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
480 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
481 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
482 static EmitRemarkAtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
483 [[deprecated("use the overload taking Properties and discardableAttributes instead")]]
484 static EmitRemarkAtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes = {});
485 static void build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
486 static EmitRemarkAtOp create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
487 static EmitRemarkAtOp create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes = {});
488 ::llvm::LogicalResult verifyInvariantsImpl();
489 ::llvm::LogicalResult verifyInvariants();
490 ::mlir::DiagnosedSilenceableFailure apply(::mlir::transform::TransformRewriter &rewriter, ::mlir::transform::TransformResults &transformResults, ::mlir::transform::TransformState &state);
491 static ::mlir::ParseResult parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result);
492 LLVM_ATTRIBUTE_MINSIZE void print(::mlir::OpAsmPrinter &_odsPrinter);
493private:
494 ::mlir::StringAttr getAttributeNameForIndex(unsigned index) {
495 return getAttributeNameForIndex(name: (*this)->getName(), index);
496 }
497
498 static ::mlir::StringAttr getAttributeNameForIndex(::mlir::OperationName name, unsigned index) {
499 assert(index < 1 && "invalid attribute index");
500 assert(name.getStringRef() == getOperationName() && "invalid operation name");
501 assert(name.isRegistered() && "Operation isn't registered, missing a "
502 "dependent dialect loading?");
503 return name.getAttributeNames()[index];
504 }
505
506 static void buildPropertiesAndDiscardableAttributes(::mlir::OperationState &odsState, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes);
507public:
508};
509
510} // namespace mlir::transform
511MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::transform::EmitRemarkAtOp)
512MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::transform::detail::EmitRemarkAtOpGenericAdaptorBase::Properties)
513
514
515#endif // GET_OP_CLASSES
516
517