1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op Definitions *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: LLVMAllOps.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10#ifdef GET_OP_CLASSES
11#undef GET_OP_CLASSES
12
13#include "mlir/IR/Builders.h"
14#include "mlir/IR/BuiltinAttributes.h"
15#include "mlir/IR/BuiltinTypes.h"
16#include "mlir/IR/OpImplementation.h"
17
18
19//===----------------------------------------------------------------------===//
20// Local Utility Method Definitions
21//===----------------------------------------------------------------------===//
22
23
24static ::llvm::LogicalResult __mlir_ods_local_type_constraint_6VarArg_LLVMAllOps1(
25 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
26 unsigned valueIndex) {
27 if (!((::llvm::isa<::mlir::LLVM::LLVMPointerType>(Val: type)))) {
28 return op->emitOpError(message: valueKind) << " #" << valueIndex
29 << " must be LLVM pointer type, but got " << type;
30 }
31 return ::mlir::success();
32}
33
34static ::llvm::LogicalResult __mlir_ods_local_type_constraint_6VarArg_LLVMAllOps2(
35 ::mlir::Operation *op, ::mlir::Type type, ::llvm::StringRef valueKind,
36 unsigned valueIndex) {
37 if (!((::mlir::LLVM::isCompatibleOuterType(type)))) {
38 return op->emitOpError(message: valueKind) << " #" << valueIndex
39 << " must be LLVM dialect-compatible type, but got " << type;
40 }
41 return ::mlir::success();
42}
43namespace mlir::LLVM {
44
45
46//===----------------------------------------------------------------------===//
47// ::mlir::LLVM::VaArgOp definitions
48//===----------------------------------------------------------------------===//
49
50namespace detail {
51
52VaArgOpGenericAdaptorBase::VaArgOpGenericAdaptorBase(VaArgOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
53
54
55} // namespace detail
56VaArgOpAdaptor::VaArgOpAdaptor(VaArgOp op) : VaArgOpGenericAdaptor(op->getOperands(), op) {}
57
58::llvm::LogicalResult VaArgOpAdaptor::verify(::mlir::Location loc) {
59 return ::mlir::success();
60}
61
62::llvm::LogicalResult VaArgOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
63 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
64 if (!dict) {
65 emitError() << "expected DictionaryAttr to set properties";
66 return ::mlir::failure();
67 }
68 return ::mlir::success();
69}
70
71::mlir::Attribute VaArgOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
72 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
73 ::mlir::Builder odsBuilder{ctx};
74
75 if (!attrs.empty())
76 return odsBuilder.getDictionaryAttr(value: attrs);
77 return {};
78}
79
80llvm::hash_code VaArgOp::computePropertiesHash(const Properties &prop) {
81 using llvm::hash_value;
82 return llvm::hash_combine();
83}
84
85std::optional<mlir::Attribute> VaArgOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
86 return std::nullopt;
87}
88
89void VaArgOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
90}
91
92void VaArgOp::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
93}
94
95::llvm::LogicalResult VaArgOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
96 return ::mlir::success();
97}
98
99void VaArgOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
100 if (resultType) odsState.addTypes(newTypes: resultType);
101 odsState.addOperands(newOperands: operands);
102 for (auto namedAttr : attributes)
103 odsState.addAttribute(name: namedAttr.getName(), attr: namedAttr.getValue());
104
105}
106
107VaArgOp VaArgOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
108 ::mlir::OperationState __state__(location, getOperationName());
109 build(odsBuilder&: builder, odsState&: __state__, resultType: std::forward<decltype(resultType)>(t&: resultType), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
110 auto __res__ = builder.create(state: __state__);
111 assert((::llvm::isa<VaArgOp>(__res__)) && "builder didn't return the right type");
112 return ::llvm::cast<VaArgOp>(Val: __res__);
113}
114
115VaArgOp VaArgOp::create(::mlir::ImplicitLocOpBuilder &builder, Type resultType, ValueRange operands, ArrayRef<NamedAttribute> attributes) {
116 return create(builder, location: builder.getLoc(), resultType: std::forward<decltype(resultType)>(t&: resultType), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
117}
118
119void VaArgOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Type res, ::mlir::Value arg) {
120 odsState.addOperands(newOperands: arg);
121 odsState.addTypes(newTypes: res);
122}
123
124VaArgOp VaArgOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Type res, ::mlir::Value arg) {
125 ::mlir::OperationState __state__(location, getOperationName());
126 build(odsBuilder&: builder, odsState&: __state__, res: std::forward<decltype(res)>(t&: res), arg: std::forward<decltype(arg)>(t&: arg));
127 auto __res__ = builder.create(state: __state__);
128 assert((::llvm::isa<VaArgOp>(__res__)) && "builder didn't return the right type");
129 return ::llvm::cast<VaArgOp>(Val: __res__);
130}
131
132VaArgOp VaArgOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Type res, ::mlir::Value arg) {
133 return create(builder, location: builder.getLoc(), res: std::forward<decltype(res)>(t&: res), arg: std::forward<decltype(arg)>(t&: arg));
134}
135
136void VaArgOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg) {
137 odsState.addOperands(newOperands: arg);
138 assert(resultTypes.size() == 1u && "mismatched number of results");
139 odsState.addTypes(newTypes&: resultTypes);
140}
141
142VaArgOp VaArgOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg) {
143 ::mlir::OperationState __state__(location, getOperationName());
144 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), arg: std::forward<decltype(arg)>(t&: arg));
145 auto __res__ = builder.create(state: __state__);
146 assert((::llvm::isa<VaArgOp>(__res__)) && "builder didn't return the right type");
147 return ::llvm::cast<VaArgOp>(Val: __res__);
148}
149
150VaArgOp VaArgOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg) {
151 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), arg: std::forward<decltype(arg)>(t&: arg));
152}
153
154void VaArgOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
155 assert(operands.size() == 1u && "mismatched number of parameters");
156 odsState.addOperands(newOperands: operands);
157 odsState.addAttributes(newAttributes: attributes);
158 assert(resultTypes.size() == 1u && "mismatched number of return types");
159 odsState.addTypes(newTypes&: resultTypes);
160}
161
162VaArgOp VaArgOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
163 ::mlir::OperationState __state__(location, getOperationName());
164 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
165 auto __res__ = builder.create(state: __state__);
166 assert((::llvm::isa<VaArgOp>(__res__)) && "builder didn't return the right type");
167 return ::llvm::cast<VaArgOp>(Val: __res__);
168}
169
170VaArgOp VaArgOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
171 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
172}
173
174void VaArgOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
175 assert(operands.size() == 1u && "mismatched number of parameters");
176 odsState.addOperands(newOperands: operands);
177 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
178 odsState.addAttributes(newAttributes: discardableAttributes);
179 assert(resultTypes.size() == 1u && "mismatched number of return types");
180 odsState.addTypes(newTypes&: resultTypes);
181}
182
183VaArgOp VaArgOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
184 ::mlir::OperationState __state__(location, getOperationName());
185 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
186 auto __res__ = builder.create(state: __state__);
187 assert((::llvm::isa<VaArgOp>(__res__)) && "builder didn't return the right type");
188 return ::llvm::cast<VaArgOp>(Val: __res__);
189}
190
191VaArgOp VaArgOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
192 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
193}
194
195::llvm::LogicalResult VaArgOp::verifyInvariantsImpl() {
196 {
197 unsigned index = 0; (void)index;
198 auto valueGroup0 = getODSOperands(index: 0);
199
200 for (auto v : valueGroup0) {
201 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_6VarArg_LLVMAllOps1(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
202 return ::mlir::failure();
203 }
204 }
205 {
206 unsigned index = 0; (void)index;
207 auto valueGroup0 = getODSResults(index: 0);
208
209 for (auto v : valueGroup0) {
210 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_6VarArg_LLVMAllOps2(op: *this, type: v.getType(), valueKind: "result", valueIndex: index++)))
211 return ::mlir::failure();
212 }
213 }
214 return ::mlir::success();
215}
216
217::llvm::LogicalResult VaArgOp::verifyInvariants() {
218 return verifyInvariantsImpl();
219}
220
221::mlir::ParseResult VaArgOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
222 ::mlir::OpAsmParser::UnresolvedOperand argRawOperand{};
223 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> argOperands(&argRawOperand, 1); ::llvm::SMLoc argOperandsLoc;
224 (void)argOperandsLoc;
225 ::llvm::ArrayRef<::mlir::Type> argTypes;
226 ::llvm::ArrayRef<::mlir::Type> resTypes;
227
228 argOperandsLoc = parser.getCurrentLocation();
229 if (parser.parseOperand(result&: argRawOperand))
230 return ::mlir::failure();
231 {
232 auto loc = parser.getCurrentLocation();(void)loc;
233 if (parser.parseOptionalAttrDict(result&: result.attributes))
234 return ::mlir::failure();
235 }
236 if (parser.parseColon())
237 return ::mlir::failure();
238
239 ::mlir::FunctionType arg__res_functionType;
240 if (parser.parseType(result&: arg__res_functionType))
241 return ::mlir::failure();
242 argTypes = arg__res_functionType.getInputs();
243 resTypes = arg__res_functionType.getResults();
244 result.addTypes(newTypes: resTypes);
245 // coverity[ARRAY_VS_SINGLETON]
246 if (parser.resolveOperands(operands&: argOperands, types&: argTypes, loc: argOperandsLoc, result&: result.operands))
247 return ::mlir::failure();
248 return ::mlir::success();
249}
250
251LLVM_ATTRIBUTE_MINSIZE void VaArgOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
252 _odsPrinter << ' ';
253 _odsPrinter << getArg();
254 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
255 _odsPrinter << " :";
256 _odsPrinter << ' ';
257 _odsPrinter.printFunctionalType(inputs: ::llvm::ArrayRef<::mlir::Type>(getArg().getType()), results: ::llvm::ArrayRef<::mlir::Type>(getRes().getType()));
258}
259
260
261} // namespace mlir::LLVM
262MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::VaArgOp)
263
264namespace mlir::LLVM {
265
266
267//===----------------------------------------------------------------------===//
268// ::mlir::LLVM::VaCopyOp definitions
269//===----------------------------------------------------------------------===//
270
271namespace detail {
272
273VaCopyOpGenericAdaptorBase::VaCopyOpGenericAdaptorBase(VaCopyOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
274
275
276} // namespace detail
277VaCopyOpAdaptor::VaCopyOpAdaptor(VaCopyOp op) : VaCopyOpGenericAdaptor(op->getOperands(), op) {}
278
279::llvm::LogicalResult VaCopyOpAdaptor::verify(::mlir::Location loc) {
280 return ::mlir::success();
281}
282
283::llvm::LogicalResult VaCopyOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
284 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
285 if (!dict) {
286 emitError() << "expected DictionaryAttr to set properties";
287 return ::mlir::failure();
288 }
289 return ::mlir::success();
290}
291
292::mlir::Attribute VaCopyOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
293 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
294 ::mlir::Builder odsBuilder{ctx};
295
296 if (!attrs.empty())
297 return odsBuilder.getDictionaryAttr(value: attrs);
298 return {};
299}
300
301llvm::hash_code VaCopyOp::computePropertiesHash(const Properties &prop) {
302 using llvm::hash_value;
303 return llvm::hash_combine();
304}
305
306std::optional<mlir::Attribute> VaCopyOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
307 return std::nullopt;
308}
309
310void VaCopyOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
311}
312
313void VaCopyOp::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
314}
315
316::llvm::LogicalResult VaCopyOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
317 return ::mlir::success();
318}
319
320void VaCopyOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value dest_list, ::mlir::Value src_list) {
321 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, dest_list, src_list);
322}
323
324VaCopyOp VaCopyOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value dest_list, ::mlir::Value src_list) {
325 ::mlir::OperationState __state__(location, getOperationName());
326 build(odsBuilder&: builder, odsState&: __state__, dest_list: std::forward<decltype(dest_list)>(t&: dest_list), src_list: std::forward<decltype(src_list)>(t&: src_list));
327 auto __res__ = builder.create(state: __state__);
328 assert((::llvm::isa<VaCopyOp>(__res__)) && "builder didn't return the right type");
329 return ::llvm::cast<VaCopyOp>(Val: __res__);
330}
331
332VaCopyOp VaCopyOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value dest_list, ::mlir::Value src_list) {
333 return create(builder, location: builder.getLoc(), dest_list: std::forward<decltype(dest_list)>(t&: dest_list), src_list: std::forward<decltype(src_list)>(t&: src_list));
334}
335
336void VaCopyOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value dest_list, ::mlir::Value src_list) {
337 odsState.addOperands(newOperands: dest_list);
338 odsState.addOperands(newOperands: src_list);
339 assert(resultTypes.size() == 0u && "mismatched number of results");
340 odsState.addTypes(newTypes&: resultTypes);
341}
342
343VaCopyOp VaCopyOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value dest_list, ::mlir::Value src_list) {
344 ::mlir::OperationState __state__(location, getOperationName());
345 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), dest_list: std::forward<decltype(dest_list)>(t&: dest_list), src_list: std::forward<decltype(src_list)>(t&: src_list));
346 auto __res__ = builder.create(state: __state__);
347 assert((::llvm::isa<VaCopyOp>(__res__)) && "builder didn't return the right type");
348 return ::llvm::cast<VaCopyOp>(Val: __res__);
349}
350
351VaCopyOp VaCopyOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value dest_list, ::mlir::Value src_list) {
352 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), dest_list: std::forward<decltype(dest_list)>(t&: dest_list), src_list: std::forward<decltype(src_list)>(t&: src_list));
353}
354
355void VaCopyOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
356 assert(operands.size() == 2u && "mismatched number of parameters");
357 odsState.addOperands(newOperands: operands);
358 odsState.addAttributes(newAttributes: attributes);
359 assert(resultTypes.size() == 0u && "mismatched number of return types");
360 odsState.addTypes(newTypes&: resultTypes);
361}
362
363VaCopyOp VaCopyOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
364 ::mlir::OperationState __state__(location, getOperationName());
365 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
366 auto __res__ = builder.create(state: __state__);
367 assert((::llvm::isa<VaCopyOp>(__res__)) && "builder didn't return the right type");
368 return ::llvm::cast<VaCopyOp>(Val: __res__);
369}
370
371VaCopyOp VaCopyOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
372 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
373}
374
375void VaCopyOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
376 assert(operands.size() == 2u && "mismatched number of parameters");
377 odsState.addOperands(newOperands: operands);
378 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
379 odsState.addAttributes(newAttributes: discardableAttributes);
380 assert(resultTypes.size() == 0u && "mismatched number of return types");
381 odsState.addTypes(newTypes&: resultTypes);
382}
383
384VaCopyOp VaCopyOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
385 ::mlir::OperationState __state__(location, getOperationName());
386 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
387 auto __res__ = builder.create(state: __state__);
388 assert((::llvm::isa<VaCopyOp>(__res__)) && "builder didn't return the right type");
389 return ::llvm::cast<VaCopyOp>(Val: __res__);
390}
391
392VaCopyOp VaCopyOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
393 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
394}
395
396::llvm::LogicalResult VaCopyOp::verifyInvariantsImpl() {
397 {
398 unsigned index = 0; (void)index;
399 auto valueGroup0 = getODSOperands(index: 0);
400
401 for (auto v : valueGroup0) {
402 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_6VarArg_LLVMAllOps1(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
403 return ::mlir::failure();
404 }
405 auto valueGroup1 = getODSOperands(index: 1);
406
407 for (auto v : valueGroup1) {
408 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_6VarArg_LLVMAllOps1(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
409 return ::mlir::failure();
410 }
411 }
412 return ::mlir::success();
413}
414
415::llvm::LogicalResult VaCopyOp::verifyInvariants() {
416 return verifyInvariantsImpl();
417}
418
419::mlir::ParseResult VaCopyOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
420 ::mlir::OpAsmParser::UnresolvedOperand src_listRawOperand{};
421 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> src_listOperands(&src_listRawOperand, 1); ::llvm::SMLoc src_listOperandsLoc;
422 (void)src_listOperandsLoc;
423 ::mlir::OpAsmParser::UnresolvedOperand dest_listRawOperand{};
424 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> dest_listOperands(&dest_listRawOperand, 1); ::llvm::SMLoc dest_listOperandsLoc;
425 (void)dest_listOperandsLoc;
426 ::llvm::SmallVector<::mlir::Type, 1> allOperandTypes;
427
428 src_listOperandsLoc = parser.getCurrentLocation();
429 if (parser.parseOperand(result&: src_listRawOperand))
430 return ::mlir::failure();
431 if (parser.parseKeyword(keyword: "to"))
432 return ::mlir::failure();
433
434 dest_listOperandsLoc = parser.getCurrentLocation();
435 if (parser.parseOperand(result&: dest_listRawOperand))
436 return ::mlir::failure();
437 {
438 auto loc = parser.getCurrentLocation();(void)loc;
439 if (parser.parseOptionalAttrDict(result&: result.attributes))
440 return ::mlir::failure();
441 }
442 if (parser.parseColon())
443 return ::mlir::failure();
444
445 if (parser.parseTypeList(result&: allOperandTypes))
446 return ::mlir::failure();
447 // coverity[ARRAY_VS_SINGLETON]
448 if (parser.resolveOperands(operands: ::llvm::concat<const ::mlir::OpAsmParser::UnresolvedOperand>(Ranges&: dest_listOperands, Ranges&: src_listOperands), types&: allOperandTypes, loc: parser.getNameLoc(), result&: result.operands))
449 return ::mlir::failure();
450 return ::mlir::success();
451}
452
453LLVM_ATTRIBUTE_MINSIZE void VaCopyOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
454 _odsPrinter << ' ';
455 _odsPrinter << getSrcList();
456 _odsPrinter << " to";
457 _odsPrinter << ' ';
458 _odsPrinter << getDestList();
459 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
460 _odsPrinter << " :";
461 _odsPrinter << ' ';
462 _odsPrinter << getOperation()->getOperandTypes();
463}
464
465
466} // namespace mlir::LLVM
467MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::VaCopyOp)
468
469namespace mlir::LLVM {
470
471
472//===----------------------------------------------------------------------===//
473// ::mlir::LLVM::VaEndOp definitions
474//===----------------------------------------------------------------------===//
475
476namespace detail {
477
478VaEndOpGenericAdaptorBase::VaEndOpGenericAdaptorBase(VaEndOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
479
480
481} // namespace detail
482VaEndOpAdaptor::VaEndOpAdaptor(VaEndOp op) : VaEndOpGenericAdaptor(op->getOperands(), op) {}
483
484::llvm::LogicalResult VaEndOpAdaptor::verify(::mlir::Location loc) {
485 return ::mlir::success();
486}
487
488::llvm::LogicalResult VaEndOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
489 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
490 if (!dict) {
491 emitError() << "expected DictionaryAttr to set properties";
492 return ::mlir::failure();
493 }
494 return ::mlir::success();
495}
496
497::mlir::Attribute VaEndOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
498 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
499 ::mlir::Builder odsBuilder{ctx};
500
501 if (!attrs.empty())
502 return odsBuilder.getDictionaryAttr(value: attrs);
503 return {};
504}
505
506llvm::hash_code VaEndOp::computePropertiesHash(const Properties &prop) {
507 using llvm::hash_value;
508 return llvm::hash_combine();
509}
510
511std::optional<mlir::Attribute> VaEndOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
512 return std::nullopt;
513}
514
515void VaEndOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
516}
517
518void VaEndOp::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
519}
520
521::llvm::LogicalResult VaEndOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
522 return ::mlir::success();
523}
524
525void VaEndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arg_list) {
526 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, arg_list);
527}
528
529VaEndOp VaEndOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_list) {
530 ::mlir::OperationState __state__(location, getOperationName());
531 build(odsBuilder&: builder, odsState&: __state__, arg_list: std::forward<decltype(arg_list)>(t&: arg_list));
532 auto __res__ = builder.create(state: __state__);
533 assert((::llvm::isa<VaEndOp>(__res__)) && "builder didn't return the right type");
534 return ::llvm::cast<VaEndOp>(Val: __res__);
535}
536
537VaEndOp VaEndOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_list) {
538 return create(builder, location: builder.getLoc(), arg_list: std::forward<decltype(arg_list)>(t&: arg_list));
539}
540
541void VaEndOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_list) {
542 odsState.addOperands(newOperands: arg_list);
543 assert(resultTypes.size() == 0u && "mismatched number of results");
544 odsState.addTypes(newTypes&: resultTypes);
545}
546
547VaEndOp VaEndOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_list) {
548 ::mlir::OperationState __state__(location, getOperationName());
549 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), arg_list: std::forward<decltype(arg_list)>(t&: arg_list));
550 auto __res__ = builder.create(state: __state__);
551 assert((::llvm::isa<VaEndOp>(__res__)) && "builder didn't return the right type");
552 return ::llvm::cast<VaEndOp>(Val: __res__);
553}
554
555VaEndOp VaEndOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_list) {
556 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), arg_list: std::forward<decltype(arg_list)>(t&: arg_list));
557}
558
559void VaEndOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
560 assert(operands.size() == 1u && "mismatched number of parameters");
561 odsState.addOperands(newOperands: operands);
562 odsState.addAttributes(newAttributes: attributes);
563 assert(resultTypes.size() == 0u && "mismatched number of return types");
564 odsState.addTypes(newTypes&: resultTypes);
565}
566
567VaEndOp VaEndOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
568 ::mlir::OperationState __state__(location, getOperationName());
569 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
570 auto __res__ = builder.create(state: __state__);
571 assert((::llvm::isa<VaEndOp>(__res__)) && "builder didn't return the right type");
572 return ::llvm::cast<VaEndOp>(Val: __res__);
573}
574
575VaEndOp VaEndOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
576 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
577}
578
579void VaEndOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
580 assert(operands.size() == 1u && "mismatched number of parameters");
581 odsState.addOperands(newOperands: operands);
582 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
583 odsState.addAttributes(newAttributes: discardableAttributes);
584 assert(resultTypes.size() == 0u && "mismatched number of return types");
585 odsState.addTypes(newTypes&: resultTypes);
586}
587
588VaEndOp VaEndOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
589 ::mlir::OperationState __state__(location, getOperationName());
590 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
591 auto __res__ = builder.create(state: __state__);
592 assert((::llvm::isa<VaEndOp>(__res__)) && "builder didn't return the right type");
593 return ::llvm::cast<VaEndOp>(Val: __res__);
594}
595
596VaEndOp VaEndOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
597 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
598}
599
600::llvm::LogicalResult VaEndOp::verifyInvariantsImpl() {
601 {
602 unsigned index = 0; (void)index;
603 auto valueGroup0 = getODSOperands(index: 0);
604
605 for (auto v : valueGroup0) {
606 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_6VarArg_LLVMAllOps1(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
607 return ::mlir::failure();
608 }
609 }
610 return ::mlir::success();
611}
612
613::llvm::LogicalResult VaEndOp::verifyInvariants() {
614 return verifyInvariantsImpl();
615}
616
617::mlir::ParseResult VaEndOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
618 ::mlir::OpAsmParser::UnresolvedOperand arg_listRawOperand{};
619 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> arg_listOperands(&arg_listRawOperand, 1); ::llvm::SMLoc arg_listOperandsLoc;
620 (void)arg_listOperandsLoc;
621 ::mlir::Type arg_listRawType{};
622 ::llvm::ArrayRef<::mlir::Type> arg_listTypes(&arg_listRawType, 1);
623
624 arg_listOperandsLoc = parser.getCurrentLocation();
625 if (parser.parseOperand(result&: arg_listRawOperand))
626 return ::mlir::failure();
627 {
628 auto loc = parser.getCurrentLocation();(void)loc;
629 if (parser.parseOptionalAttrDict(result&: result.attributes))
630 return ::mlir::failure();
631 }
632 if (parser.parseColon())
633 return ::mlir::failure();
634
635 if (parser.parseType(result&: arg_listRawType))
636 return ::mlir::failure();
637 // coverity[ARRAY_VS_SINGLETON]
638 if (parser.resolveOperands(operands&: arg_listOperands, types&: arg_listTypes, loc: arg_listOperandsLoc, result&: result.operands))
639 return ::mlir::failure();
640 return ::mlir::success();
641}
642
643LLVM_ATTRIBUTE_MINSIZE void VaEndOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
644 _odsPrinter << ' ';
645 _odsPrinter << getArgList();
646 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
647 _odsPrinter << " :";
648 _odsPrinter << ' ';
649 _odsPrinter << getArgList().getType();
650}
651
652
653} // namespace mlir::LLVM
654MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::VaEndOp)
655
656namespace mlir::LLVM {
657
658
659//===----------------------------------------------------------------------===//
660// ::mlir::LLVM::VaStartOp definitions
661//===----------------------------------------------------------------------===//
662
663namespace detail {
664
665VaStartOpGenericAdaptorBase::VaStartOpGenericAdaptorBase(VaStartOp op) : odsAttrs(op->getRawDictionaryAttrs()), odsOpName(op->getName()), properties(op.getProperties()), odsRegions(op->getRegions()) {}
666
667
668} // namespace detail
669VaStartOpAdaptor::VaStartOpAdaptor(VaStartOp op) : VaStartOpGenericAdaptor(op->getOperands(), op) {}
670
671::llvm::LogicalResult VaStartOpAdaptor::verify(::mlir::Location loc) {
672 return ::mlir::success();
673}
674
675::llvm::LogicalResult VaStartOp::setPropertiesFromAttr(Properties &prop, ::mlir::Attribute attr, ::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
676 ::mlir::DictionaryAttr dict = ::llvm::dyn_cast<::mlir::DictionaryAttr>(Val&: attr);
677 if (!dict) {
678 emitError() << "expected DictionaryAttr to set properties";
679 return ::mlir::failure();
680 }
681 return ::mlir::success();
682}
683
684::mlir::Attribute VaStartOp::getPropertiesAsAttr(::mlir::MLIRContext *ctx, const Properties &prop) {
685 ::mlir::SmallVector<::mlir::NamedAttribute> attrs;
686 ::mlir::Builder odsBuilder{ctx};
687
688 if (!attrs.empty())
689 return odsBuilder.getDictionaryAttr(value: attrs);
690 return {};
691}
692
693llvm::hash_code VaStartOp::computePropertiesHash(const Properties &prop) {
694 using llvm::hash_value;
695 return llvm::hash_combine();
696}
697
698std::optional<mlir::Attribute> VaStartOp::getInherentAttr(::mlir::MLIRContext *ctx, const Properties &prop, llvm::StringRef name) {
699 return std::nullopt;
700}
701
702void VaStartOp::setInherentAttr(Properties &prop, llvm::StringRef name, mlir::Attribute value) {
703}
704
705void VaStartOp::walkInherentAttrs(::mlir::MLIRContext *ctx, Properties &prop, ::llvm::function_ref<void(::llvm::StringRef, ::mlir::Attribute &)> visitor) {
706}
707
708::llvm::LogicalResult VaStartOp::verifyInherentAttrs(::mlir::OperationName opName, ::mlir::NamedAttrList &attrs, llvm::function_ref<::mlir::InFlightDiagnostic()> emitError) {
709 return ::mlir::success();
710}
711
712void VaStartOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::Value arg_list) {
713 build(odsBuilder, odsState, resultTypes: ::mlir::TypeRange{}, arg_list);
714}
715
716VaStartOp VaStartOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::Value arg_list) {
717 ::mlir::OperationState __state__(location, getOperationName());
718 build(odsBuilder&: builder, odsState&: __state__, arg_list: std::forward<decltype(arg_list)>(t&: arg_list));
719 auto __res__ = builder.create(state: __state__);
720 assert((::llvm::isa<VaStartOp>(__res__)) && "builder didn't return the right type");
721 return ::llvm::cast<VaStartOp>(Val: __res__);
722}
723
724VaStartOp VaStartOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::Value arg_list) {
725 return create(builder, location: builder.getLoc(), arg_list: std::forward<decltype(arg_list)>(t&: arg_list));
726}
727
728void VaStartOp::build(::mlir::OpBuilder &odsBuilder, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::Value arg_list) {
729 odsState.addOperands(newOperands: arg_list);
730 assert(resultTypes.size() == 0u && "mismatched number of results");
731 odsState.addTypes(newTypes&: resultTypes);
732}
733
734VaStartOp VaStartOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::Value arg_list) {
735 ::mlir::OperationState __state__(location, getOperationName());
736 build(odsBuilder&: builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), arg_list: std::forward<decltype(arg_list)>(t&: arg_list));
737 auto __res__ = builder.create(state: __state__);
738 assert((::llvm::isa<VaStartOp>(__res__)) && "builder didn't return the right type");
739 return ::llvm::cast<VaStartOp>(Val: __res__);
740}
741
742VaStartOp VaStartOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::Value arg_list) {
743 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), arg_list: std::forward<decltype(arg_list)>(t&: arg_list));
744}
745
746void VaStartOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
747 assert(operands.size() == 1u && "mismatched number of parameters");
748 odsState.addOperands(newOperands: operands);
749 odsState.addAttributes(newAttributes: attributes);
750 assert(resultTypes.size() == 0u && "mismatched number of return types");
751 odsState.addTypes(newTypes&: resultTypes);
752}
753
754VaStartOp VaStartOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
755 ::mlir::OperationState __state__(location, getOperationName());
756 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
757 auto __res__ = builder.create(state: __state__);
758 assert((::llvm::isa<VaStartOp>(__res__)) && "builder didn't return the right type");
759 return ::llvm::cast<VaStartOp>(Val: __res__);
760}
761
762VaStartOp VaStartOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, ::llvm::ArrayRef<::mlir::NamedAttribute> attributes) {
763 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), attributes: std::forward<decltype(attributes)>(t&: attributes));
764}
765
766void VaStartOp::build(::mlir::OpBuilder &, ::mlir::OperationState &odsState, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
767 assert(operands.size() == 1u && "mismatched number of parameters");
768 odsState.addOperands(newOperands: operands);
769 odsState.useProperties(newProperties&: const_cast<Properties&>(properties));
770 odsState.addAttributes(newAttributes: discardableAttributes);
771 assert(resultTypes.size() == 0u && "mismatched number of return types");
772 odsState.addTypes(newTypes&: resultTypes);
773}
774
775VaStartOp VaStartOp::create(::mlir::OpBuilder &builder, ::mlir::Location location, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
776 ::mlir::OperationState __state__(location, getOperationName());
777 build(builder, odsState&: __state__, resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
778 auto __res__ = builder.create(state: __state__);
779 assert((::llvm::isa<VaStartOp>(__res__)) && "builder didn't return the right type");
780 return ::llvm::cast<VaStartOp>(Val: __res__);
781}
782
783VaStartOp VaStartOp::create(::mlir::ImplicitLocOpBuilder &builder, ::mlir::TypeRange resultTypes, ::mlir::ValueRange operands, const Properties &properties, ::llvm::ArrayRef<::mlir::NamedAttribute> discardableAttributes) {
784 return create(builder, location: builder.getLoc(), resultTypes: std::forward<decltype(resultTypes)>(t&: resultTypes), operands: std::forward<decltype(operands)>(t&: operands), properties: std::forward<decltype(properties)>(t: properties), discardableAttributes: std::forward<decltype(discardableAttributes)>(t&: discardableAttributes));
785}
786
787::llvm::LogicalResult VaStartOp::verifyInvariantsImpl() {
788 {
789 unsigned index = 0; (void)index;
790 auto valueGroup0 = getODSOperands(index: 0);
791
792 for (auto v : valueGroup0) {
793 if (::mlir::failed(Result: __mlir_ods_local_type_constraint_6VarArg_LLVMAllOps1(op: *this, type: v.getType(), valueKind: "operand", valueIndex: index++)))
794 return ::mlir::failure();
795 }
796 }
797 return ::mlir::success();
798}
799
800::llvm::LogicalResult VaStartOp::verifyInvariants() {
801 return verifyInvariantsImpl();
802}
803
804::mlir::ParseResult VaStartOp::parse(::mlir::OpAsmParser &parser, ::mlir::OperationState &result) {
805 ::mlir::OpAsmParser::UnresolvedOperand arg_listRawOperand{};
806 ::llvm::ArrayRef<::mlir::OpAsmParser::UnresolvedOperand> arg_listOperands(&arg_listRawOperand, 1); ::llvm::SMLoc arg_listOperandsLoc;
807 (void)arg_listOperandsLoc;
808 ::mlir::Type arg_listRawType{};
809 ::llvm::ArrayRef<::mlir::Type> arg_listTypes(&arg_listRawType, 1);
810
811 arg_listOperandsLoc = parser.getCurrentLocation();
812 if (parser.parseOperand(result&: arg_listRawOperand))
813 return ::mlir::failure();
814 {
815 auto loc = parser.getCurrentLocation();(void)loc;
816 if (parser.parseOptionalAttrDict(result&: result.attributes))
817 return ::mlir::failure();
818 }
819 if (parser.parseColon())
820 return ::mlir::failure();
821
822 if (parser.parseType(result&: arg_listRawType))
823 return ::mlir::failure();
824 // coverity[ARRAY_VS_SINGLETON]
825 if (parser.resolveOperands(operands&: arg_listOperands, types&: arg_listTypes, loc: arg_listOperandsLoc, result&: result.operands))
826 return ::mlir::failure();
827 return ::mlir::success();
828}
829
830LLVM_ATTRIBUTE_MINSIZE void VaStartOp::print(::mlir::OpAsmPrinter &_odsPrinter) {
831 _odsPrinter << ' ';
832 _odsPrinter << getArgList();
833 _odsPrinter.printOptionalAttrDict(attrs: (*this)->getDiscardableAttrDictionary().getValue());
834 _odsPrinter << " :";
835 _odsPrinter << ' ';
836 _odsPrinter << getArgList().getType();
837}
838
839
840} // namespace mlir::LLVM
841MLIR_DEFINE_EXPLICIT_TYPE_ID(::mlir::LLVM::VaStartOp)
842
843
844//===----------------------------------------------------------------------===//
845// LLVMDialect VarArg Op Registration Hook
846//===----------------------------------------------------------------------===//
847
848void ::mlir::LLVM::registerLLVMDialectOperationsVarArg(::mlir::LLVM::LLVMDialect *dialect) {
849 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::VaArgOp>(dialect&: *dialect);
850 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::VaCopyOp>(dialect&: *dialect);
851 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::VaEndOp>(dialect&: *dialect);
852 ::mlir::RegisteredOperationName::insert<::mlir::LLVM::VaStartOp>(dialect&: *dialect);
853}
854
855#endif // GET_OP_CLASSES
856
857