BPF backend has landed in LLVM

From: Alexei Starovoitov
Date: Tue Jan 27 2015 - 00:57:09 EST


llvm trunk now has BPF backend:
https://twitter.com/llvmweekly/status/559076464973594625
It's the one used to build samples/bpf/*_kern.c examples.

Compiler just emits extended BPF instructions. It's not
aware whether they are used for tracing or networking,
or how they're loaded into the kernel.

the backend has 'experimental' status,
meaning that it doesn't get configured by default and
one needs to use --enable-experimental-targets=bpf
to build it.

todo list:
- promote it from 'experimental' status by
the time llvm 3.7 is released :)
- write front-end for tracing via mcjit api
llvm will be used as a library: parsing of some
tracing language, codegen, loading of bpf via
syscall will be done from one process
- tighten accepted IR and improve error reporting
(currently it can compile too much of C that
kernel will later reject, so need to make strict)
- test/fix what it emits on arm and other archs
(all little endian should work as-is, big-endian
might need some fixes)
- support 32-bit subregisters

If anyone has spare cycles to help out, it
would be great.

Thanks
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/