[all-commits] [llvm/llvm-project] 41860e: BPF: Support btf_type_tag attribute

yonghong-song via All-commits all-commits at lists.llvm.org
Thu Nov 4 17:02:46 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 41860e602aaa94556ba996fae7b8baa268e25096
      https://github.com/llvm/llvm-project/commit/41860e602aaa94556ba996fae7b8baa268e25096
  Author: Yonghong Song <yhs at fb.com>
  Date:   2021-11-04 (Thu, 04 Nov 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/type-tag-var.ll

  Log Message:
  -----------
  BPF: Support btf_type_tag attribute

A new kind BTF_KIND_TYPE_TAG is defined. The tags associated
with a pointer type are emitted in their IR order as modifiers.
For example, for the following declaration:
  int __tag1 * __tag1 __tag2 *g;
The BTF type chain will look like
  VAR(g) -> __tag1 --> __tag2 -> pointer -> __tag1 -> pointer -> int
In the above "->" means BTF CommonType.Type which indicates
the point-to type.

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




More information about the All-commits mailing list