My Project
Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
mlir::LLVM::ModuleTranslation Class Reference

#include <ModuleTranslation.h>

Collaboration diagram for mlir::LLVM::ModuleTranslation:
Collaboration graph
[legend]

Static Public Member Functions

template<typename T = ModuleTranslation>
static std::unique_ptr< llvm::Module > translateModule (Operation *m)
 
static BlockgetModuleBody (Operation *m)
 

Protected Member Functions

 ModuleTranslation (Operation *module)
 
virtual ~ModuleTranslation ()
 
virtual LogicalResult convertOperation (Operation &op, llvm::IRBuilder<> &builder)
 
SmallVector< llvm::Value *, 8 > lookupValues (ValueRange values)
 A helper to look up remapped operands in the value remapping table. More...
 

Static Protected Member Functions

static std::unique_ptr< llvm::Module > prepareLLVMModule (Operation *m)
 

Protected Attributes

llvm::StringMap< llvm::Function * > functionMapping
 
DenseMap< Value, llvm::Value * > valueMapping
 
DenseMap< Block *, llvm::BasicBlock * > blockMapping
 

Constructor & Destructor Documentation

◆ ModuleTranslation()

mlir::LLVM::ModuleTranslation::ModuleTranslation ( Operation module)
inlineexplicitprotected

◆ ~ModuleTranslation()

virtual mlir::LLVM::ModuleTranslation::~ModuleTranslation ( )
inlineprotectedvirtual

Member Function Documentation

◆ convertOperation()

LogicalResult ModuleTranslation::convertOperation ( Operation opInst,
llvm::IRBuilder<> &  builder 
)
protectedvirtual

Given a single MLIR operation, create the corresponding LLVM IR operation using the builder. LLVM IR Builder does not have a generic interface so this has to be a long chain of ifs calling different functions with a different number of arguments.

◆ getModuleBody()

static Block& mlir::LLVM::ModuleTranslation::getModuleBody ( Operation m)
inlinestatic

A helper method to get the single Block in an operation honoring LLVM's module requirements.

◆ lookupValues()

SmallVector< llvm::Value *, 8 > ModuleTranslation::lookupValues ( ValueRange  values)
protected

A helper to look up remapped operands in the value remapping table.

A helper to look up remapped operands in the value remapping table.`.

◆ prepareLLVMModule()

std::unique_ptr< llvm::Module > ModuleTranslation::prepareLLVMModule ( Operation m)
staticprotected

◆ translateModule()

template<typename T = ModuleTranslation>
static std::unique_ptr<llvm::Module> mlir::LLVM::ModuleTranslation::translateModule ( Operation m)
inlinestatic

Member Data Documentation

◆ blockMapping

DenseMap<Block *, llvm::BasicBlock *> mlir::LLVM::ModuleTranslation::blockMapping
protected

◆ functionMapping

llvm::StringMap<llvm::Function *> mlir::LLVM::ModuleTranslation::functionMapping
protected

◆ valueMapping

DenseMap<Value, llvm::Value *> mlir::LLVM::ModuleTranslation::valueMapping
protected

The documentation for this class was generated from the following files: