MLIR 22.0.0git
Translation.cpp File Reference
#include "mlir/Tools/mlir-translate/Translation.h"
#include "mlir/IR/AsmState.h"
#include "mlir/IR/Verifier.h"
#include "mlir/Parser/Parser.h"
#include "mlir/Tools/ParseUtilities.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/SourceMgr.h"
#include <optional>

Go to the source code of this file.

Classes

struct  TranslationOptions

Functions

static llvm::StringMap< Translation > & getTranslationRegistry ()
 Get the mutable static map between registered file-to-file MLIR translations.
static void registerTranslation (StringRef name, StringRef description, std::optional< llvm::Align > inputAlignment, const TranslateFunction &function)
 Register the given translation.
static void registerTranslateToMLIRFunction (StringRef name, StringRef description, const DialectRegistrationFunction &dialectRegistration, std::optional< llvm::Align > inputAlignment, const TranslateSourceMgrToMLIRFunction &function)

Variables

static llvm::ManagedStatic< TranslationOptionsclOptions

Function Documentation

◆ getTranslationRegistry()

llvm::StringMap< Translation > & getTranslationRegistry ( )
static

Get the mutable static map between registered file-to-file MLIR translations.

Definition at line 45 of file Translation.cpp.

Referenced by registerTranslation(), and mlir::TranslationParser::TranslationParser().

◆ registerTranslateToMLIRFunction()

void registerTranslateToMLIRFunction ( StringRef name,
StringRef description,
const DialectRegistrationFunction & dialectRegistration,
std::optional< llvm::Align > inputAlignment,
const TranslateSourceMgrToMLIRFunction & function )
static

◆ registerTranslation()

void registerTranslation ( StringRef name,
StringRef description,
std::optional< llvm::Align > inputAlignment,
const TranslateFunction & function )
static

Register the given translation.

Definition at line 51 of file Translation.cpp.

References getTranslationRegistry().

Referenced by registerTranslateToMLIRFunction(), and mlir::TranslateRegistration::TranslateRegistration().

Variable Documentation

◆ clOptions

llvm::ManagedStatic<TranslationOptions> clOptions
static

Definition at line 35 of file Translation.cpp.