[llvm] [BPF] Define empty set of BPF libcalls (PR #169537)
Lucas Ste via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 2 15:09:54 PST 2025
LucasSte wrote:
> > > That implementation just uses `mul`, then `mul` has to be expanded somehow
> >
> >
> > Here: https://github.com/rust-lang/compiler-builtins/blob/acb3a0074d8fd8d9ca655a8cddef82decf0aa50d/compiler-builtins/src/int/mul.rs#L7
>
> Again, that _specific_ implementation just says "use mul" - ie it requires the backend to be able to codegen 128 bit mul, which BPF doesn't, so you get an external libcall.
>
> If you enable the "c" feature you can get the compiler-rt libcall implementation, which actually implements 128 bit mul.
Isn't that akin to removing the i128 related lib calls from the set? If they aren't there, LLVM will lower the operations without any error and won't need any other external implementation. This is what this PR proposes.
https://github.com/llvm/llvm-project/pull/169537
More information about the llvm-commits
mailing list