[PATCH] D61524: [BPF] Support for compile once and run everywhere

Yonghong Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 24 16:42:56 PDT 2019


yonghong-song updated this revision to Diff 206326.
yonghong-song added a comment.

Handling the following case:

  // Collect MapDef types. Map definition needs to collect
  // pointee types. Do it first. Otherwise, for the following
  // case:
  //    struct m { ...};
  //    struct t {
  //      struct m *key;
  //    };
  //    foo(struct t *arg);
  //    
  //    struct mapdef {
  //      ...
  //      struct m *key;
  //      ...
  //    } __attribute__((section(".maps"))) hash_map;
  //
  // If subroutine foo is traversed first, a type chain
  // "ptr->struct m(fwd)" will be created and later on
  // when traversing mapdef, since "ptr->struct m" exists,
  // the traversal of "struct m" will be omitted.

Now, all kernel bpf selftest passed without any warning as well.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61524/new/

https://reviews.llvm.org/D61524

Files:
  lib/Target/BPF/BPF.h
  lib/Target/BPF/BPFAbstrctMemberAccess.cpp
  lib/Target/BPF/BPFAsmPrinter.cpp
  lib/Target/BPF/BPFCORE.h
  lib/Target/BPF/BPFMISimplifyPatchable.cpp
  lib/Target/BPF/BPFTargetMachine.cpp
  lib/Target/BPF/BTF.h
  lib/Target/BPF/BTFDebug.cpp
  lib/Target/BPF/BTFDebug.h
  lib/Target/BPF/CMakeLists.txt
  test/CodeGen/BPF/BTF/binary-format.ll
  test/CodeGen/BPF/BTF/extern-global-var.ll
  test/CodeGen/BPF/BTF/filename.ll
  test/CodeGen/BPF/BTF/func-func-ptr.ll
  test/CodeGen/BPF/BTF/func-non-void.ll
  test/CodeGen/BPF/BTF/func-source.ll
  test/CodeGen/BPF/BTF/func-typedef.ll
  test/CodeGen/BPF/BTF/func-unused-arg.ll
  test/CodeGen/BPF/BTF/func-void.ll
  test/CodeGen/BPF/BTF/local-var.ll
  test/CodeGen/BPF/BTF/map-def.ll
  test/CodeGen/BPF/BTF/ptr-prune-type.ll
  test/CodeGen/BPF/BTF/static-var-derived-type.ll
  test/CodeGen/BPF/BTF/static-var-inited-sec.ll
  test/CodeGen/BPF/BTF/static-var-inited.ll
  test/CodeGen/BPF/BTF/static-var-readonly-sec.ll
  test/CodeGen/BPF/BTF/static-var-readonly.ll
  test/CodeGen/BPF/BTF/static-var-sec.ll
  test/CodeGen/BPF/BTF/static-var-zerolen-array.ll
  test/CodeGen/BPF/BTF/static-var.ll
  test/CodeGen/BPF/CORE/offset-reloc-basic.ll
  test/CodeGen/BPF/CORE/offset-reloc-multilevel.ll
  test/CodeGen/BPF/CORE/offset-reloc-struct-anonymous.ll
  test/CodeGen/BPF/CORE/offset-reloc-struct-array.ll
  test/CodeGen/BPF/CORE/offset-reloc-union.ll
  test/CodeGen/BPF/CORE/patchable-extern-char.ll
  test/CodeGen/BPF/CORE/patchable-extern-uint.ll
  test/CodeGen/BPF/CORE/patchable-extern-ulonglong.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61524.206326.patch
Type: text/x-patch
Size: 193899 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190624/27331624/attachment-0001.bin>


More information about the llvm-commits mailing list