[all-commits] [llvm/llvm-project] 664cc9: [mlir] Implement `DataLayoutTypeInterface` for `LL...

zero9178 via All-commits all-commits at lists.llvm.org
Mon Dec 13 06:09:37 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 664cc9312cf5e670a58f841c3ac6e7e6b930ba0a
      https://github.com/llvm/llvm-project/commit/664cc9312cf5e670a58f841c3ac6e7e6b930ba0a
  Author: Markus Böck <markus.boeck02 at gmail.com>
  Date:   2021-12-13 (Mon, 13 Dec 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMTypes.h
    M mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
    M mlir/test/Dialect/LLVMIR/layout.mlir

  Log Message:
  -----------
  [mlir] Implement `DataLayoutTypeInterface` for `LLVMStructType`

Using this implementation of the interface it is possible to query the size, ABI alignment as well as the preferred alignment of a struct. It should yield the same results as LLVMs `llvm::DataLayout` on an equivalent `llvm::StructType`, including for packed structs.

Additionally it is also possible to increase the ABI and preferred alignment using a data layout entry with the type `llvm.struct<()>, which serves the same functionality as the `a:` component in LLVMs data layout string.

Differential Revision: https://reviews.llvm.org/D115600




More information about the All-commits mailing list