| 599 | } |
| 600 | |
| 601 | std::vector<MlirValue> insert(MlirBlock body, mlir_operation_state ops) |
| 602 | { |
| 603 | std::vector<MlirValue> result; |
| 604 | mlir_operation op = ops.create_operation(); |
| 605 | auto weak_op = op.get(); |
| 606 | mlirBlockAppendOwnedOperation(body, op.release()); |
| 607 | |
| 608 | auto n = mlirOperationGetNumResults(weak_op); |
| 609 | result.reserve(n); |
| 610 | transform(range(n), std::back_inserter(result), [&](auto i) { |
| 611 | return mlirOperationGetResult(weak_op, i); |
| 612 | }); |
| 613 | return result; |
| 614 | } |
| 615 | |
| 616 | MlirBlock |
| 617 | insert(MlirBlock body, const module& m, std::unordered_map<instruction_ref, MlirValue>& ins_map) |
no test coverage detected