[all-commits] [llvm/llvm-project] 8d499b: BPF: change btf_type_tag BTF output format
yonghong-song via All-commits
all-commits at lists.llvm.org
Tue Nov 9 11:35:14 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8d499bd5bc1eee4c385b2bda26fc5f415a621207
https://github.com/llvm/llvm-project/commit/8d499bd5bc1eee4c385b2bda26fc5f415a621207
Author: Yonghong Song <yhs at fb.com>
Date: 2021-11-09 (Tue, 09 Nov 2021)
Changed paths:
M llvm/lib/Target/BPF/BTFDebug.cpp
M llvm/lib/Target/BPF/BTFDebug.h
M llvm/test/CodeGen/BPF/BTF/type-tag-var.ll
Log Message:
-----------
BPF: change btf_type_tag BTF output format
For the declaration like below:
int __tag1 * __tag1 __tag2 *g
Commit 41860e602aaa ("BPF: Support btf_type_tag attribute")
implemented the following encoding:
VAR(g) -> __tag1 --> __tag2 -> pointer -> __tag1 -> pointer -> int
Some further experiments with linux btf_type_tag support, esp.
with generating attributes in vmlinux.h, and also some internal
discussion showed the following format is more desirable:
VAR(g) -> pointer -> __tag2 -> __tag1 -> pointer -> __tag1 -> int
The format makes it similar to other modifier like 'const', e.g.,
const int *g
which has encoding VAR(g) -> PTR -> CONST -> int
Differential Revision: https://reviews.llvm.org/D113496
More information about the All-commits
mailing list