MLIR  21.0.0git
InitAllTranslations.h
Go to the documentation of this file.
1 //===- InitAllTranslations.h - MLIR Translations Registration ---*- C++ -*-===//
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 // This file defines a helper to trigger the registration of all translations
10 // in and out of MLIR to the system.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef MLIR_INITALLTRANSLATIONS_H
15 #define MLIR_INITALLTRANSLATIONS_H
16 
18 
19 namespace mlir {
20 
26 
27 namespace smt {
29 }
30 
31 // This function should be called before creating any MLIRContext if one
32 // expects all the possible translations to be made available to the context
33 // automatically.
34 inline void registerAllTranslations() {
35  static bool initOnce = []() {
43  return true;
44  }();
45  (void)initOnce;
46 }
47 } // namespace mlir
48 
49 #endif // MLIR_INITALLTRANSLATIONS_H
void registerExportSMTLIBTranslation()
Register the ExportSMTLIB pass.
Include the generated interface declarations.
void registerToLLVMIRTranslation()
void registerIRDLToCppTranslation()
void registerFromSPIRVTranslation()
void registerToCppTranslation()
void registerFromLLVMIRTranslation()
void registerAllTranslations()
void registerToSPIRVTranslation()