llvm-project/llvm/lib/Target/BPF
Yonghong Song 7b410ac352 [BPF] Generate BTF DebugInfo under BPF target
This patch implements BTF (BPF Type Format).
The BTF is the debug info format for BPF, introduced
in the below linux patch:
  69b693f0ae (diff-06fb1c8825f653d7e539058b72c83332)
and further extended several times, e.g.,
  https://www.spinics.net/lists/netdev/msg534640.html
  https://www.spinics.net/lists/netdev/msg538464.html
  https://www.spinics.net/lists/netdev/msg540246.html

The main advantage of implementing in LLVM is:
   . better integration/deployment as no extra tools are needed.
   . bpf JIT based compilation (like bcc, bpftrace, etc.) can get
     BTF without much extra effort.
   . BTF line_info needs selective source codes, which can be
     easily retrieved when inside the compiler.

This patch implemented BTF generation by registering a BPF
specific DebugHandler in BPFAsmPrinter.

Signed-off-by: Yonghong Song <yhs@fb.com>

Differential Revision: https://reviews.llvm.org/D55752

llvm-svn: 349640
2018-12-19 16:40:25 +00:00
..
AsmParser Fix clang -Wimplicit-fallthrough warnings across llvm, NFC 2018-11-01 19:54:45 +00:00
Disassembler [Target] Untangle disassemblers 2018-09-10 12:53:46 +00:00
InstPrinter
MCTargetDesc [bpf] Symbol sizes and types in object file 2018-09-19 16:04:13 +00:00
TargetInfo
BPF.h bpf: check illegal usage of XADD insn return value 2018-09-20 22:24:27 +00:00
BPF.td
BPFAsmPrinter.cpp [BPF] Generate BTF DebugInfo under BPF target 2018-12-19 16:40:25 +00:00
BPFCallingConv.td
BPFFrameLowering.cpp
BPFFrameLowering.h
BPFISelDAGToDAG.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
BPFISelLowering.cpp bpf: new option -bpf-expand-memcpy-in-order to expand memcpy in order 2018-07-25 22:40:02 +00:00
BPFISelLowering.h bpf: new option -bpf-expand-memcpy-in-order to expand memcpy in order 2018-07-25 22:40:02 +00:00
BPFInstrFormats.td
BPFInstrInfo.cpp bpf: add missing RegState to notify MachineInstr verifier necessary register usage 2018-07-27 16:58:52 +00:00
BPFInstrInfo.h bpf: new option -bpf-expand-memcpy-in-order to expand memcpy in order 2018-07-25 22:40:02 +00:00
BPFInstrInfo.td bpf: new option -bpf-expand-memcpy-in-order to expand memcpy in order 2018-07-25 22:40:02 +00:00
BPFMCInstLower.cpp
BPFMCInstLower.h
BPFMIChecking.cpp bpf: check illegal usage of XADD insn return value 2018-09-20 22:24:27 +00:00
BPFMIPeephole.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
BPFRegisterInfo.cpp
BPFRegisterInfo.h [TargetRegisterInfo] Remove temporary hook enableMultipleCopyHints() 2018-10-05 14:23:11 +00:00
BPFRegisterInfo.td
BPFSelectionDAGInfo.cpp bpf: new option -bpf-expand-memcpy-in-order to expand memcpy in order 2018-07-25 22:40:02 +00:00
BPFSelectionDAGInfo.h bpf: new option -bpf-expand-memcpy-in-order to expand memcpy in order 2018-07-25 22:40:02 +00:00
BPFSubtarget.cpp
BPFSubtarget.h bpf: new option -bpf-expand-memcpy-in-order to expand memcpy in order 2018-07-25 22:40:02 +00:00
BPFTargetMachine.cpp [Targets] Add errors for tiny and kernel codemodel on targets that don't support them 2018-12-07 12:10:23 +00:00
BPFTargetMachine.h
BTF.def [BPF] Generate BTF DebugInfo under BPF target 2018-12-19 16:40:25 +00:00
BTF.h [BPF] Generate BTF DebugInfo under BPF target 2018-12-19 16:40:25 +00:00
BTFDebug.cpp [BPF] Generate BTF DebugInfo under BPF target 2018-12-19 16:40:25 +00:00
BTFDebug.h [BPF] Generate BTF DebugInfo under BPF target 2018-12-19 16:40:25 +00:00
CMakeLists.txt [BPF] Generate BTF DebugInfo under BPF target 2018-12-19 16:40:25 +00:00
LLVMBuild.txt