diff options
author | Yonghong Song <yhs@fb.com> | 2021-09-09 18:31:18 -0700 |
---|---|---|
committer | Yonghong Song <yhs@fb.com> | 2021-09-09 19:03:57 -0700 |
commit | e52617c31de1171c208b7ba0bb96520b78d130b3 (patch) | |
tree | a298e2fbc12ea96e948f8e9f79f39f45766b9b0b /llvm/lib/Support/APInt.cpp | |
parent | 12f80c0bbda2b1492f521345b287343457ccd03c (diff) | |
download | llvm-e52617c31de1171c208b7ba0bb96520b78d130b3.zip llvm-e52617c31de1171c208b7ba0bb96520b78d130b3.tar.gz llvm-e52617c31de1171c208b7ba0bb96520b78d130b3.tar.bz2 |
BPF: change BTF_KIND_TAG format
Previously we have the following binary representation:
struct bpf_type { name, info, type }
struct btf_tag { __u32 component_idx; }
If the tag points to a struct/union/var/func type, we will have
kflag = 1, component_idx = 0
if the tag points to struct/union member or func argument, we will have
kflag = 0, component_idx = 0, ..., vlen - 1
The above rather makes interface complex to have both kflag and
component needed to determine its legality and index.
This patch simplifies the interface by removing kflag involvement.
component_idx = (u32)-1 : tag pointing to a type
component_idx = 0 ... vlen - 1 : tag pointing to a member or argument
and kflag is always 0 and there is no need to check.
Differential Revision: https://reviews.llvm.org/D109560
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
0 files changed, 0 insertions, 0 deletions