[all-commits] [llvm/llvm-project] 481d67: [Clang][BPF] Support record argument with direct v...
yonghong-song via All-commits
all-commits at lists.llvm.org
Thu Aug 18 19:12:15 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 481d67d310a7a4213da72f838d6bafaa52ed01d3
https://github.com/llvm/llvm-project/commit/481d67d310a7a4213da72f838d6bafaa52ed01d3
Author: Yonghong Song <yhs at fb.com>
Date: 2022-08-18 (Thu, 18 Aug 2022)
Changed paths:
M clang/lib/CodeGen/TargetInfo.cpp
A clang/test/CodeGen/bpf-struct-argument.c
A clang/test/CodeGen/bpf-union-argument.c
A llvm/test/CodeGen/BPF/struct-arg-inline.ll
A llvm/test/CodeGen/BPF/struct-arg.ll
Log Message:
-----------
[Clang][BPF] Support record argument with direct values
Currently, record arguments are always passed by reference by allocating
space for record values in the caller. This is less efficient for
small records which may take one or two registers. For example,
for x86_64 and aarch64, for a record size up to 16 bytes, the record
values can be passed by values directly on the registers.
This patch added BPF support of record argument with direct values
for up to 16 byte record size. If record size is 0, that record
will not take any register, which is the same behavior for x86_64
and aarch64. If the record size is greater than 16 bytes, the
record argument will be passed by reference.
Differential Revision: https://reviews.llvm.org/D132144
More information about the All-commits
mailing list