[PATCH] D91489: BPF: make __builtin_btf_type_id() return 64bit int
Yonghong Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 14 20:06:29 PST 2020
yonghong-song created this revision.
yonghong-song added reviewers: ast, anakryiko.
Herald added subscribers: llvm-commits, cfe-commits, hiraditya.
Herald added projects: clang, LLVM.
yonghong-song requested review of this revision.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D91489
Files:
clang/include/clang/Basic/BuiltinsBPF.def
clang/lib/Sema/SemaChecking.cpp
clang/test/CodeGen/builtin-bpf-btf-type-id.c
llvm/include/llvm/IR/IntrinsicsBPF.td
llvm/lib/Target/BPF/BPFPreserveDIType.cpp
llvm/lib/Target/BPF/BTFDebug.cpp
llvm/test/CodeGen/BPF/BTF/builtin-btf-type-id.ll
llvm/test/CodeGen/BPF/CORE/btf-id-duplicate.ll
llvm/test/CodeGen/BPF/optnone-2.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91489.305338.patch
Type: text/x-patch
Size: 20539 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201115/fbcea7a8/attachment.bin>
More information about the llvm-commits
mailing list