[all-commits] [llvm/llvm-project] fbb64a: [BPF] extend BTF_KIND_FUNC to cover global, static...

yonghong-song via All-commits all-commits at lists.llvm.org
Fri Jan 10 09:07:00 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: fbb64aa69835c8e3e9efe0afc8a73058b5a0fb3c
      https://github.com/llvm/llvm-project/commit/fbb64aa69835c8e3e9efe0afc8a73058b5a0fb3c
  Author: Yonghong Song <yhs at fb.com>
  Date:   2020-01-10 (Fri, 10 Jan 2020)

  Changed paths:
    M llvm/lib/Target/BPF/BTF.h
    M llvm/lib/Target/BPF/BTFDebug.cpp
    M llvm/lib/Target/BPF/BTFDebug.h
    M llvm/test/CodeGen/BPF/BTF/binary-format.ll
    A llvm/test/CodeGen/BPF/BTF/extern-builtin.ll
    A llvm/test/CodeGen/BPF/BTF/extern-func-arg.ll
    M llvm/test/CodeGen/BPF/BTF/extern-global-var.ll
    M llvm/test/CodeGen/BPF/BTF/extern-var-func-weak-section.ll
    M llvm/test/CodeGen/BPF/BTF/extern-var-func-weak.ll
    M llvm/test/CodeGen/BPF/BTF/extern-var-func.ll
    M llvm/test/CodeGen/BPF/BTF/extern-var-section.ll
    M llvm/test/CodeGen/BPF/BTF/extern-var-struct-weak.ll
    M llvm/test/CodeGen/BPF/BTF/extern-var-struct.ll
    M llvm/test/CodeGen/BPF/BTF/extern-var-weak-section.ll
    M llvm/test/CodeGen/BPF/BTF/filename.ll
    M llvm/test/CodeGen/BPF/BTF/func-func-ptr.ll
    M llvm/test/CodeGen/BPF/BTF/func-non-void.ll
    M llvm/test/CodeGen/BPF/BTF/func-source.ll
    M llvm/test/CodeGen/BPF/BTF/func-typedef.ll
    M llvm/test/CodeGen/BPF/BTF/func-unused-arg.ll
    M llvm/test/CodeGen/BPF/BTF/func-void.ll
    M llvm/test/CodeGen/BPF/BTF/local-var.ll
    A llvm/test/CodeGen/BPF/BTF/static-func.ll
    M llvm/test/CodeGen/BPF/BTF/static-var-derived-type.ll
    M llvm/test/CodeGen/BPF/BTF/static-var-inited-sec.ll
    M llvm/test/CodeGen/BPF/BTF/static-var-inited.ll
    M llvm/test/CodeGen/BPF/BTF/static-var-readonly-sec.ll
    M llvm/test/CodeGen/BPF/BTF/static-var-readonly.ll
    M llvm/test/CodeGen/BPF/BTF/static-var-sec.ll
    M llvm/test/CodeGen/BPF/BTF/static-var-zerolen-array.ll
    M llvm/test/CodeGen/BPF/BTF/static-var.ll
    M llvm/test/CodeGen/BPF/CORE/offset-reloc-basic.ll
    M llvm/test/CodeGen/BPF/CORE/offset-reloc-multilevel.ll
    M llvm/test/CodeGen/BPF/CORE/offset-reloc-struct-anonymous.ll
    M llvm/test/CodeGen/BPF/CORE/offset-reloc-struct-array.ll
    M llvm/test/CodeGen/BPF/CORE/offset-reloc-union.ll

  Log Message:
  -----------
  [BPF] extend BTF_KIND_FUNC to cover global, static and extern funcs

Previously extern function is added as BTF_KIND_VAR. This does not work
well with existing BTF infrastructure as function expected to use
BTF_KIND_FUNC and BTF_KIND_FUNC_PROTO.

This patch added extern function to BTF_KIND_FUNC. The two bits 0:1
of btf_type.info are used to indicate what kind of function it is:
  0: static
  1: global
  2: extern

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




More information about the All-commits mailing list