LLZK 2.1.1
An open-source IR for Zero Knowledge (ZK) circuits
Loading...
Searching...
No Matches
Ops.capi.cpp.inc
Go to the documentation of this file.
1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* Op C API Definitions *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* From: Ops.td *|
7|* *|
8\*===----------------------------------------------------------------------===*/
9
10
11#include <limits>
12
13using namespace mlir;
14using namespace llvm;
15
16MlirOperation llzkArray_ArrayLengthOpBuild(MlirOpBuilder builder, MlirLocation location, MlirValue arr_ref, MlirValue dim) {
17 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString("array.len"), location);
18 mlirOperationStateEnableResultTypeInference(&state);
19 mlirOperationStateAddOperands(&state, 1, &arr_ref);
20 mlirOperationStateAddOperands(&state, 1, &dim);
21
22 return mlirOpBuilderInsert(builder, mlirOperationCreate(&state));
23}
24
25bool llzkOperationIsA_Array_ArrayLengthOp(MlirOperation inp) {
26 return llvm::isa<ArrayLengthOp>(unwrap(inp));
27}
28
29MlirValue llzkArray_ArrayLengthOpGetArrRef(MlirOperation op) {
30 auto range = llvm::cast<ArrayLengthOp>(unwrap(op)).getODSOperandIndexAndLength(0);
31 assert(range.second == 1 && "expected fixed operand segment size");
32 assert(
33 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
34 "operand index exceeds intptr_t range"
35 );
36 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first));
37}
38
39void llzkArray_ArrayLengthOpSetArrRef(MlirOperation op, MlirValue value) {
40 auto range = llvm::cast<ArrayLengthOp>(unwrap(op)).getODSOperandIndexAndLength(0);
41 assert(range.second == 1 && "expected fixed operand segment size");
42 assert(
43 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
44 "operand index exceeds intptr_t range"
45 );
46 mlirOperationSetOperand(op, static_cast<intptr_t>(range.first), value);
47}
48
49MlirValue llzkArray_ArrayLengthOpGetDim(MlirOperation op) {
50 auto range = llvm::cast<ArrayLengthOp>(unwrap(op)).getODSOperandIndexAndLength(1);
51 assert(range.second == 1 && "expected fixed operand segment size");
52 assert(
53 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
54 "operand index exceeds intptr_t range"
55 );
56 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first));
57}
58
59void llzkArray_ArrayLengthOpSetDim(MlirOperation op, MlirValue value) {
60 auto range = llvm::cast<ArrayLengthOp>(unwrap(op)).getODSOperandIndexAndLength(1);
61 assert(range.second == 1 && "expected fixed operand segment size");
62 assert(
63 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
64 "operand index exceeds intptr_t range"
65 );
66 mlirOperationSetOperand(op, static_cast<intptr_t>(range.first), value);
67}
68
69MlirValue llzkArray_ArrayLengthOpGetLength(MlirOperation op) {
70 return mlirOperationGetResult(op, 0);
71}
72
73MlirType llzkArray_ArrayLengthOpGetArrRefType(MlirOperation inp) {
74 return wrap(llvm::cast<ArrayLengthOp>(unwrap(inp)).getArrRefType());
75}
76
77bool llzkOperationIsA_Array_CreateArrayOp(MlirOperation inp) {
78 return llvm::isa<CreateArrayOp>(unwrap(inp));
79}
80
81intptr_t llzkArray_CreateArrayOpGetElementsCount(MlirOperation op) {
82 auto range = llvm::cast<CreateArrayOp>(unwrap(op)).getODSOperandIndexAndLength(0);
83 return range.second;
84}
85
86MlirValue llzkArray_CreateArrayOpGetElementsAt(MlirOperation op, intptr_t index) {
87 auto range = llvm::cast<CreateArrayOp>(unwrap(op)).getODSOperandIndexAndLength(0);
88 assert(index >= 0 && index < range.second && "variadic operand index out of range");
89 assert(
90 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
91 "operand index exceeds intptr_t range"
92 );
93 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first) + index);
94}
95
96void llzkArray_CreateArrayOpSetElements(MlirOperation op, intptr_t count, MlirValue const *values) {
97 if (count < 0)
98 return;
99 ::llvm::SmallVector<::mlir::Value> vals;
100 vals.reserve(static_cast<size_t>(count));
101 for (intptr_t i = 0; i < count; ++i)
102 vals.push_back(unwrap(values[i]));
103 ::llvm::cast<CreateArrayOp>(unwrap(op)).getElementsMutable().assign(vals);
104}
105
107 auto range = llvm::cast<CreateArrayOp>(unwrap(op)).getODSOperandIndexAndLength(1);
108 return range.second;
109}
110
111MlirValue llzkArray_CreateArrayOpGetMapOperandsAt(MlirOperation op, intptr_t index) {
112 auto range = llvm::cast<CreateArrayOp>(unwrap(op)).getODSOperandIndexAndLength(1);
113 assert(index >= 0 && index < range.second && "variadic operand index out of range");
114 assert(
115 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
116 "operand index exceeds intptr_t range"
117 );
118 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first) + index);
119}
120
121void llzkArray_CreateArrayOpSetMapOperands(MlirOperation op, intptr_t groupCount, MlirValueRange const *groups) {
122 if (groupCount < 0)
123 return;
124
125 ::llvm::SmallVector<::mlir::Value> vals;
126 for (intptr_t g = 0; g < groupCount; ++g) {
127 assert(groups[g].size >= 0 && "group size must be non-negative");
128 for (intptr_t i = 0; i < groups[g].size; ++i) {
129 vals.push_back(unwrap(groups[g].values[i]));
130 }
131 }
132 ::llvm::cast<CreateArrayOp>(unwrap(op)).getMapOperandsMutable().join().assign(vals);
133
134 ::llvm::SmallVector<int32_t> newGroupSizes;
135 newGroupSizes.reserve(static_cast<size_t>(groupCount));
136 for (intptr_t g = 0; g < groupCount; ++g) {
137 assert(
138 groups[g].size <= static_cast<intptr_t>(std::numeric_limits<int32_t>::max()) &&
139 "group size exceeds int32_t range"
140 );
141 newGroupSizes.push_back(static_cast<int32_t>(groups[g].size));
142 }
143 MlirContext ctx = mlirOperationGetContext(op);
144 assert(
145 newGroupSizes.size() <= static_cast<size_t>(std::numeric_limits<intptr_t>::max()) &&
146 "group count exceeds intptr_t range"
147 );
148 mlirOperationSetAttributeByName(
149 op, mlirStringRefCreateFromCString("mapOpGroupSizes"),
150 mlirDenseI32ArrayGet(ctx, static_cast<intptr_t>(newGroupSizes.size()), newGroupSizes.data())
151 );
152}
153
154MlirAttribute llzkArray_CreateArrayOpGetNumDimsPerMap(MlirOperation op) {
155 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("numDimsPerMap"));
156}
157
158void llzkArray_CreateArrayOpSetNumDimsPerMap(MlirOperation op, MlirAttribute attr) {
159 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("numDimsPerMap"), attr);
160}
161
162MlirAttribute llzkArray_CreateArrayOpGetMapOpGroupSizes(MlirOperation op) {
163 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString("mapOpGroupSizes"));
164}
165
166void llzkArray_CreateArrayOpSetMapOpGroupSizes(MlirOperation op, MlirAttribute attr) {
167 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString("mapOpGroupSizes"), attr);
168}
169
170MlirValue llzkArray_CreateArrayOpGetResult(MlirOperation op) {
171 return mlirOperationGetResult(op, 0);
172}
173
174MlirOperation llzkArray_ExtractArrayOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue arr_ref, intptr_t indicesSize, MlirValue const *indices) {
175 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString("array.extract"), location);
176 mlirOperationStateAddResults(&state, 1, &resultType);
177 mlirOperationStateAddOperands(&state, 1, &arr_ref);
178 mlirOperationStateAddOperands(&state, indicesSize, indices);
179
180 return mlirOpBuilderInsert(builder, mlirOperationCreate(&state));
181}
182
184 return llvm::isa<ExtractArrayOp>(unwrap(inp));
185}
186
187MlirValue llzkArray_ExtractArrayOpGetArrRef(MlirOperation op) {
188 auto range = llvm::cast<ExtractArrayOp>(unwrap(op)).getODSOperandIndexAndLength(0);
189 assert(range.second == 1 && "expected fixed operand segment size");
190 assert(
191 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
192 "operand index exceeds intptr_t range"
193 );
194 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first));
195}
196
197void llzkArray_ExtractArrayOpSetArrRef(MlirOperation op, MlirValue value) {
198 auto range = llvm::cast<ExtractArrayOp>(unwrap(op)).getODSOperandIndexAndLength(0);
199 assert(range.second == 1 && "expected fixed operand segment size");
200 assert(
201 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
202 "operand index exceeds intptr_t range"
203 );
204 mlirOperationSetOperand(op, static_cast<intptr_t>(range.first), value);
205}
206
207intptr_t llzkArray_ExtractArrayOpGetIndicesCount(MlirOperation op) {
208 auto range = llvm::cast<ExtractArrayOp>(unwrap(op)).getODSOperandIndexAndLength(1);
209 return range.second;
210}
211
212MlirValue llzkArray_ExtractArrayOpGetIndicesAt(MlirOperation op, intptr_t index) {
213 auto range = llvm::cast<ExtractArrayOp>(unwrap(op)).getODSOperandIndexAndLength(1);
214 assert(index >= 0 && index < range.second && "variadic operand index out of range");
215 assert(
216 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
217 "operand index exceeds intptr_t range"
218 );
219 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first) + index);
220}
221
222void llzkArray_ExtractArrayOpSetIndices(MlirOperation op, intptr_t count, MlirValue const *values) {
223 if (count < 0)
224 return;
225 ::llvm::SmallVector<::mlir::Value> vals;
226 vals.reserve(static_cast<size_t>(count));
227 for (intptr_t i = 0; i < count; ++i)
228 vals.push_back(unwrap(values[i]));
229 ::llvm::cast<ExtractArrayOp>(unwrap(op)).getIndicesMutable().assign(vals);
230}
231
232MlirValue llzkArray_ExtractArrayOpGetResult(MlirOperation op) {
233 return mlirOperationGetResult(op, 0);
234}
235
236MlirType llzkArray_ExtractArrayOpGetArrRefType(MlirOperation inp) {
237 return wrap(llvm::cast<ExtractArrayOp>(unwrap(inp)).getArrRefType());
238}
239
240MlirOperation llzkArray_InsertArrayOpBuild(MlirOpBuilder builder, MlirLocation location, MlirValue arr_ref, intptr_t indicesSize, MlirValue const *indices, MlirValue rvalue) {
241 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString("array.insert"), location);
242 mlirOperationStateAddOperands(&state, 1, &arr_ref);
243 mlirOperationStateAddOperands(&state, indicesSize, indices);
244 mlirOperationStateAddOperands(&state, 1, &rvalue);
245
246 return mlirOpBuilderInsert(builder, mlirOperationCreate(&state));
247}
248
250 return llvm::isa<InsertArrayOp>(unwrap(inp));
251}
252
253MlirValue llzkArray_InsertArrayOpGetArrRef(MlirOperation op) {
254 auto range = llvm::cast<InsertArrayOp>(unwrap(op)).getODSOperandIndexAndLength(0);
255 assert(range.second == 1 && "expected fixed operand segment size");
256 assert(
257 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
258 "operand index exceeds intptr_t range"
259 );
260 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first));
261}
262
263void llzkArray_InsertArrayOpSetArrRef(MlirOperation op, MlirValue value) {
264 auto range = llvm::cast<InsertArrayOp>(unwrap(op)).getODSOperandIndexAndLength(0);
265 assert(range.second == 1 && "expected fixed operand segment size");
266 assert(
267 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
268 "operand index exceeds intptr_t range"
269 );
270 mlirOperationSetOperand(op, static_cast<intptr_t>(range.first), value);
271}
272
273intptr_t llzkArray_InsertArrayOpGetIndicesCount(MlirOperation op) {
274 auto range = llvm::cast<InsertArrayOp>(unwrap(op)).getODSOperandIndexAndLength(1);
275 return range.second;
276}
277
278MlirValue llzkArray_InsertArrayOpGetIndicesAt(MlirOperation op, intptr_t index) {
279 auto range = llvm::cast<InsertArrayOp>(unwrap(op)).getODSOperandIndexAndLength(1);
280 assert(index >= 0 && index < range.second && "variadic operand index out of range");
281 assert(
282 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
283 "operand index exceeds intptr_t range"
284 );
285 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first) + index);
286}
287
288void llzkArray_InsertArrayOpSetIndices(MlirOperation op, intptr_t count, MlirValue const *values) {
289 if (count < 0)
290 return;
291 ::llvm::SmallVector<::mlir::Value> vals;
292 vals.reserve(static_cast<size_t>(count));
293 for (intptr_t i = 0; i < count; ++i)
294 vals.push_back(unwrap(values[i]));
295 ::llvm::cast<InsertArrayOp>(unwrap(op)).getIndicesMutable().assign(vals);
296}
297
298MlirValue llzkArray_InsertArrayOpGetRvalue(MlirOperation op) {
299 auto range = llvm::cast<InsertArrayOp>(unwrap(op)).getODSOperandIndexAndLength(2);
300 assert(range.second == 1 && "expected fixed operand segment size");
301 assert(
302 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
303 "operand index exceeds intptr_t range"
304 );
305 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first));
306}
307
308void llzkArray_InsertArrayOpSetRvalue(MlirOperation op, MlirValue value) {
309 auto range = llvm::cast<InsertArrayOp>(unwrap(op)).getODSOperandIndexAndLength(2);
310 assert(range.second == 1 && "expected fixed operand segment size");
311 assert(
312 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
313 "operand index exceeds intptr_t range"
314 );
315 mlirOperationSetOperand(op, static_cast<intptr_t>(range.first), value);
316}
317
318MlirType llzkArray_InsertArrayOpGetArrRefType(MlirOperation inp) {
319 return wrap(llvm::cast<InsertArrayOp>(unwrap(inp)).getArrRefType());
320}
321
322MlirOperation llzkArray_ReadArrayOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue arr_ref, intptr_t indicesSize, MlirValue const *indices) {
323 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString("array.read"), location);
324 mlirOperationStateAddResults(&state, 1, &resultType);
325 mlirOperationStateAddOperands(&state, 1, &arr_ref);
326 mlirOperationStateAddOperands(&state, indicesSize, indices);
327
328 return mlirOpBuilderInsert(builder, mlirOperationCreate(&state));
329}
330
331bool llzkOperationIsA_Array_ReadArrayOp(MlirOperation inp) {
332 return llvm::isa<ReadArrayOp>(unwrap(inp));
333}
334
335MlirValue llzkArray_ReadArrayOpGetArrRef(MlirOperation op) {
336 auto range = llvm::cast<ReadArrayOp>(unwrap(op)).getODSOperandIndexAndLength(0);
337 assert(range.second == 1 && "expected fixed operand segment size");
338 assert(
339 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
340 "operand index exceeds intptr_t range"
341 );
342 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first));
343}
344
345void llzkArray_ReadArrayOpSetArrRef(MlirOperation op, MlirValue value) {
346 auto range = llvm::cast<ReadArrayOp>(unwrap(op)).getODSOperandIndexAndLength(0);
347 assert(range.second == 1 && "expected fixed operand segment size");
348 assert(
349 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
350 "operand index exceeds intptr_t range"
351 );
352 mlirOperationSetOperand(op, static_cast<intptr_t>(range.first), value);
353}
354
355intptr_t llzkArray_ReadArrayOpGetIndicesCount(MlirOperation op) {
356 auto range = llvm::cast<ReadArrayOp>(unwrap(op)).getODSOperandIndexAndLength(1);
357 return range.second;
358}
359
360MlirValue llzkArray_ReadArrayOpGetIndicesAt(MlirOperation op, intptr_t index) {
361 auto range = llvm::cast<ReadArrayOp>(unwrap(op)).getODSOperandIndexAndLength(1);
362 assert(index >= 0 && index < range.second && "variadic operand index out of range");
363 assert(
364 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
365 "operand index exceeds intptr_t range"
366 );
367 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first) + index);
368}
369
370void llzkArray_ReadArrayOpSetIndices(MlirOperation op, intptr_t count, MlirValue const *values) {
371 if (count < 0)
372 return;
373 ::llvm::SmallVector<::mlir::Value> vals;
374 vals.reserve(static_cast<size_t>(count));
375 for (intptr_t i = 0; i < count; ++i)
376 vals.push_back(unwrap(values[i]));
377 ::llvm::cast<ReadArrayOp>(unwrap(op)).getIndicesMutable().assign(vals);
378}
379
380MlirValue llzkArray_ReadArrayOpGetResult(MlirOperation op) {
381 return mlirOperationGetResult(op, 0);
382}
383
384MlirType llzkArray_ReadArrayOpGetArrRefType(MlirOperation inp) {
385 return wrap(llvm::cast<ReadArrayOp>(unwrap(inp)).getArrRefType());
386}
387
388MlirOperation llzkArray_WriteArrayOpBuild(MlirOpBuilder builder, MlirLocation location, MlirValue arr_ref, intptr_t indicesSize, MlirValue const *indices, MlirValue rvalue) {
389 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString("array.write"), location);
390 mlirOperationStateAddOperands(&state, 1, &arr_ref);
391 mlirOperationStateAddOperands(&state, indicesSize, indices);
392 mlirOperationStateAddOperands(&state, 1, &rvalue);
393
394 return mlirOpBuilderInsert(builder, mlirOperationCreate(&state));
395}
396
397bool llzkOperationIsA_Array_WriteArrayOp(MlirOperation inp) {
398 return llvm::isa<WriteArrayOp>(unwrap(inp));
399}
400
401MlirValue llzkArray_WriteArrayOpGetArrRef(MlirOperation op) {
402 auto range = llvm::cast<WriteArrayOp>(unwrap(op)).getODSOperandIndexAndLength(0);
403 assert(range.second == 1 && "expected fixed operand segment size");
404 assert(
405 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
406 "operand index exceeds intptr_t range"
407 );
408 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first));
409}
410
411void llzkArray_WriteArrayOpSetArrRef(MlirOperation op, MlirValue value) {
412 auto range = llvm::cast<WriteArrayOp>(unwrap(op)).getODSOperandIndexAndLength(0);
413 assert(range.second == 1 && "expected fixed operand segment size");
414 assert(
415 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
416 "operand index exceeds intptr_t range"
417 );
418 mlirOperationSetOperand(op, static_cast<intptr_t>(range.first), value);
419}
420
421intptr_t llzkArray_WriteArrayOpGetIndicesCount(MlirOperation op) {
422 auto range = llvm::cast<WriteArrayOp>(unwrap(op)).getODSOperandIndexAndLength(1);
423 return range.second;
424}
425
426MlirValue llzkArray_WriteArrayOpGetIndicesAt(MlirOperation op, intptr_t index) {
427 auto range = llvm::cast<WriteArrayOp>(unwrap(op)).getODSOperandIndexAndLength(1);
428 assert(index >= 0 && index < range.second && "variadic operand index out of range");
429 assert(
430 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
431 "operand index exceeds intptr_t range"
432 );
433 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first) + index);
434}
435
436void llzkArray_WriteArrayOpSetIndices(MlirOperation op, intptr_t count, MlirValue const *values) {
437 if (count < 0)
438 return;
439 ::llvm::SmallVector<::mlir::Value> vals;
440 vals.reserve(static_cast<size_t>(count));
441 for (intptr_t i = 0; i < count; ++i)
442 vals.push_back(unwrap(values[i]));
443 ::llvm::cast<WriteArrayOp>(unwrap(op)).getIndicesMutable().assign(vals);
444}
445
446MlirValue llzkArray_WriteArrayOpGetRvalue(MlirOperation op) {
447 auto range = llvm::cast<WriteArrayOp>(unwrap(op)).getODSOperandIndexAndLength(2);
448 assert(range.second == 1 && "expected fixed operand segment size");
449 assert(
450 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
451 "operand index exceeds intptr_t range"
452 );
453 return mlirOperationGetOperand(op, static_cast<intptr_t>(range.first));
454}
455
456void llzkArray_WriteArrayOpSetRvalue(MlirOperation op, MlirValue value) {
457 auto range = llvm::cast<WriteArrayOp>(unwrap(op)).getODSOperandIndexAndLength(2);
458 assert(range.second == 1 && "expected fixed operand segment size");
459 assert(
460 static_cast<uintptr_t>(range.first) <= static_cast<uintptr_t>(std::numeric_limits<intptr_t>::max()) &&
461 "operand index exceeds intptr_t range"
462 );
463 mlirOperationSetOperand(op, static_cast<intptr_t>(range.first), value);
464}
465
466MlirType llzkArray_WriteArrayOpGetArrRefType(MlirOperation inp) {
467 return wrap(llvm::cast<WriteArrayOp>(unwrap(inp)).getArrRefType());
468}
bool llzkOperationIsA_Array_InsertArrayOp(MlirOperation inp)
Returns true if the Operation is a llzk::array::InsertArrayOp.
MlirValue llzkArray_InsertArrayOpGetIndicesAt(MlirOperation op, intptr_t index)
Get Indices operand at index from llzk::array::InsertArrayOp Operation.
MlirValue llzkArray_WriteArrayOpGetRvalue(MlirOperation op)
Get Rvalue operand from llzk::array::WriteArrayOp Operation.
void llzkArray_CreateArrayOpSetNumDimsPerMap(MlirOperation op, MlirAttribute attr)
Set NumDimsPerMap attribute of llzk::array::CreateArrayOp Operation.
MlirValue llzkArray_ReadArrayOpGetArrRef(MlirOperation op)
Get ArrRef operand from llzk::array::ReadArrayOp Operation.
MlirType llzkArray_WriteArrayOpGetArrRefType(MlirOperation inp)
Gets the type of the referenced base array.
void llzkArray_InsertArrayOpSetRvalue(MlirOperation op, MlirValue value)
Set Rvalue operand of llzk::array::InsertArrayOp Operation.
void llzkArray_ArrayLengthOpSetArrRef(MlirOperation op, MlirValue value)
Set ArrRef operand of llzk::array::ArrayLengthOp Operation.
intptr_t llzkArray_CreateArrayOpGetElementsCount(MlirOperation op)
Get number of Elements operands in llzk::array::CreateArrayOp Operation.
void llzkArray_ExtractArrayOpSetArrRef(MlirOperation op, MlirValue value)
Set ArrRef operand of llzk::array::ExtractArrayOp Operation.
bool llzkOperationIsA_Array_ExtractArrayOp(MlirOperation inp)
Returns true if the Operation is a llzk::array::ExtractArrayOp.
void llzkArray_ArrayLengthOpSetDim(MlirOperation op, MlirValue value)
Set Dim operand of llzk::array::ArrayLengthOp Operation.
MlirOperation llzkArray_ArrayLengthOpBuild(MlirOpBuilder builder, MlirLocation location, MlirValue arr_ref, MlirValue dim)
Build a llzk::array::ArrayLengthOp Operation.
void llzkArray_CreateArrayOpSetElements(MlirOperation op, intptr_t count, MlirValue const *values)
Set Elements operands of llzk::array::CreateArrayOp Operation.
void llzkArray_WriteArrayOpSetRvalue(MlirOperation op, MlirValue value)
Set Rvalue operand of llzk::array::WriteArrayOp Operation.
MlirValue llzkArray_InsertArrayOpGetRvalue(MlirOperation op)
Get Rvalue operand from llzk::array::InsertArrayOp Operation.
bool llzkOperationIsA_Array_ReadArrayOp(MlirOperation inp)
Returns true if the Operation is a llzk::array::ReadArrayOp.
intptr_t llzkArray_WriteArrayOpGetIndicesCount(MlirOperation op)
Get number of Indices operands in llzk::array::WriteArrayOp Operation.
MlirType llzkArray_ReadArrayOpGetArrRefType(MlirOperation inp)
Gets the type of the referenced base array.
MlirValue llzkArray_CreateArrayOpGetResult(MlirOperation op)
Get Result result from llzk::array::CreateArrayOp Operation.
intptr_t llzkArray_ReadArrayOpGetIndicesCount(MlirOperation op)
Get number of Indices operands in llzk::array::ReadArrayOp Operation.
void llzkArray_ReadArrayOpSetIndices(MlirOperation op, intptr_t count, MlirValue const *values)
Set Indices operands of llzk::array::ReadArrayOp Operation.
MlirValue llzkArray_ArrayLengthOpGetLength(MlirOperation op)
Get Length result from llzk::array::ArrayLengthOp Operation.
void llzkArray_InsertArrayOpSetIndices(MlirOperation op, intptr_t count, MlirValue const *values)
Set Indices operands of llzk::array::InsertArrayOp Operation.
MlirValue llzkArray_ExtractArrayOpGetArrRef(MlirOperation op)
Get ArrRef operand from llzk::array::ExtractArrayOp Operation.
intptr_t llzkArray_ExtractArrayOpGetIndicesCount(MlirOperation op)
Get number of Indices operands in llzk::array::ExtractArrayOp Operation.
MlirType llzkArray_ArrayLengthOpGetArrRefType(MlirOperation inp)
Gets the type of the referenced base array.
MlirOperation llzkArray_InsertArrayOpBuild(MlirOpBuilder builder, MlirLocation location, MlirValue arr_ref, intptr_t indicesSize, MlirValue const *indices, MlirValue rvalue)
Build a llzk::array::InsertArrayOp Operation.
MlirOperation llzkArray_ExtractArrayOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue arr_ref, intptr_t indicesSize, MlirValue const *indices)
Build a llzk::array::ExtractArrayOp Operation.
MlirValue llzkArray_ExtractArrayOpGetResult(MlirOperation op)
Get Result result from llzk::array::ExtractArrayOp Operation.
void llzkArray_ExtractArrayOpSetIndices(MlirOperation op, intptr_t count, MlirValue const *values)
Set Indices operands of llzk::array::ExtractArrayOp Operation.
MlirType llzkArray_InsertArrayOpGetArrRefType(MlirOperation inp)
Gets the type of the referenced base array.
MlirValue llzkArray_CreateArrayOpGetMapOperandsAt(MlirOperation op, intptr_t index)
Get MapOperands operand at index from llzk::array::CreateArrayOp Operation.
intptr_t llzkArray_InsertArrayOpGetIndicesCount(MlirOperation op)
Get number of Indices operands in llzk::array::InsertArrayOp Operation.
MlirAttribute llzkArray_CreateArrayOpGetMapOpGroupSizes(MlirOperation op)
Get MapOpGroupSizes attribute from llzk::array::CreateArrayOp Operation.
void llzkArray_WriteArrayOpSetIndices(MlirOperation op, intptr_t count, MlirValue const *values)
Set Indices operands of llzk::array::WriteArrayOp Operation.
MlirValue llzkArray_ExtractArrayOpGetIndicesAt(MlirOperation op, intptr_t index)
Get Indices operand at index from llzk::array::ExtractArrayOp Operation.
MlirAttribute llzkArray_CreateArrayOpGetNumDimsPerMap(MlirOperation op)
Get NumDimsPerMap attribute from llzk::array::CreateArrayOp Operation.
bool llzkOperationIsA_Array_WriteArrayOp(MlirOperation inp)
Returns true if the Operation is a llzk::array::WriteArrayOp.
void llzkArray_ReadArrayOpSetArrRef(MlirOperation op, MlirValue value)
Set ArrRef operand of llzk::array::ReadArrayOp Operation.
intptr_t llzkArray_CreateArrayOpGetMapOperandsCount(MlirOperation op)
Get number of MapOperands operands in llzk::array::CreateArrayOp Operation.
MlirOperation llzkArray_ReadArrayOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue arr_ref, intptr_t indicesSize, MlirValue const *indices)
Build a llzk::array::ReadArrayOp Operation.
void llzkArray_WriteArrayOpSetArrRef(MlirOperation op, MlirValue value)
Set ArrRef operand of llzk::array::WriteArrayOp Operation.
MlirValue llzkArray_WriteArrayOpGetIndicesAt(MlirOperation op, intptr_t index)
Get Indices operand at index from llzk::array::WriteArrayOp Operation.
MlirOperation llzkArray_WriteArrayOpBuild(MlirOpBuilder builder, MlirLocation location, MlirValue arr_ref, intptr_t indicesSize, MlirValue const *indices, MlirValue rvalue)
Build a llzk::array::WriteArrayOp Operation.
MlirValue llzkArray_ArrayLengthOpGetArrRef(MlirOperation op)
Get ArrRef operand from llzk::array::ArrayLengthOp Operation.
MlirType llzkArray_ExtractArrayOpGetArrRefType(MlirOperation inp)
Gets the type of the referenced base array.
MlirValue llzkArray_WriteArrayOpGetArrRef(MlirOperation op)
Get ArrRef operand from llzk::array::WriteArrayOp Operation.
bool llzkOperationIsA_Array_CreateArrayOp(MlirOperation inp)
Returns true if the Operation is a llzk::array::CreateArrayOp.
void llzkArray_InsertArrayOpSetArrRef(MlirOperation op, MlirValue value)
Set ArrRef operand of llzk::array::InsertArrayOp Operation.
bool llzkOperationIsA_Array_ArrayLengthOp(MlirOperation inp)
Returns true if the Operation is a llzk::array::ArrayLengthOp.
MlirValue llzkArray_ReadArrayOpGetResult(MlirOperation op)
Get Result result from llzk::array::ReadArrayOp Operation.
MlirValue llzkArray_InsertArrayOpGetArrRef(MlirOperation op)
Get ArrRef operand from llzk::array::InsertArrayOp Operation.
void llzkArray_CreateArrayOpSetMapOpGroupSizes(MlirOperation op, MlirAttribute attr)
Set MapOpGroupSizes attribute of llzk::array::CreateArrayOp Operation.
void llzkArray_CreateArrayOpSetMapOperands(MlirOperation op, intptr_t groupCount, MlirValueRange const *groups)
Set MapOperands operand groups of llzk::array::CreateArrayOp Operation.
MlirValue llzkArray_ReadArrayOpGetIndicesAt(MlirOperation op, intptr_t index)
Get Indices operand at index from llzk::array::ReadArrayOp Operation.
MlirValue llzkArray_CreateArrayOpGetElementsAt(MlirOperation op, intptr_t index)
Get Elements operand at index from llzk::array::CreateArrayOp Operation.
MlirValue llzkArray_ArrayLengthOpGetDim(MlirOperation op)
Get Dim operand from llzk::array::ArrayLengthOp Operation.
MlirOperation mlirOpBuilderInsert(MlirOpBuilder builder, MlirOperation op)
Inserts op at the current insertion point of builder and returns it.
Definition Builder.cpp:167
Representation of an mlir::ValueRange
Definition Support.h:47
intptr_t size
Number of values in the range.
Definition Support.h:51