MLIR  20.0.0git
Public Member Functions | List of all members
mlir::TranslateToMLIRRegistration Struct Reference

Use Translate[ToMLIR|FromMLIR]Registration as an initializer that registers a function and associates it with name. More...

#include "mlir/Tools/mlir-translate/Translation.h"

Public Member Functions

 TranslateToMLIRRegistration (llvm::StringRef name, llvm::StringRef description, const TranslateSourceMgrToMLIRFunction &function, const DialectRegistrationFunction &dialectRegistration=[](DialectRegistry &) {}, std::optional< llvm::Align > inputAlignment=std::nullopt)
 
 TranslateToMLIRRegistration (llvm::StringRef name, llvm::StringRef description, const TranslateRawSourceMgrToMLIRFunction &function, const DialectRegistrationFunction &dialectRegistration=[](DialectRegistry &) {}, std::optional< llvm::Align > inputAlignment=std::nullopt)
 
 TranslateToMLIRRegistration (llvm::StringRef name, llvm::StringRef description, const TranslateStringRefToMLIRFunction &function, const DialectRegistrationFunction &dialectRegistration=[](DialectRegistry &) {}, std::optional< llvm::Align > inputAlignment=std::nullopt)
 

Detailed Description

Use Translate[ToMLIR|FromMLIR]Registration as an initializer that registers a function and associates it with name.

This requires that a translation has not been registered to a given name. inputAlign is an optional expected alignment for the input data.

Usage:

// At file scope. namespace mlir { void registerTRexToMLIRRegistration() { TranslateToMLIRRegistration Unused(&MySubCommand, [] { ... }); } } // namespace mlir

Definition at line 110 of file Translation.h.

Constructor & Destructor Documentation

◆ TranslateToMLIRRegistration() [1/3]

mlir::TranslateToMLIRRegistration::TranslateToMLIRRegistration ( llvm::StringRef  name,
llvm::StringRef  description,
const TranslateSourceMgrToMLIRFunction function,
const DialectRegistrationFunction dialectRegistration = [](DialectRegistry &) {},
std::optional< llvm::Align >  inputAlignment = std::nullopt 
)

◆ TranslateToMLIRRegistration() [2/3]

mlir::TranslateToMLIRRegistration::TranslateToMLIRRegistration ( llvm::StringRef  name,
llvm::StringRef  description,
const TranslateRawSourceMgrToMLIRFunction function,
const DialectRegistrationFunction dialectRegistration = [](DialectRegistry &) {},
std::optional< llvm::Align >  inputAlignment = std::nullopt 
)

◆ TranslateToMLIRRegistration() [3/3]

mlir::TranslateToMLIRRegistration::TranslateToMLIRRegistration ( llvm::StringRef  name,
llvm::StringRef  description,
const TranslateStringRefToMLIRFunction function,
const DialectRegistrationFunction dialectRegistration = [](DialectRegistry &) {},
std::optional< llvm::Align >  inputAlignment = std::nullopt 
)

The documentation for this struct was generated from the following file: