MLIR  16.0.0git
Public Member Functions | List of all members
mlir::LLVM::TypeToLLVMIRTranslator Class Reference

Utility class to translate MLIR LLVM dialect types to LLVM IR. More...

#include "mlir/Target/LLVMIR/TypeToLLVM.h"

Public Member Functions

 TypeToLLVMIRTranslator (llvm::LLVMContext &context)
 
 ~TypeToLLVMIRTranslator ()
 
unsigned getPreferredAlignment (Type type, const llvm::DataLayout &layout)
 Returns the preferred alignment for the type given the data layout. More...
 
llvm::Type * translateType (Type type)
 Translates the given MLIR LLVM dialect type to LLVM IR. More...
 

Detailed Description

Utility class to translate MLIR LLVM dialect types to LLVM IR.

Stores the translation state, in particular any identified structure types that can be reused in further translation.

Definition at line 39 of file TypeToLLVM.h.

Constructor & Destructor Documentation

◆ TypeToLLVMIRTranslator()

LLVM::TypeToLLVMIRTranslator::TypeToLLVMIRTranslator ( llvm::LLVMContext &  context)

Definition at line 182 of file TypeToLLVM.cpp.

References ~TypeToLLVMIRTranslator().

◆ ~TypeToLLVMIRTranslator()

LLVM::TypeToLLVMIRTranslator::~TypeToLLVMIRTranslator ( )
default

Referenced by TypeToLLVMIRTranslator().

Member Function Documentation

◆ getPreferredAlignment()

unsigned LLVM::TypeToLLVMIRTranslator::getPreferredAlignment ( Type  type,
const llvm::DataLayout &  layout 
)

Returns the preferred alignment for the type given the data layout.

Note that this will perform type conversion and store its results for future uses.

Definition at line 191 of file TypeToLLVM.cpp.

References translateType().

Referenced by getMemRefAlignment().

◆ translateType()

llvm::Type * LLVM::TypeToLLVMIRTranslator::translateType ( Type  type)

Translates the given MLIR LLVM dialect type to LLVM IR.

Definition at line 187 of file TypeToLLVM.cpp.

Referenced by getPreferredAlignment().


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