[mlir] LLVM dialect: support globals without linkage keyword, assuming 'external'
authorAlex Zinenko <zinenko@google.com>
Tue, 14 Apr 2020 11:01:53 +0000 (13:01 +0200)
committerAlex Zinenko <zinenko@google.com>
Wed, 15 Apr 2020 08:58:32 +0000 (10:58 +0200)
commit129cf84e69537ae5c184550f94be18da738d9261
tree2489fe18ad4edaeef5042dcf0f91714e8d42d5d5
parent04b5274ede3ebc1de98c47e34cb762bae474696b
[mlir] LLVM dialect: support globals without linkage keyword, assuming 'external'

Similarly to actual LLVM IR, and to `llvm.mlir.func`, allow the custom syntax
of `llvm.mlir.global` to omit the linkage keyword. If omitted, the linkage is
assumed to be external. This makes the modeling of globals in the LLVM dialect
more consistent, both within the dialect and with LLVM IR.

Differential Revision: https://reviews.llvm.org/D78096
mlir/docs/Dialects/LLVM.md
mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
mlir/test/Dialect/LLVMIR/global.mlir