BPF backend has landed in LLVM

From: Alexei Starovoitov <hidden>
Date: 2015-01-27 05:57:04
Also in: lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help