[all-commits] [llvm/llvm-project] 80816e: [mlir][LLVM] handle ArrayAttr for constant array o...

jeanPerier via All-commits all-commits at lists.llvm.org
Tue May 20 01:45:50 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 80816e792382da286b29f937938ab54ae159f482
      https://github.com/llvm/llvm-project/commit/80816e792382da286b29f937938ab54ae159f482
  Author: jeanPerier <jperier at nvidia.com>
  Date:   2025-05-20 (Tue, 20 May 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/test/Dialect/LLVMIR/invalid.mlir
    M mlir/test/Target/LLVMIR/llvmir-invalid.mlir
    M mlir/test/Target/LLVMIR/llvmir.mlir

  Log Message:
  -----------
  [mlir][LLVM] handle ArrayAttr for constant array of structs (#139724)

While LLVM IR dialect has a way to represent arbitrary LLVM constant
array of structs via an insert chain, it is in practice very expensive
for the compilation time as soon as the array is bigger than a couple
hundred elements. This is because generating and later folding such
insert chain is really not cheap.

This patch allows representing array of struct constants via ArrayAttr in
the LLVM dialect.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list