[PATCH] D68760: [BPF] Remove relocation for patchable externs

Yonghong Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 9 22:47:29 PDT 2019


yonghong-song created this revision.
yonghong-song added reviewers: ast, anakryiko.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Previously, patchable extern relocations are introduced to patch
external variables used for multi versioning in
compile once, run everywhere use case. The load instruction
will be converted into a move with an patchable immediate
which can be changed by bpf loader on the host.

The kernel verifier has evolved and is able to load
and propagate constant values, so compiler relocation
becomes unnecessary. This patch removed codes related to this.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D68760

Files:
  llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp
  llvm/lib/Target/BPF/BPFCORE.h
  llvm/lib/Target/BPF/BPFMISimplifyPatchable.cpp
  llvm/lib/Target/BPF/BTF.h
  llvm/lib/Target/BPF/BTFDebug.cpp
  llvm/lib/Target/BPF/BTFDebug.h
  llvm/test/CodeGen/BPF/BTF/binary-format.ll
  llvm/test/CodeGen/BPF/BTF/filename.ll
  llvm/test/CodeGen/BPF/BTF/func-func-ptr.ll
  llvm/test/CodeGen/BPF/BTF/func-non-void.ll
  llvm/test/CodeGen/BPF/BTF/func-source.ll
  llvm/test/CodeGen/BPF/BTF/func-typedef.ll
  llvm/test/CodeGen/BPF/BTF/func-unused-arg.ll
  llvm/test/CodeGen/BPF/BTF/func-void.ll
  llvm/test/CodeGen/BPF/CORE/offset-reloc-basic.ll
  llvm/test/CodeGen/BPF/CORE/offset-reloc-multilevel.ll
  llvm/test/CodeGen/BPF/CORE/offset-reloc-struct-anonymous.ll
  llvm/test/CodeGen/BPF/CORE/offset-reloc-struct-array.ll
  llvm/test/CodeGen/BPF/CORE/offset-reloc-union.ll
  llvm/test/CodeGen/BPF/CORE/patchable-extern-char.ll
  llvm/test/CodeGen/BPF/CORE/patchable-extern-uint.ll
  llvm/test/CodeGen/BPF/CORE/patchable-extern-ulonglong.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68760.224251.patch
Type: text/x-patch
Size: 40041 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191010/33d03499/attachment.bin>


More information about the llvm-commits mailing list