1//===- RegisterEverything.cpp - API to register all dialects/passes -------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "mlir-c/RegisterEverything.h"
10#include "mlir/Bindings/Python/PybindAdaptors.h"
11
12PYBIND11_MODULE(_mlirRegisterEverything, m) {
13 m.doc() = "MLIR All Upstream Dialects, Translations and Passes Registration";
14
15 m.def("register_dialects", [](MlirDialectRegistry registry) {
16 mlirRegisterAllDialects(registry);
17 });
18 m.def("register_llvm_translations",
19 [](MlirContext context) { mlirRegisterAllLLVMTranslations(context); });
20
21 // Register all passes on load.
22 mlirRegisterAllPasses();
23}
24

source code of mlir/lib/Bindings/Python/RegisterEverything.cpp