MLIR  19.0.0git
Public Member Functions | List of all members
mlir::LLVM::detail::DataLayoutImporter Class Reference

Helper class that translates an LLVM data layout to an MLIR data layout specification. More...

#include "Target/LLVMIR/DataLayoutImporter.h"

Public Member Functions

 DataLayoutImporter (MLIRContext *context, const llvm::DataLayout &llvmDataLayout)
 
DataLayoutSpecInterface getDataLayout () const
 Returns the MLIR data layout specification translated from the LLVM data layout. More...
 
StringRef getLastToken () const
 Returns the last data layout token that has been processed before the data layout translation failed. More...
 
ArrayRef< StringRef > getUnhandledTokens () const
 Returns the data layout tokens that have not been handled during the data layout translation. More...
 

Detailed Description

Helper class that translates an LLVM data layout to an MLIR data layout specification.

Only integer, float, pointer, alloca memory space, stack alignment, and endianness entries are translated. The class also returns all entries from the default data layout specification found in the language reference (https://llvm.org/docs/LangRef.html#data-layout) if they are not overwritten by the provided data layout.

Definition at line 46 of file DataLayoutImporter.h.

Constructor & Destructor Documentation

◆ DataLayoutImporter()

mlir::LLVM::detail::DataLayoutImporter::DataLayoutImporter ( MLIRContext context,
const llvm::DataLayout &  llvmDataLayout 
)
inline

Definition at line 48 of file DataLayoutImporter.h.

Member Function Documentation

◆ getDataLayout()

DataLayoutSpecInterface mlir::LLVM::detail::DataLayoutImporter::getDataLayout ( ) const
inline

Returns the MLIR data layout specification translated from the LLVM data layout.

Definition at line 56 of file DataLayoutImporter.h.

Referenced by mlir::LLVM::ModuleImport::convertDataLayout(), and mlir::translateDataLayout().

◆ getLastToken()

StringRef mlir::LLVM::detail::DataLayoutImporter::getLastToken ( ) const
inline

Returns the last data layout token that has been processed before the data layout translation failed.

Definition at line 60 of file DataLayoutImporter.h.

Referenced by mlir::LLVM::ModuleImport::convertDataLayout().

◆ getUnhandledTokens()

ArrayRef<StringRef> mlir::LLVM::detail::DataLayoutImporter::getUnhandledTokens ( ) const
inline

Returns the data layout tokens that have not been handled during the data layout translation.

Definition at line 64 of file DataLayoutImporter.h.

Referenced by mlir::LLVM::ModuleImport::convertDataLayout().


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