[mlir][llvm] Pass struct results as parameter in c wrapper
authorStephan Herhut <herhut@google.com>
Wed, 17 Mar 2021 11:16:30 +0000 (12:16 +0100)
committerStephan Herhut <herhut@google.com>
Wed, 17 Mar 2021 11:58:52 +0000 (12:58 +0100)
commit5837fdc4ccc4d61e9eb7b6d310760c0be2e52124
treedfabfc7d303561a764683e1b2e7a963aa895d66a
parentecfa87453113dad6bd9430606a06f7ab728cc21b
[mlir][llvm] Pass struct results as parameter in c wrapper

Returning structs directly in LLVM does not necessarily align with the C ABI of
the platform. This might happen to work on Linux but for small structs this
breaks on Windows. With this change, the wrappers work platform independently.

Differential Revision: https://reviews.llvm.org/D98725
mlir/docs/LLVMDialectMemRefConvention.md
mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
mlir/test/Conversion/StandardToLLVM/calling-convention.mlir