[llvm-dev] 来自林政宗的邮件 (original) (raw)
Tim Northover via llvm-dev llvm-dev at lists.llvm.org
Thu Jul 23 06:48:06 PDT 2020
- Previous message: [llvm-dev] 来自林政宗的邮件
- Next message: [llvm-dev] RISC-V LLVM sync-up call 23rd July 2020
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, 23 Jul 2020 at 10:27, 林政宗 via llvm-dev <llvm-dev at lists.llvm.org> wrote:
I am writing an new backend. I defined an intrinsic which has two output. How could I design the built-in function prototype? How could the built-in function pass two output out?
I take it you mean in Clang? I think the usual solution is to return one value normally and take a pointer argument to store the other in, then emit the right code in CGBuiltin.cpp. The unnecessary store usually gets optimized away pretty easily.
For example overflow intrinsics here: https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins.html.
Cheers.
Tim.
- Previous message: [llvm-dev] 来自林政宗的邮件
- Next message: [llvm-dev] RISC-V LLVM sync-up call 23rd July 2020
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]