[mlir] Adds argument attributes for using LLVM's sret and byval attributes
authorEric Schweitz <eschweitz@nvidia.com>
Thu, 7 Jan 2021 20:50:20 +0000 (12:50 -0800)
committerEric Schweitz <eschweitz@nvidia.com>
Thu, 7 Jan 2021 20:52:14 +0000 (12:52 -0800)
commit70b841ac317765c5c504334f7a22ac085f14ac2d
treee2ad09397155029de76c11f8e0bb1a6252ec4240
parentce7f30b2a874386a0ce089c98327acb65e87b04d
[mlir] Adds argument attributes for using LLVM's sret and byval attributes
to the conversion of LLVM IR dialect. These attributes are used in FIR to
support the lowering of Fortran using target-specific calling conventions.

Add roundtrip tests.

Add changes per review comments/concerns.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D94052
mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
mlir/test/Dialect/LLVMIR/func.mlir
mlir/test/Target/llvmir-invalid.mlir