CIRCT  19.0.0git
InitAllTranslations.h
Go to the documentation of this file.
1 //===- InitAllTranslations.h - CIRCT 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 CIRCT to the system.
11 //
12 //===----------------------------------------------------------------------===//
13 
20 #include "circt/Target/DebugInfo.h"
22 
23 #ifndef CIRCT_INITALLTRANSLATIONS_H
24 #define CIRCT_INITALLTRANSLATIONS_H
25 
26 namespace circt {
27 
28 // This function should be called before creating any MLIRContext if one
29 // expects all the possible translations to be made available to the context
30 // automatically.
31 inline void registerAllTranslations() {
32  static bool initOnce = []() {
39  return true;
40  }();
41  (void)initOnce;
42 }
43 } // namespace circt
44 
45 #endif // CIRCT_INITALLTRANSLATIONS_H
void registerExportSystemCTranslation()
void registerArcModelInfoTranslation()
Registers CIRCT translation from Arc to JSON model info.
void registerToCalyxTranslation()
void registerTranslations()
Register all debug information emission flavors as from-MLIR translations.
void registerFromFIRFileTranslation()
Definition: FIRParser.cpp:5505
void registerToFIRFileTranslation()
This file defines an intermediate representation for circuits acting as an abstraction for constraint...
Definition: DebugAnalysis.h:21
void registerAllTranslations()