[PATCH] D91188: Add !annotation metadata and remarks pass.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 10 10:25:40 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 !annotation metadata kind which can be used to
attach annotation strings to instructions.
It also adds a new pass that emits summary remarks per function with the
counts for each annotation kind.
The intended uses cases for this new metadata is annotating
'interesting' instructions and the remarks should provide additional
insight into transformations applied to a program.
To motivate this, consider these specific questions we would like to get answered:
- How many stores added for automatic variable initialization remain after optimizations? Where are they?
- How many runtime checks inserted by a frontend could be eliminated? Where are the ones that did not get eliminated?
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D91188
Files:
llvm/docs/LangRef.rst
llvm/include/llvm/Analysis/OptimizationRemarkEmitter.h
llvm/include/llvm/IR/FixedMetadataKinds.def
llvm/include/llvm/InitializePasses.h
llvm/include/llvm/Transforms/Scalar.h
llvm/include/llvm/Transforms/Scalar/AnnotationRemarks.h
llvm/lib/IR/Verifier.cpp
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassRegistry.def
llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
llvm/lib/Transforms/Scalar/AnnotationRemarks.cpp
llvm/lib/Transforms/Scalar/CMakeLists.txt
llvm/lib/Transforms/Scalar/Scalar.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-LTO-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/annotation-remarks.ll
llvm/test/Verifier/annotation-metadata.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91188.304250.patch
Type: text/x-patch
Size: 24786 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201110/716c2df1/attachment.bin>
More information about the llvm-commits
mailing list