MLIR  20.0.0git
Classes | Functions | Variables
Translation.cpp File Reference
#include "mlir/Tools/mlir-translate/Translation.h"
#include "mlir/IR/AsmState.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Dialect.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. More...
 
static void registerTranslation (StringRef name, StringRef description, std::optional< llvm::Align > inputAlignment, const TranslateFunction &function)
 Register the given translation. More...
 
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()

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

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

Definition at line 47 of file Translation.cpp.

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

◆ registerTranslateToMLIRFunction()

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

◆ registerTranslation()

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

Register the given translation.

Definition at line 53 of file Translation.cpp.

References getTranslationRegistry().

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

Variable Documentation

◆ clOptions

llvm::ManagedStatic<TranslationOptions> clOptions
static

Definition at line 37 of file Translation.cpp.

Referenced by mlir::registerTranslationCLOptions().