[PATCH] D49464: [COFF, ARM64] Mark only POD-type returns as SRET
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 19 15:09:32 PDT 2018
efriedma added a comment.
> My first thought is to use inreg to indicate that the struct is POD and X8 should be used, and that it does not need to be preserved.
If we were going to do this, we'd probably want to reverse the meaning of inreg; I would rather not break compatibility with existing bitcode, particularly on non-Windows targets.
> Another alternative would be to change the LLVM IR function return type to a pointer type and add the LLVM IR returned attribute to the argument with the address of the return value.
We do something similar to this for constructors on some targets; see CGCXXABI::HasThisReturn. Probably not hard to extend if we wanted to.
https://reviews.llvm.org/D49464
More information about the llvm-commits
mailing list