16MlirOperation
llzkFelt_AddFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs) {
17 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.add"), location);
18 mlirOperationStateAddResults(&state, 1, &resultType);
19 mlirOperationStateAddOperands(&state, 1, &lhs);
20 mlirOperationStateAddOperands(&state, 1, &rhs);
26 return llvm::isa<AddFeltOp>(unwrap(inp));
30 auto range = llvm::cast<AddFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
31 assert(range.second == 1 &&
"expected fixed operand segment size");
33 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
34 "operand index exceeds intptr_t range"
36 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
40 auto range = llvm::cast<AddFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
41 assert(range.second == 1 &&
"expected fixed operand segment size");
43 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
44 "operand index exceeds intptr_t range"
46 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
50 auto range = llvm::cast<AddFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
51 assert(range.second == 1 &&
"expected fixed operand segment size");
53 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
54 "operand index exceeds intptr_t range"
56 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
60 auto range = llvm::cast<AddFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
61 assert(range.second == 1 &&
"expected fixed operand segment size");
63 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
64 "operand index exceeds intptr_t range"
66 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
70 return mlirOperationGetResult(op, 0);
73MlirOperation
llzkFelt_AndFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs) {
74 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.bit_and"), location);
75 mlirOperationStateAddResults(&state, 1, &resultType);
76 mlirOperationStateAddOperands(&state, 1, &lhs);
77 mlirOperationStateAddOperands(&state, 1, &rhs);
83 return llvm::isa<AndFeltOp>(unwrap(inp));
87 auto range = llvm::cast<AndFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
88 assert(range.second == 1 &&
"expected fixed operand segment size");
90 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
91 "operand index exceeds intptr_t range"
93 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
97 auto range = llvm::cast<AndFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
98 assert(range.second == 1 &&
"expected fixed operand segment size");
100 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
101 "operand index exceeds intptr_t range"
103 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
107 auto range = llvm::cast<AndFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
108 assert(range.second == 1 &&
"expected fixed operand segment size");
110 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
111 "operand index exceeds intptr_t range"
113 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
117 auto range = llvm::cast<AndFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
118 assert(range.second == 1 &&
"expected fixed operand segment size");
120 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
121 "operand index exceeds intptr_t range"
123 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
127 return mlirOperationGetResult(op, 0);
130MlirOperation
llzkFelt_DivFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs) {
131 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.div"), location);
132 mlirOperationStateAddResults(&state, 1, &resultType);
133 mlirOperationStateAddOperands(&state, 1, &lhs);
134 mlirOperationStateAddOperands(&state, 1, &rhs);
140 return llvm::isa<DivFeltOp>(unwrap(inp));
144 auto range = llvm::cast<DivFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
145 assert(range.second == 1 &&
"expected fixed operand segment size");
147 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
148 "operand index exceeds intptr_t range"
150 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
154 auto range = llvm::cast<DivFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
155 assert(range.second == 1 &&
"expected fixed operand segment size");
157 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
158 "operand index exceeds intptr_t range"
160 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
164 auto range = llvm::cast<DivFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
165 assert(range.second == 1 &&
"expected fixed operand segment size");
167 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
168 "operand index exceeds intptr_t range"
170 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
174 auto range = llvm::cast<DivFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
175 assert(range.second == 1 &&
"expected fixed operand segment size");
177 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
178 "operand index exceeds intptr_t range"
180 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
184 return mlirOperationGetResult(op, 0);
188 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.const"), location);
189 mlirOperationStateAddResults(&state, 1, &resultType);
191 llvm::SmallVector<MlirNamedAttribute, 1> attributes;
192 if (!mlirAttributeIsNull(value)) {
193 attributes.push_back(mlirNamedAttributeGet(mlirIdentifierGet(ctx, mlirStringRefCreateFromCString(
"value")), value));
195 mlirOperationStateAddAttributes(&state, attributes.size(), attributes.data());
201 return llvm::isa<FeltConstantOp>(unwrap(inp));
205 return mlirOperationGetAttributeByName(op, mlirStringRefCreateFromCString(
"value"));
209 mlirOperationSetAttributeByName(op, mlirStringRefCreateFromCString(
"value"), attr);
213 return mlirOperationGetResult(op, 0);
217 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.inv"), location);
218 mlirOperationStateAddResults(&state, 1, &resultType);
219 mlirOperationStateAddOperands(&state, 1, &operand);
225 return llvm::isa<InvFeltOp>(unwrap(inp));
229 auto range = llvm::cast<InvFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
230 assert(range.second == 1 &&
"expected fixed operand segment size");
232 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
233 "operand index exceeds intptr_t range"
235 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
239 auto range = llvm::cast<InvFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
240 assert(range.second == 1 &&
"expected fixed operand segment size");
242 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
243 "operand index exceeds intptr_t range"
245 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
249 return mlirOperationGetResult(op, 0);
252MlirOperation
llzkFelt_MulFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs) {
253 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.mul"), location);
254 mlirOperationStateAddResults(&state, 1, &resultType);
255 mlirOperationStateAddOperands(&state, 1, &lhs);
256 mlirOperationStateAddOperands(&state, 1, &rhs);
262 return llvm::isa<MulFeltOp>(unwrap(inp));
266 auto range = llvm::cast<MulFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
267 assert(range.second == 1 &&
"expected fixed operand segment size");
269 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
270 "operand index exceeds intptr_t range"
272 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
276 auto range = llvm::cast<MulFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
277 assert(range.second == 1 &&
"expected fixed operand segment size");
279 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
280 "operand index exceeds intptr_t range"
282 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
286 auto range = llvm::cast<MulFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
287 assert(range.second == 1 &&
"expected fixed operand segment size");
289 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
290 "operand index exceeds intptr_t range"
292 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
296 auto range = llvm::cast<MulFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
297 assert(range.second == 1 &&
"expected fixed operand segment size");
299 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
300 "operand index exceeds intptr_t range"
302 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
306 return mlirOperationGetResult(op, 0);
310 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.neg"), location);
311 mlirOperationStateAddResults(&state, 1, &resultType);
312 mlirOperationStateAddOperands(&state, 1, &operand);
318 return llvm::isa<NegFeltOp>(unwrap(inp));
322 auto range = llvm::cast<NegFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
323 assert(range.second == 1 &&
"expected fixed operand segment size");
325 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
326 "operand index exceeds intptr_t range"
328 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
332 auto range = llvm::cast<NegFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
333 assert(range.second == 1 &&
"expected fixed operand segment size");
335 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
336 "operand index exceeds intptr_t range"
338 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
342 return mlirOperationGetResult(op, 0);
346 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.bit_not"), location);
347 mlirOperationStateAddResults(&state, 1, &resultType);
348 mlirOperationStateAddOperands(&state, 1, &operand);
354 return llvm::isa<NotFeltOp>(unwrap(inp));
358 auto range = llvm::cast<NotFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
359 assert(range.second == 1 &&
"expected fixed operand segment size");
361 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
362 "operand index exceeds intptr_t range"
364 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
368 auto range = llvm::cast<NotFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
369 assert(range.second == 1 &&
"expected fixed operand segment size");
371 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
372 "operand index exceeds intptr_t range"
374 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
378 return mlirOperationGetResult(op, 0);
381MlirOperation
llzkFelt_OrFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs) {
382 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.bit_or"), location);
383 mlirOperationStateAddResults(&state, 1, &resultType);
384 mlirOperationStateAddOperands(&state, 1, &lhs);
385 mlirOperationStateAddOperands(&state, 1, &rhs);
391 return llvm::isa<OrFeltOp>(unwrap(inp));
395 auto range = llvm::cast<OrFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
396 assert(range.second == 1 &&
"expected fixed operand segment size");
398 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
399 "operand index exceeds intptr_t range"
401 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
405 auto range = llvm::cast<OrFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
406 assert(range.second == 1 &&
"expected fixed operand segment size");
408 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
409 "operand index exceeds intptr_t range"
411 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
415 auto range = llvm::cast<OrFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
416 assert(range.second == 1 &&
"expected fixed operand segment size");
418 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
419 "operand index exceeds intptr_t range"
421 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
425 auto range = llvm::cast<OrFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
426 assert(range.second == 1 &&
"expected fixed operand segment size");
428 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
429 "operand index exceeds intptr_t range"
431 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
435 return mlirOperationGetResult(op, 0);
438MlirOperation
llzkFelt_PowFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs) {
439 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.pow"), location);
440 mlirOperationStateAddResults(&state, 1, &resultType);
441 mlirOperationStateAddOperands(&state, 1, &lhs);
442 mlirOperationStateAddOperands(&state, 1, &rhs);
448 return llvm::isa<PowFeltOp>(unwrap(inp));
452 auto range = llvm::cast<PowFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
453 assert(range.second == 1 &&
"expected fixed operand segment size");
455 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
456 "operand index exceeds intptr_t range"
458 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
462 auto range = llvm::cast<PowFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
463 assert(range.second == 1 &&
"expected fixed operand segment size");
465 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
466 "operand index exceeds intptr_t range"
468 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
472 auto range = llvm::cast<PowFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
473 assert(range.second == 1 &&
"expected fixed operand segment size");
475 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
476 "operand index exceeds intptr_t range"
478 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
482 auto range = llvm::cast<PowFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
483 assert(range.second == 1 &&
"expected fixed operand segment size");
485 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
486 "operand index exceeds intptr_t range"
488 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
492 return mlirOperationGetResult(op, 0);
495MlirOperation
llzkFelt_ShlFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs) {
496 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.shl"), location);
497 mlirOperationStateAddResults(&state, 1, &resultType);
498 mlirOperationStateAddOperands(&state, 1, &lhs);
499 mlirOperationStateAddOperands(&state, 1, &rhs);
505 return llvm::isa<ShlFeltOp>(unwrap(inp));
509 auto range = llvm::cast<ShlFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
510 assert(range.second == 1 &&
"expected fixed operand segment size");
512 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
513 "operand index exceeds intptr_t range"
515 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
519 auto range = llvm::cast<ShlFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
520 assert(range.second == 1 &&
"expected fixed operand segment size");
522 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
523 "operand index exceeds intptr_t range"
525 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
529 auto range = llvm::cast<ShlFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
530 assert(range.second == 1 &&
"expected fixed operand segment size");
532 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
533 "operand index exceeds intptr_t range"
535 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
539 auto range = llvm::cast<ShlFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
540 assert(range.second == 1 &&
"expected fixed operand segment size");
542 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
543 "operand index exceeds intptr_t range"
545 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
549 return mlirOperationGetResult(op, 0);
552MlirOperation
llzkFelt_ShrFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs) {
553 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.shr"), location);
554 mlirOperationStateAddResults(&state, 1, &resultType);
555 mlirOperationStateAddOperands(&state, 1, &lhs);
556 mlirOperationStateAddOperands(&state, 1, &rhs);
562 return llvm::isa<ShrFeltOp>(unwrap(inp));
566 auto range = llvm::cast<ShrFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
567 assert(range.second == 1 &&
"expected fixed operand segment size");
569 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
570 "operand index exceeds intptr_t range"
572 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
576 auto range = llvm::cast<ShrFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
577 assert(range.second == 1 &&
"expected fixed operand segment size");
579 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
580 "operand index exceeds intptr_t range"
582 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
586 auto range = llvm::cast<ShrFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
587 assert(range.second == 1 &&
"expected fixed operand segment size");
589 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
590 "operand index exceeds intptr_t range"
592 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
596 auto range = llvm::cast<ShrFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
597 assert(range.second == 1 &&
"expected fixed operand segment size");
599 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
600 "operand index exceeds intptr_t range"
602 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
606 return mlirOperationGetResult(op, 0);
610 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.sintdiv"), location);
611 mlirOperationStateAddResults(&state, 1, &resultType);
612 mlirOperationStateAddOperands(&state, 1, &lhs);
613 mlirOperationStateAddOperands(&state, 1, &rhs);
619 return llvm::isa<SignedIntDivFeltOp>(unwrap(inp));
623 auto range = llvm::cast<SignedIntDivFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
624 assert(range.second == 1 &&
"expected fixed operand segment size");
626 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
627 "operand index exceeds intptr_t range"
629 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
633 auto range = llvm::cast<SignedIntDivFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
634 assert(range.second == 1 &&
"expected fixed operand segment size");
636 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
637 "operand index exceeds intptr_t range"
639 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
643 auto range = llvm::cast<SignedIntDivFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
644 assert(range.second == 1 &&
"expected fixed operand segment size");
646 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
647 "operand index exceeds intptr_t range"
649 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
653 auto range = llvm::cast<SignedIntDivFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
654 assert(range.second == 1 &&
"expected fixed operand segment size");
656 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
657 "operand index exceeds intptr_t range"
659 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
663 return mlirOperationGetResult(op, 0);
667 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.smod"), location);
668 mlirOperationStateAddResults(&state, 1, &resultType);
669 mlirOperationStateAddOperands(&state, 1, &lhs);
670 mlirOperationStateAddOperands(&state, 1, &rhs);
676 return llvm::isa<SignedModFeltOp>(unwrap(inp));
680 auto range = llvm::cast<SignedModFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
681 assert(range.second == 1 &&
"expected fixed operand segment size");
683 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
684 "operand index exceeds intptr_t range"
686 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
690 auto range = llvm::cast<SignedModFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
691 assert(range.second == 1 &&
"expected fixed operand segment size");
693 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
694 "operand index exceeds intptr_t range"
696 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
700 auto range = llvm::cast<SignedModFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
701 assert(range.second == 1 &&
"expected fixed operand segment size");
703 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
704 "operand index exceeds intptr_t range"
706 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
710 auto range = llvm::cast<SignedModFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
711 assert(range.second == 1 &&
"expected fixed operand segment size");
713 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
714 "operand index exceeds intptr_t range"
716 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
720 return mlirOperationGetResult(op, 0);
723MlirOperation
llzkFelt_SubFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs) {
724 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.sub"), location);
725 mlirOperationStateAddResults(&state, 1, &resultType);
726 mlirOperationStateAddOperands(&state, 1, &lhs);
727 mlirOperationStateAddOperands(&state, 1, &rhs);
733 return llvm::isa<SubFeltOp>(unwrap(inp));
737 auto range = llvm::cast<SubFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
738 assert(range.second == 1 &&
"expected fixed operand segment size");
740 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
741 "operand index exceeds intptr_t range"
743 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
747 auto range = llvm::cast<SubFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
748 assert(range.second == 1 &&
"expected fixed operand segment size");
750 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
751 "operand index exceeds intptr_t range"
753 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
757 auto range = llvm::cast<SubFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
758 assert(range.second == 1 &&
"expected fixed operand segment size");
760 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
761 "operand index exceeds intptr_t range"
763 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
767 auto range = llvm::cast<SubFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
768 assert(range.second == 1 &&
"expected fixed operand segment size");
770 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
771 "operand index exceeds intptr_t range"
773 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
777 return mlirOperationGetResult(op, 0);
781 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.uintdiv"), location);
782 mlirOperationStateAddResults(&state, 1, &resultType);
783 mlirOperationStateAddOperands(&state, 1, &lhs);
784 mlirOperationStateAddOperands(&state, 1, &rhs);
790 return llvm::isa<UnsignedIntDivFeltOp>(unwrap(inp));
794 auto range = llvm::cast<UnsignedIntDivFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
795 assert(range.second == 1 &&
"expected fixed operand segment size");
797 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
798 "operand index exceeds intptr_t range"
800 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
804 auto range = llvm::cast<UnsignedIntDivFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
805 assert(range.second == 1 &&
"expected fixed operand segment size");
807 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
808 "operand index exceeds intptr_t range"
810 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
814 auto range = llvm::cast<UnsignedIntDivFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
815 assert(range.second == 1 &&
"expected fixed operand segment size");
817 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
818 "operand index exceeds intptr_t range"
820 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
824 auto range = llvm::cast<UnsignedIntDivFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
825 assert(range.second == 1 &&
"expected fixed operand segment size");
827 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
828 "operand index exceeds intptr_t range"
830 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
834 return mlirOperationGetResult(op, 0);
838 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.umod"), location);
839 mlirOperationStateAddResults(&state, 1, &resultType);
840 mlirOperationStateAddOperands(&state, 1, &lhs);
841 mlirOperationStateAddOperands(&state, 1, &rhs);
847 return llvm::isa<UnsignedModFeltOp>(unwrap(inp));
851 auto range = llvm::cast<UnsignedModFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
852 assert(range.second == 1 &&
"expected fixed operand segment size");
854 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
855 "operand index exceeds intptr_t range"
857 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
861 auto range = llvm::cast<UnsignedModFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
862 assert(range.second == 1 &&
"expected fixed operand segment size");
864 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
865 "operand index exceeds intptr_t range"
867 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
871 auto range = llvm::cast<UnsignedModFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
872 assert(range.second == 1 &&
"expected fixed operand segment size");
874 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
875 "operand index exceeds intptr_t range"
877 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
881 auto range = llvm::cast<UnsignedModFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
882 assert(range.second == 1 &&
"expected fixed operand segment size");
884 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
885 "operand index exceeds intptr_t range"
887 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
891 return mlirOperationGetResult(op, 0);
894MlirOperation
llzkFelt_XorFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs) {
895 MlirOperationState state = mlirOperationStateGet(mlirStringRefCreateFromCString(
"felt.bit_xor"), location);
896 mlirOperationStateAddResults(&state, 1, &resultType);
897 mlirOperationStateAddOperands(&state, 1, &lhs);
898 mlirOperationStateAddOperands(&state, 1, &rhs);
904 return llvm::isa<XorFeltOp>(unwrap(inp));
908 auto range = llvm::cast<XorFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
909 assert(range.second == 1 &&
"expected fixed operand segment size");
911 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
912 "operand index exceeds intptr_t range"
914 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
918 auto range = llvm::cast<XorFeltOp>(unwrap(op)).getODSOperandIndexAndLength(0);
919 assert(range.second == 1 &&
"expected fixed operand segment size");
921 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
922 "operand index exceeds intptr_t range"
924 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
928 auto range = llvm::cast<XorFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
929 assert(range.second == 1 &&
"expected fixed operand segment size");
931 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
932 "operand index exceeds intptr_t range"
934 return mlirOperationGetOperand(op,
static_cast<intptr_t
>(range.first));
938 auto range = llvm::cast<XorFeltOp>(unwrap(op)).getODSOperandIndexAndLength(1);
939 assert(range.second == 1 &&
"expected fixed operand segment size");
941 static_cast<uintptr_t
>(range.first) <=
static_cast<uintptr_t
>(std::numeric_limits<intptr_t>::max()) &&
942 "operand index exceeds intptr_t range"
944 mlirOperationSetOperand(op,
static_cast<intptr_t
>(range.first), value);
948 return mlirOperationGetResult(op, 0);
MlirContext mlirOpBuilderGetContext(MlirOpBuilder builder)
Returns the MLIR context associated with builder.
MlirOperation mlirOpBuilderInsert(MlirOpBuilder builder, MlirOperation op)
Inserts op at the current insertion point of builder and returns it.
MlirValue llzkFelt_AddFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::AddFeltOp Operation.
MlirValue llzkFelt_AndFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::AndFeltOp Operation.
MlirValue llzkFelt_XorFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::XorFeltOp Operation.
MlirOperation llzkFelt_SignedIntDivFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::SignedIntDivFeltOp Operation.
MlirValue llzkFelt_ShrFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::ShrFeltOp Operation.
void llzkFelt_UnsignedModFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::UnsignedModFeltOp Operation.
MlirValue llzkFelt_SubFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::SubFeltOp Operation.
bool llzkOperationIsA_Felt_SubFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::SubFeltOp.
bool llzkOperationIsA_Felt_ShlFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::ShlFeltOp.
void llzkFelt_SubFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::SubFeltOp Operation.
MlirOperation llzkFelt_PowFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::PowFeltOp Operation.
void llzkFelt_AddFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::AddFeltOp Operation.
MlirValue llzkFelt_PowFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::PowFeltOp Operation.
MlirOperation llzkFelt_AddFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::AddFeltOp Operation.
void llzkFelt_ShrFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::ShrFeltOp Operation.
MlirOperation llzkFelt_NegFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue operand)
Build a llzk::felt::NegFeltOp Operation.
void llzkFelt_UnsignedIntDivFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::UnsignedIntDivFeltOp Operation.
MlirValue llzkFelt_MulFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::MulFeltOp Operation.
MlirOperation llzkFelt_NotFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue operand)
Build a llzk::felt::NotFeltOp Operation.
MlirValue llzkFelt_FeltConstantOpGetResult(MlirOperation op)
Get Result result from llzk::felt::FeltConstantOp Operation.
bool llzkOperationIsA_Felt_MulFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::MulFeltOp.
bool llzkOperationIsA_Felt_SignedModFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::SignedModFeltOp.
MlirValue llzkFelt_ShrFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::ShrFeltOp Operation.
bool llzkOperationIsA_Felt_FeltConstantOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::FeltConstantOp.
MlirValue llzkFelt_PowFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::PowFeltOp Operation.
MlirValue llzkFelt_InvFeltOpGetOperand(MlirOperation op)
Get Operand operand from llzk::felt::InvFeltOp Operation.
MlirValue llzkFelt_DivFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::DivFeltOp Operation.
MlirValue llzkFelt_PowFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::PowFeltOp Operation.
MlirOperation llzkFelt_XorFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::XorFeltOp Operation.
MlirValue llzkFelt_InvFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::InvFeltOp Operation.
void llzkFelt_SignedIntDivFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::SignedIntDivFeltOp Operation.
void llzkFelt_DivFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::DivFeltOp Operation.
MlirValue llzkFelt_UnsignedModFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::UnsignedModFeltOp Operation.
MlirValue llzkFelt_SubFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::SubFeltOp Operation.
MlirValue llzkFelt_SignedModFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::SignedModFeltOp Operation.
void llzkFelt_OrFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::OrFeltOp Operation.
MlirValue llzkFelt_NegFeltOpGetOperand(MlirOperation op)
Get Operand operand from llzk::felt::NegFeltOp Operation.
MlirValue llzkFelt_OrFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::OrFeltOp Operation.
MlirValue llzkFelt_ShrFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::ShrFeltOp Operation.
MlirOperation llzkFelt_AndFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::AndFeltOp Operation.
void llzkFelt_InvFeltOpSetOperand(MlirOperation op, MlirValue value)
Set Operand operand of llzk::felt::InvFeltOp Operation.
void llzkFelt_SubFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::SubFeltOp Operation.
MlirValue llzkFelt_UnsignedIntDivFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::UnsignedIntDivFeltOp Operation.
MlirValue llzkFelt_DivFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::DivFeltOp Operation.
bool llzkOperationIsA_Felt_ShrFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::ShrFeltOp.
MlirValue llzkFelt_UnsignedIntDivFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::UnsignedIntDivFeltOp Operation.
MlirValue llzkFelt_ShlFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::ShlFeltOp Operation.
MlirValue llzkFelt_ShlFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::ShlFeltOp Operation.
void llzkFelt_MulFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::MulFeltOp Operation.
bool llzkOperationIsA_Felt_DivFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::DivFeltOp.
MlirValue llzkFelt_AddFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::AddFeltOp Operation.
MlirValue llzkFelt_NotFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::NotFeltOp Operation.
bool llzkOperationIsA_Felt_NegFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::NegFeltOp.
MlirOperation llzkFelt_SubFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::SubFeltOp Operation.
MlirValue llzkFelt_XorFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::XorFeltOp Operation.
MlirOperation llzkFelt_OrFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::OrFeltOp Operation.
MlirValue llzkFelt_AndFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::AndFeltOp Operation.
MlirValue llzkFelt_NegFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::NegFeltOp Operation.
MlirOperation llzkFelt_ShlFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::ShlFeltOp Operation.
MlirValue llzkFelt_SubFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::SubFeltOp Operation.
void llzkFelt_OrFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::OrFeltOp Operation.
MlirOperation llzkFelt_InvFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue operand)
Build a llzk::felt::InvFeltOp Operation.
void llzkFelt_SignedModFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::SignedModFeltOp Operation.
void llzkFelt_UnsignedModFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::UnsignedModFeltOp Operation.
void llzkFelt_SignedModFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::SignedModFeltOp Operation.
MlirValue llzkFelt_AddFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::AddFeltOp Operation.
MlirOperation llzkFelt_UnsignedIntDivFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::UnsignedIntDivFeltOp Operation.
bool llzkOperationIsA_Felt_AndFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::AndFeltOp.
MlirOperation llzkFelt_SignedModFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::SignedModFeltOp Operation.
MlirOperation llzkFelt_ShrFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::ShrFeltOp Operation.
MlirOperation llzkFelt_DivFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::DivFeltOp Operation.
void llzkFelt_FeltConstantOpSetValue(MlirOperation op, MlirAttribute attr)
Set Value attribute of llzk::felt::FeltConstantOp Operation.
bool llzkOperationIsA_Felt_XorFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::XorFeltOp.
MlirValue llzkFelt_SignedIntDivFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::SignedIntDivFeltOp Operation.
MlirValue llzkFelt_XorFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::XorFeltOp Operation.
void llzkFelt_PowFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::PowFeltOp Operation.
void llzkFelt_XorFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::XorFeltOp Operation.
void llzkFelt_NotFeltOpSetOperand(MlirOperation op, MlirValue value)
Set Operand operand of llzk::felt::NotFeltOp Operation.
MlirValue llzkFelt_SignedIntDivFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::SignedIntDivFeltOp Operation.
bool llzkOperationIsA_Felt_PowFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::PowFeltOp.
void llzkFelt_XorFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::XorFeltOp Operation.
MlirValue llzkFelt_MulFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::MulFeltOp Operation.
void llzkFelt_ShlFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::ShlFeltOp Operation.
void llzkFelt_SignedIntDivFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::SignedIntDivFeltOp Operation.
MlirValue llzkFelt_SignedModFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::SignedModFeltOp Operation.
void llzkFelt_UnsignedIntDivFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::UnsignedIntDivFeltOp Operation.
bool llzkOperationIsA_Felt_UnsignedModFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::UnsignedModFeltOp.
void llzkFelt_ShlFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::ShlFeltOp Operation.
MlirValue llzkFelt_UnsignedModFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::UnsignedModFeltOp Operation.
MlirValue llzkFelt_OrFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::OrFeltOp Operation.
bool llzkOperationIsA_Felt_InvFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::InvFeltOp.
bool llzkOperationIsA_Felt_OrFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::OrFeltOp.
MlirValue llzkFelt_UnsignedModFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::UnsignedModFeltOp Operation.
bool llzkOperationIsA_Felt_NotFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::NotFeltOp.
MlirAttribute llzkFelt_FeltConstantOpGetValue(MlirOperation op)
Get Value attribute from llzk::felt::FeltConstantOp Operation.
bool llzkOperationIsA_Felt_SignedIntDivFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::SignedIntDivFeltOp.
MlirValue llzkFelt_DivFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::DivFeltOp Operation.
void llzkFelt_AndFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::AndFeltOp Operation.
MlirValue llzkFelt_ShlFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::ShlFeltOp Operation.
void llzkFelt_AddFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::AddFeltOp Operation.
bool llzkOperationIsA_Felt_UnsignedIntDivFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::UnsignedIntDivFeltOp.
MlirValue llzkFelt_SignedModFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::SignedModFeltOp Operation.
void llzkFelt_DivFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::DivFeltOp Operation.
MlirValue llzkFelt_AndFeltOpGetResult(MlirOperation op)
Get Result result from llzk::felt::AndFeltOp Operation.
void llzkFelt_MulFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::MulFeltOp Operation.
MlirValue llzkFelt_OrFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::OrFeltOp Operation.
void llzkFelt_ShrFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::ShrFeltOp Operation.
MlirValue llzkFelt_NotFeltOpGetOperand(MlirOperation op)
Get Operand operand from llzk::felt::NotFeltOp Operation.
MlirValue llzkFelt_SignedIntDivFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::SignedIntDivFeltOp Operation.
MlirOperation llzkFelt_FeltConstantOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirAttribute value)
Build a llzk::felt::FeltConstantOp Operation.
MlirOperation llzkFelt_MulFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::MulFeltOp Operation.
MlirValue llzkFelt_UnsignedIntDivFeltOpGetLhs(MlirOperation op)
Get Lhs operand from llzk::felt::UnsignedIntDivFeltOp Operation.
void llzkFelt_AndFeltOpSetLhs(MlirOperation op, MlirValue value)
Set Lhs operand of llzk::felt::AndFeltOp Operation.
MlirValue llzkFelt_MulFeltOpGetRhs(MlirOperation op)
Get Rhs operand from llzk::felt::MulFeltOp Operation.
MlirOperation llzkFelt_UnsignedModFeltOpBuild(MlirOpBuilder builder, MlirLocation location, MlirType resultType, MlirValue lhs, MlirValue rhs)
Build a llzk::felt::UnsignedModFeltOp Operation.
bool llzkOperationIsA_Felt_AddFeltOp(MlirOperation inp)
Returns true if the Operation is a llzk::felt::AddFeltOp.
void llzkFelt_NegFeltOpSetOperand(MlirOperation op, MlirValue value)
Set Operand operand of llzk::felt::NegFeltOp Operation.
void llzkFelt_PowFeltOpSetRhs(MlirOperation op, MlirValue value)
Set Rhs operand of llzk::felt::PowFeltOp Operation.