You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Remarks] Introduce count subcommand for llvm-remarkutil. (llvm#66214)
This tool is a generic remark counter reporting count based on specified
properties. The counter can be used to count remarks individually and
filter them based on name, type and pass or count using remark
arguments.
:program:`llvm-remarkutil count` counts `remarks <https://llvm.org/docs/Remarks.html>` based on specified properties.
126
+
By default the tool counts remarks based on how many occour in a source file or function or total for the generated remark file.
127
+
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.
128
+
129
+
The tool contains utilities to filter the remark count based on remark name, pass name, argument value and remark type.
130
+
OPTIONS
131
+
-------
132
+
133
+
.. option:: --parser=<yaml|bitstream>
134
+
135
+
Select the type of input remark parser. Required.
136
+
* ``yaml``: The tool will parse YAML remarks.
137
+
* ``bitstream``: The tool will parse bitstream remarks.
138
+
139
+
.. option:: --count-by<value>
140
+
Select option to collect remarks by.
141
+
* ``remark-name``: count how many individual remarks exist.
142
+
* ``arg``: count remarks based on specified arguments passed by --(r)args. The argument value must be a number.
143
+
144
+
.. option:: --group-by=<value>
145
+
group count of remarks by property.
146
+
* ``source``: Count will be collected per source path. Remarks with no debug location will not be counted.
147
+
* ``function``: Count is collected per function.
148
+
* ``function-with-loc``: Count is collected per function per source. Remarks with no debug location will not be counted.
149
+
* ``Total``: Report a count for the provided remark file.
150
+
151
+
.. option:: --args[=arguments]
152
+
If `count-by` is set to `arg` this flag can be used to collect from specified remark arguments represented as a comma seperated string.
153
+
The arguments must have a numeral value to be able to count remarks by
154
+
155
+
.. option:: --rargs[=arguments]
156
+
If `count-by` is set to `arg` this flag can be used to collect from specified remark arguments using regular expression.
157
+
The arguments must have a numeral value to be able to count remarks by
158
+
159
+
.. option:: --pass-name[=<string>]
160
+
Filter count by pass name.
161
+
162
+
.. option:: --rpass-name[=<string>]
163
+
Filter count by pass name using regular expressions.
164
+
165
+
.. option:: --remark-name[=<string>]
166
+
Filter count by remark name.
167
+
168
+
.. option:: --rremark-name[=<string>]
169
+
Filter count by remark name using regular expressions.
170
+
171
+
.. option:: --filter-arg-by[=<string>]
172
+
Filter count by argument value.
173
+
174
+
.. option:: --rfilter-arg-by[=<string>]
175
+
Filter count by argument value using regular expressions.
176
+
177
+
.. option:: --remark-type=<value>
178
+
Filter remarks by type with the following options.
0 commit comments