[all-commits] [llvm/llvm-project] 8a2a69: [MLIR][LLVM] Support dso_local_equivalent constant...

Bruno Cardoso Lopes via All-commits all-commits at lists.llvm.org
Mon Mar 24 10:44:14 PDT 2025


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

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
    M mlir/lib/Target/LLVMIR/ModuleImport.cpp
    M mlir/test/Dialect/LLVMIR/constant-folding.mlir
    M mlir/test/Target/LLVMIR/Import/constant.ll
    M mlir/test/Target/LLVMIR/llvmir-invalid.mlir
    M mlir/test/Target/LLVMIR/llvmir.mlir

  Log Message:
  -----------
  [MLIR][LLVM] Support dso_local_equivalent constants (#132131)

Create a new operation `DSOLocalEquivalentOp`, following the steps of
other constants.

This is similar in a way to `AddressOfOp` but with specific semantics:
only support functions and function aliases (no globals) and extern_weak
linkage is not allowed.

An alternative approach is to use a new `UnitAttr` in `AddressOfOp` and
check that attribute to enforce specific semantics in the verifiers. The
drawback is going against what other constants do and having to add more
attributes in the future when we introduce `no_cfi`, `blockaddress`,
etc.

While here, improve the error message for other missing constants.



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