[PATCH] D106616: [Clang][LLVM] generate btf_tag annotations for DIDerived types

Yonghong Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 22 17:23:40 PDT 2021


yonghong-song created this revision.
yonghong-song added reviewers: dblaikie, probinson, aprantl, aaron.ballman.
yonghong-song added a project: debug-info.
Herald added subscribers: dexonsmith, ormris, hiraditya.
yonghong-song requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.

Generate btf_tag annotations for DIDrived types. More specifically,
clang frontend generates the btf_tag annotations for record
fields. The annotations are represented as an DINodeArray
in DebugInfo. The following example illustrate how 
annotations are encoded in IR:

  distinct !DIDerivedType(tag: DW_TAG_member, ..., annotations: !10)
  !10 = !{!11, !12}
  !11 = !{!"btf_tag", !"a"}
  !12 = !{!"btf_tag", !"b"}


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106616

Files:
  clang/lib/CodeGen/CGDebugInfo.cpp
  clang/test/CodeGen/attr-btf_tag-field.c
  llvm/include/llvm/IR/DebugInfoMetadata.h
  llvm/lib/AsmParser/LLParser.cpp
  llvm/lib/Bitcode/Reader/MetadataLoader.cpp
  llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
  llvm/lib/IR/AsmWriter.cpp
  llvm/lib/IR/DebugInfoMetadata.cpp
  llvm/lib/IR/LLVMContextImpl.h
  llvm/test/Bitcode/attr-btf_tag-field.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106616.361038.patch
Type: text/x-patch
Size: 13868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210723/7a99bf71/attachment.bin>


More information about the cfe-commits mailing list