MLIR  20.0.0git
RegisterEverything.cpp
Go to the documentation of this file.
1 //===- RegisterEverything.cpp - Register all MLIR entities ----------------===//
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 
10 
11 #include "mlir/CAPI/IR.h"
12 #include "mlir/IR/MLIRContext.h"
13 #include "mlir/InitAllDialects.h"
14 #include "mlir/InitAllExtensions.h"
15 #include "mlir/InitAllPasses.h"
19 
20 void mlirRegisterAllDialects(MlirDialectRegistry registry) {
23 }
24 
25 void mlirRegisterAllLLVMTranslations(MlirContext context) {
26  auto &ctx = *unwrap(context);
27  mlir::DialectRegistry registry;
29  ctx.appendDialectRegistry(registry);
30 }
31 
void mlirRegisterAllPasses()
Register all compiler passes of MLIR.
void mlirRegisterAllDialects(MlirDialectRegistry registry)
Appends all upstream dialects and extensions to the dialect registry.
void mlirRegisterAllLLVMTranslations(MlirContext context)
Register all translations to LLVM IR for dialects that can support it.
The DialectRegistry maps a dialect namespace to a constructor for the matching dialect.
mlir::Diagnostic & unwrap(MlirDiagnostic diagnostic)
Definition: Diagnostics.h:19
static void registerAllToLLVMIRTranslations(DialectRegistry &registry)
Registers all dialects that can be translated to LLVM IR and the corresponding translation interfaces...
Definition: All.h:39
void registerAllExtensions(DialectRegistry &registry)
This function may be called to register all MLIR dialect extensions with the provided registry.
void registerAllPasses()
Definition: InitAllPasses.h:62
void registerAllDialects(DialectRegistry &registry)
Add all the MLIR dialects to the provided registry.