[all-commits] [llvm/llvm-project] 436922: BPF: make __builtin_btf_type_id() return 64bit int

yonghong-song via All-commits all-commits at lists.llvm.org
Mon Nov 16 07:09:31 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4369223ea73c4b8a3fa9a8a84533125c7d0eea98
      https://github.com/llvm/llvm-project/commit/4369223ea73c4b8a3fa9a8a84533125c7d0eea98
  Author: Yonghong Song <yhs at fb.com>
  Date:   2020-11-16 (Mon, 16 Nov 2020)

  Changed paths:
    M clang/include/clang/Basic/BuiltinsBPF.def
    M clang/lib/Sema/SemaChecking.cpp
    M clang/test/CodeGen/builtin-bpf-btf-type-id.c
    M llvm/include/llvm/IR/IntrinsicsBPF.td
    M llvm/lib/Target/BPF/BPFPreserveDIType.cpp
    M llvm/lib/Target/BPF/BTFDebug.cpp
    M llvm/test/CodeGen/BPF/BTF/builtin-btf-type-id.ll
    M llvm/test/CodeGen/BPF/CORE/btf-id-duplicate.ll
    M llvm/test/CodeGen/BPF/optnone-2.ll

  Log Message:
  -----------
  BPF: make __builtin_btf_type_id() return 64bit int

Linux kernel recently added support for kernel modules
  https://lore.kernel.org/bpf/20201110011932.3201430-5-andrii@kernel.org/

In such cases, a type id in the kernel needs to be presented
as (btf id for modules, btf type id for this module).
Change __builtin_btf_type_id() to return 64bit value
so libbpf can do the above encoding.

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




More information about the All-commits mailing list