|
MLIR 23.0.0git
|
ABITypeMapper translates mlir::Type values into the llvm::abi::Type hierarchy used by the LLVM ABI Lowering Library. More...
#include "mlir/ABI/ABITypeMapper.h"
Public Member Functions | |
| ABITypeMapper (const DataLayout &dl) | |
| const llvm::abi::Type * | map (mlir::Type type) |
| Map an MLIR type to its ABI type representation. | |
| llvm::abi::TypeBuilder & | getTypeBuilder () |
| Access the underlying TypeBuilder for advanced use. | |
ABITypeMapper translates mlir::Type values into the llvm::abi::Type hierarchy used by the LLVM ABI Lowering Library.
Standard MLIR types (IntegerType, FloatType, IndexType, VectorType, MemRefType) are mapped directly. Dialect-specific types are mapped by querying the MLIR DataLayout for size and alignment.
Callers must supply a DataLayout (typically from the enclosing module) so the mapper can determine sizes and alignments.
The mapper owns a BumpPtrAllocator; all returned abi::Type pointers are valid for the lifetime of the mapper.
Definition at line 39 of file ABITypeMapper.h.
|
explicit |
Definition at line 16 of file ABITypeMapper.cpp.
|
inline |
Access the underlying TypeBuilder for advanced use.
Definition at line 48 of file ABITypeMapper.h.
| const llvm::abi::Type * ABITypeMapper::map | ( | mlir::Type | type | ) |
Map an MLIR type to its ABI type representation.
Returns nullptr if the type cannot be mapped.
Definition at line 19 of file ABITypeMapper.cpp.