[mlir][llvm] Add UnnamedAddr attribute to GlobalOp
authorclementval <clementval@gmail.com>
Tue, 20 Apr 2021 01:45:01 +0000 (21:45 -0400)
committerclementval <clementval@gmail.com>
Tue, 20 Apr 2021 01:45:14 +0000 (21:45 -0400)
commitc46a88625d09a656f7be8778e0df3d8332b27346
tree5dca640203248b8b7f785babd86e88d2c2986dd8
parentb98807df05cb4cd728e744c3349a9dfd341f6f61
[mlir][llvm] Add UnnamedAddr attribute to GlobalOp

This patch add the UnnamedAddr attribute for the GlobalOp in the LLVM
dialect. The attribute is also handled to and from LLVM IR.

This is meant to be used in a follow up patch to lower OpenACC/OpenMP ops to
call to kmp and tgt runtime calls (D100678).

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D100677
mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
mlir/test/Dialect/LLVMIR/global.mlir
mlir/test/Target/LLVMIR/import.ll
mlir/test/Target/LLVMIR/llvmir.mlir