[llvm] [BPF] Report Undefined Behavior from IR (PR #126858)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 14 08:56:08 PST 2025


https://github.com/nikic commented:

LLVM/Clang generally do not allow the use of backend-generated warnings, because they produce unintelligible, optimization-dependent false-positives. There are some specific exceptions, but what you're doing here is basically *exactly* the kind of backend warning we want to avoid.

Does BPF have *any* kind of support for trapping or otherwise indicating an error? There is existing support to compile unreachable to a trap instruction (TrapUnreachable), but from a quick look, it doesn't seem like there is any BPF instruction this can be mapped to?

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


More information about the llvm-commits mailing list