mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 15:14:31 +00:00
Initial MLIR python bindings based on the C API.
* Basic support for context creation, module parsing and dumping. Differential Revision: https://reviews.llvm.org/D85481
This commit is contained in:
1 parent
e10e7829bf
commit
fcd2969da9
5 files changed
+113
No files matched your search
@@ -10,6 +10,7 @@
|
||||
|
||||
#include <pybind11/pybind11.h>
|
||||
|
||||
#include "IRModules.h"
|
||||
#include "mlir/IR/MLIRContext.h"
|
||||
|
||||
using namespace mlir;
|
||||
@@ -24,4 +25,8 @@ PYBIND11_MODULE(_mlir, m) {
|
||||
return std::make_tuple(std::string("From the native module"),
|
||||
context.isMultithreadingEnabled());
|
||||
});
|
||||
|
||||
// Define and populate IR submodule.
|
||||
auto irModule = m.def_submodule("ir", "MLIR IR Bindings");
|
||||
populateIRSubmodule(irModule);
|
||||
}
|
||||
Reference in new issue
Block a user