Implementation of the interface allows querying the size and alignments of an LLVMArrayType as well as query the size and alignment of a struct containing an LLVMArrayType.
The implementation should yield the same results as llvm::DataLayout, including support for over aligned element types.
There is no customization point for adjusting an arrays alignment; it is simply taken from the element type.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp | ||
---|---|---|
73 | This is basically equal to llvm::DataLayouts getTypeAllocSize. I am not sure whether MLIR wants to support over aligning types in which case we'd need an equivalent of it in DataLayout and co. Maybe worth a future TODO |
mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp | ||
---|---|---|
68 | Addressed in final commit |
nit: kBitsInByte?