15e83a5b4SStella Laurenzo //===- RegisterEverything.cpp - API to register all dialects/passes -------===// 25e83a5b4SStella Laurenzo // 35e83a5b4SStella Laurenzo // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 45e83a5b4SStella Laurenzo // See https://llvm.org/LICENSE.txt for license information. 55e83a5b4SStella Laurenzo // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 65e83a5b4SStella Laurenzo // 75e83a5b4SStella Laurenzo //===----------------------------------------------------------------------===// 85e83a5b4SStella Laurenzo 95e83a5b4SStella Laurenzo #include "mlir-c/RegisterEverything.h" 10*5cd42747SPeter Hawkins #include "mlir/Bindings/Python/NanobindAdaptors.h" 11*5cd42747SPeter Hawkins #include "mlir/Bindings/Python/Nanobind.h" 125e83a5b4SStella Laurenzo 13*5cd42747SPeter Hawkins NB_MODULE(_mlirRegisterEverything, m) { 146995183eSJungwook Park m.doc() = "MLIR All Upstream Dialects, Translations and Passes Registration"; 155e83a5b4SStella Laurenzo 165e83a5b4SStella Laurenzo m.def("register_dialects", [](MlirDialectRegistry registry) { 175e83a5b4SStella Laurenzo mlirRegisterAllDialects(registry); 185e83a5b4SStella Laurenzo }); 196995183eSJungwook Park m.def("register_llvm_translations", 206995183eSJungwook Park [](MlirContext context) { mlirRegisterAllLLVMTranslations(context); }); 215e83a5b4SStella Laurenzo 225e83a5b4SStella Laurenzo // Register all passes on load. 235e83a5b4SStella Laurenzo mlirRegisterAllPasses(); 245e83a5b4SStella Laurenzo } 25