[clang] [llvm] [BPF] Make -mcpu=v3 as the default (PR #107008)

Yuval Deutscher via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 16 05:26:00 PDT 2025


yuvald-sweet-security wrote:

Hey,

I didn't see this change on the [LLVM 20.1.0 Release Notes](https://releases.llvm.org/20.1.0/docs/ReleaseNotes.html) - it would be nice if you could add those in the future as a heads up.

Anyway, I got here after tracing a regression introduced in Clang 20 with sub-par eBPF codegen which results in dramatically larger kernel verifier states (and eventually causes the verifier to give up with sufficiently large functions). This culprit does indeed seem to be BPF v3 - my guess is that branching according to 32-bit registers provides less refutability for the verifier which ends up carrying more possible states as a result.

FYI

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


More information about the llvm-commits mailing list