[all-commits] [llvm/llvm-project] 494892: [BPF] support btf_tag attribute in .BTF section

yonghong-song via All-commits all-commits at lists.llvm.org
Sat Aug 28 21:03:57 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4948927058e5a8e808e44583c33e472d0d8a315d
      https://github.com/llvm/llvm-project/commit/4948927058e5a8e808e44583c33e472d0d8a315d
  Author: Yonghong Song <yhs at fb.com>
  Date:   2021-08-28 (Sat, 28 Aug 2021)

  Changed paths:
    M llvm/lib/Target/BPF/BTF.def
    M llvm/lib/Target/BPF/BTF.h
    M llvm/lib/Target/BPF/BTFDebug.cpp
    M llvm/lib/Target/BPF/BTFDebug.h
    A llvm/test/CodeGen/BPF/BTF/tag-1.ll
    A llvm/test/CodeGen/BPF/BTF/tag-2.ll

  Log Message:
  -----------
  [BPF] support btf_tag attribute in .BTF section

A new kind BTF_KIND_TAG is added to .BTF to encode
btf_tag attributes. The format looks like
   CommonType.name : attribute string
   CommonType.type : attached to a struct/union/func/var.
   CommonType.info : encoding BTF_KIND_TAG
                     kflag == 1 to indicate the attribute is
                     for CommonType.type, or kflag == 0
                     for struct/union member or func argument.
   one uint32_t    : to encode which member/argument starting from 0.

If one particular type or member/argument has more than one attribute,
multiple BTF_KIND_TAG will be generated.

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




More information about the All-commits mailing list