[MLIR][LLVM] Copy byval attributes during inlining.
authorJohannes de Fine Licht <johannes.definelicht@nextsilicon.com>
Wed, 22 Mar 2023 14:22:11 +0000 (15:22 +0100)
committerTobias Gysi <tobias.gysi@nextsilicon.com>
Wed, 22 Mar 2023 14:38:16 +0000 (15:38 +0100)
commited114b6ffc953ac2c648f64287c44456a7d19d0c
treefbaf2569773b51fe06db49e1ca90c736fb6be0e2
parenta2033ff3cc76fcc05e69627ad2685b6376f9ad4e
[MLIR][LLVM] Copy byval attributes during inlining.

Support inlining of function calls with the byval attribute on function
arguments by copying the pointee into a newly alloca'ed pointer at the
callsite before inlining.

The alignment attribute is not yet taken into account.

Reviewed By: ftynse, gysit

Differential Revision: https://reviews.llvm.org/D146616
mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
mlir/test/Dialect/LLVMIR/inlining.mlir