[all-commits] [llvm/llvm-project] 8ca04b: [mlir] Add support for LLVM's dso_local attr

Felipe de Azevedo Piovezan via All-commits all-commits at lists.llvm.org
Tue Jun 29 06:01:02 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8ca04b05133b9fc1b891585e9dfd6e30790998ba
      https://github.com/llvm/llvm-project/commit/8ca04b05133b9fc1b891585e9dfd6e30790998ba
  Author: Felipe de Azevedo Piovezan <felipe at cerebras.net>
  Date:   2021-06-29 (Tue, 29 Jun 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
    M mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    M mlir/test/Target/LLVMIR/llvmir.mlir

  Log Message:
  -----------
  [mlir] Add support for LLVM's dso_local attr

This patch brings support for setting runtime preemption specifiers of
LLVM's GlobalValues. In LLVM semantics, if the `dso_local` attribute
is not explicitly requested, then it is inferred based on linkage and
visibility. We model this same behavior with a UnitAttribute: if it is
present, then we explicitly request the GlobalValue to marked as
`dso_local`, otherwise we rely on the GlobalValue itself to make this
decision.

Reviewed By: ftynse

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




More information about the All-commits mailing list