Plumb write_bytecode to the Python API
authorMehdi Amini <joker.eph@gmail.com>
Mon, 5 Sep 2022 11:54:19 +0000 (11:54 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Mon, 5 Sep 2022 12:02:06 +0000 (12:02 +0000)
commit89418ddcb50034bbd8f631cbd71514721576426d
tree5da84eb9b5b926679382db0704812fe105aa8a72
parentf33645301e9d5213b68f3a152cd4d362876157d4
Plumb write_bytecode to the Python API

This adds a `write_bytecode` method to the Operation class.
The method takes a file handle and writes the binary blob to it.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D133210
mlir/include/mlir-c/IR.h
mlir/lib/Bindings/Python/IRCore.cpp
mlir/lib/Bindings/Python/IRModule.h
mlir/lib/CAPI/IR/CMakeLists.txt
mlir/lib/CAPI/IR/IR.cpp
mlir/test/python/ir/operation.py
utils/bazel/llvm-project-overlay/mlir/BUILD.bazel