[PATCH] D106620: [Clang][LLVM] generate btf_tag annotations for func parameters

Yonghong Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 22 17:32:58 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 function parameters.
A field "annotations" is introduced to DILocalVariable, and 
annotations are represented as an DINodeArray, similar to
DIComposite elements. The following example illustrates how 
annotations are encoded in IR:

  distinct !DILocalVariable(name: "info",, arg: 1, ..., annotations: !10)
  !10 = !{!11, !12}
  !11 = !{!"btf_tag", !"a"}
  !12 = !{!"btf_tag", !"b"}


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106620

Files:
  clang/lib/CodeGen/CGDebugInfo.cpp
  clang/test/CodeGen/attr-btf_tag-parameter.c
  llvm/include/llvm/IR/DIBuilder.h
  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/DIBuilder.cpp
  llvm/lib/IR/DebugInfoMetadata.cpp
  llvm/lib/IR/LLVMContextImpl.h
  llvm/test/Bitcode/attr-btf_tag-parameter.ll

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


More information about the cfe-commits mailing list