aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/CommandGuide
diff options
context:
space:
mode:
authorZain Jaffal <z_jaffal@apple.com>2023-04-06 15:09:24 +0100
committerZain Jaffal <z_jaffal@apple.com>2023-04-07 23:33:29 +0100
commit7cc80ef5fa359b68ee85033f98b1bef1f37fb21c (patch)
tree58d7c30e7c606fb17fcd5092882c88a339029945 /llvm/docs/CommandGuide
parenta046d187720137d944cece4aa4561f4bceb54e3c (diff)
downloadllvm-7cc80ef5fa359b68ee85033f98b1bef1f37fb21c.zip
llvm-7cc80ef5fa359b68ee85033f98b1bef1f37fb21c.tar.gz
llvm-7cc80ef5fa359b68ee85033f98b1bef1f37fb21c.tar.bz2
Add an option to print out annotation remark count.
This adds a `annotation-count` option to llvm-remarkutil. ``` llvm-remarkutil annotation-count -remark=REMARK ``` This will print out the remark count for a pass that uses annotation remarks. Differential Revision: https://reviews.llvm.org/D147710
Diffstat (limited to 'llvm/docs/CommandGuide')
-rw-r--r--llvm/docs/CommandGuide/llvm-remarkutil.rst23
1 files changed, 22 insertions, 1 deletions
diff --git a/llvm/docs/CommandGuide/llvm-remarkutil.rst b/llvm/docs/CommandGuide/llvm-remarkutil.rst
index 481774a..f3ecb56 100644
--- a/llvm/docs/CommandGuide/llvm-remarkutil.rst
+++ b/llvm/docs/CommandGuide/llvm-remarkutil.rst
@@ -20,7 +20,7 @@ Subcommands
* :ref:`bitstream2yaml_subcommand` - Reserialize bitstream remarks to YAML.
* :ref:`yaml2bitstream_subcommand` - Reserialize YAML remarks to bitstream.
* :ref:`instruction-count_subcommand` - Output function instruction counts.
-
+ * :ref:`annotation-count_subcommand` - Output remark type count from annotation remarks.
.. _bitstream2yaml_subcommand:
bitstream2yaml
@@ -72,3 +72,24 @@ CSV format is as follows:
::
Function,InstructionCount
foo,123
+
+annotation-count
+~~~~~~~~~~~~~~~~~
+
+.. program:: llvm-remarkutil annotation-count
+
+USAGE: :program:`llvm-remarkutil` annotation-count <input file> --parser=<bitstream|yaml> --annotation-type=<type> -o <output file>
+
+Summary
+^^^^^^^
+
+Outputs a count for annotation-type `<type>` remark for every function. The count expresses
+the number of remark checks inserted at the function.
+
+Annotation count remarks require AnnotationRemarksPass remarks.
+
+CSV format is as follows:
+
+::
+ Function,Count
+ foo,123