[llvm] Remark Util introduce remark count (PR #66214)
Zain Jaffal via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 29 03:06:23 PDT 2023
================
@@ -110,6 +110,80 @@ if `--use-debug-loc` is passed then the CSV will include the source path, line n
Source,Function,Count
path:line:column,foo,3
+.. _count_subcommand:
+
+count
+~~~~~
+
+..program:: llvm-remarkutil count
+
+USAGE: :program:`llvm-remarkutil` count [*options*] <input file>
+
+Summary
+^^^^^^^
+
+:program:`llvm-remarkutil count` counts `remakrs <https://llvm.org/docs/Remarks.html>` based on specified properties.
+By default the tool counts remarks based on how many occour in a source file or function or total for the generated remark file.
+The tool also supports collecting count based on specific remark arguments. The specified arguments should have an integer value to be able to report a count.
+
+The tool contains utilities to filter the remark count based on remark name, pass name, argument value and remark type.
+OPTIONS
+-------
+
+.. option:: --parser=<yaml|bitstream>
+
+ Select the type of input remark parser. Required.
+ * ``yaml``: The tool will parse YAML remarks.
+ * ``bitstream``: The tool will parse bitstream remarks.
+
+.. option:: --count-by<value>
+ Select option to collect remarks by.
+ * ``remark-name``: count how many individual remarks exist.
+ * ``arg``: count remarks based on specified arguments passed by --(r)args. The argument value must be a number.
+
+.. option:: --group-by=<value>
+ group count of remarks by property.
+ * ``source``: Count will be collected per source path. Requires remarks to have debug loc info
+ * ``function``: Count is collected per function.
+ * ``function-with-loc``: Count is collected per function per source. Requires remarks to have debug loc info
----------------
zjaffal wrote:
Yes I will update it accordingly
https://github.com/llvm/llvm-project/pull/66214
More information about the llvm-commits
mailing list