[llvm] [BPF] Define empty set of BPF libcalls (PR #169537)
Alessandro Decina via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 2 15:21:02 PST 2025
alessandrod wrote:
> > 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.
No it's not, because you're removing _the option_ of providing a specialized implementation.
What I think should happen is that for the BPF target, instead of emitting an _external_ libcall, we should do the LLVM expansion instead of giving a hard error like we do today, but if the libcall is there (not external), we should use the libcall.
https://github.com/llvm/llvm-project/pull/169537
More information about the llvm-commits
mailing list