[PATCH] D91195: Add Annotation2MD pass to add !annotate metadata from llvm.global.annotations

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 10 11:39:30 PST 2020


fhahn created this revision.
fhahn added reviewers: paquette, thegameg, jdoerfert, aprantl.
Herald added subscribers: dexonsmith, wenlei, nikic, kerbowa, steven_wu, hiraditya, mgorny, nhaehnle, jvesely.
Herald added a project: LLVM.
fhahn requested review of this revision.

This patch adds a new pass to add !annotation metadata for entries in
@llvm.global.anotations, which is generated  using
__attribute__((annotate("_name"))) on functions in Clang.

This has been discussed on llvm-dev as part of

  RFC: Combining Annotation Metadata and Remarks
  http://lists.llvm.org/pipermail/llvm-dev/2020-November/146393.html


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91195

Files:
  llvm/include/llvm/IR/Instruction.h
  llvm/include/llvm/InitializePasses.h
  llvm/include/llvm/Transforms/IPO.h
  llvm/include/llvm/Transforms/IPO/Annotation2Metadata.h
  llvm/lib/IR/Instruction.cpp
  llvm/lib/Passes/PassBuilder.cpp
  llvm/lib/Passes/PassRegistry.def
  llvm/lib/Transforms/IPO/Annotation2Metadata.cpp
  llvm/lib/Transforms/IPO/CMakeLists.txt
  llvm/lib/Transforms/IPO/IPO.cpp
  llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
  llvm/test/CodeGen/AMDGPU/opt-pipeline.ll
  llvm/test/Other/new-pm-defaults.ll
  llvm/test/Other/new-pm-lto-defaults.ll
  llvm/test/Other/new-pm-thinlto-defaults.ll
  llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
  llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
  llvm/test/Other/opt-O0-pipeline.ll
  llvm/test/Other/opt-O2-pipeline.ll
  llvm/test/Other/opt-O3-pipeline-enable-matrix.ll
  llvm/test/Other/opt-O3-pipeline.ll
  llvm/test/Other/opt-Os-pipeline.ll
  llvm/test/Transforms/Util/annotation2metadata.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91195.304277.patch
Type: text/x-patch
Size: 22120 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201110/2e2b5e22/attachment.bin>


More information about the llvm-commits mailing list