[llvm] [BPF] expand mem intrinsics (memcpy, memmove, memset) (PR #97648)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 5 21:30:05 PDT 2024


yonghong-song wrote:

> Do you think it is a nice option to add some mem intrinsics into the kernel? Thus we can combine & generate such intrinsics, and verifier can easily recognize it (if it is just a `BPF_CALL`).

You probably mean adding some kernel kfunc functions (similar to what you mentioned intrinsic functions, e.g., memcpy/memset etc.). Currently, there is no plan for this as the verifier is able to handle fully-unrolled loop or actual loop pretty well. There is no special processing here.

Introducing kfunc needs additional verifier change and there are no obvious benefit. We do not have use case for memcpy/memset kfunc yet.



https://github.com/llvm/llvm-project/pull/97648


More information about the llvm-commits mailing list