[all-commits] [llvm/llvm-project] 7c3ecf: [MLIR][LLVMIR] Add support for the full form of gl...

Bruno Cardoso Lopes via All-commits all-commits at lists.llvm.org
Thu Mar 27 14:11:29 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7c3ecffe9b23411463919742ad8399f6aa48af4b
      https://github.com/llvm/llvm-project/commit/7c3ecffe9b23411463919742ad8399f6aa48af4b
  Author: Bruno Cardoso Lopes <bruno.cardoso at gmail.com>
  Date:   2025-03-27 (Thu, 27 Mar 2025)

  Changed paths:
    M flang/lib/Optimizer/Transforms/CUFAddConstructor.cpp
    M flang/test/Fir/CUDA/cuda-constructor.f90
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Target/LLVMIR/ModuleImport.cpp
    M mlir/test/Dialect/LLVMIR/global.mlir
    M mlir/test/Dialect/LLVMIR/invalid.mlir
    M mlir/test/Target/LLVMIR/Import/global-variables.ll
    M mlir/test/Target/LLVMIR/Import/import-failure.ll
    M mlir/test/Target/LLVMIR/llvmir.mlir
    M mlir/test/mlir-runner/global-constructors.mlir

  Log Message:
  -----------
  [MLIR][LLVMIR] Add support for the full form of global_{ctor,dtor} (#133176)

Currently only ctor/dtor list and their priorities are supported. This
PR adds support for the missing data field.

Few implementation notes:
- The assembly printer has a fixed form because previous `attr_dict`
will sort the dict by key name, making global_dtor and global_ctor
differ in the order of printed arguments.
- LLVM's `ptr null` is being converted to `#llvm.zero` otherwise we'd
have to create a region to use the default operation conversion from
`ptr null`, which is silly given that the field only support null or a
symbol.



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