Skip to content

Commit 0fae9a2

Browse files
authored
[Docs] Fix llvm-remarkutil docs (#84661)
Code blocks and option points weren't rendered correctly
1 parent fcd0dd3 commit 0fae9a2

File tree

1 file changed

+53
-31
lines changed

1 file changed

+53
-31
lines changed

llvm/docs/CommandGuide/llvm-remarkutil.rst

Lines changed: 53 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ llvm-remarkutil - Remark utility
33

44
.. program:: llvm-remarkutil
55

6-
SYNOPSIS
6+
Synopsis
77
--------
88

99
:program:`llvm-remarkutil` [*subcommmand*] [*options*]
1010

11-
DESCRIPTION
11+
Description
1212
-----------
1313

1414
Utility for displaying information from, and converting between different
@@ -72,12 +72,14 @@ Instruction count remarks require asm-printer remarks.
7272
CSV format is as follows:
7373

7474
::
75+
7576
Function,InstructionCount
7677
foo,123
7778

7879
if `--use-debug-loc` is passed then the CSV will include the source path, line number and column.
7980

8081
::
82+
8183
Source,Function,InstructionCount
8284
path:line:column,foo,3
8385

@@ -101,12 +103,14 @@ Annotation count remarks require AnnotationRemarksPass remarks.
101103
CSV format is as follows:
102104

103105
::
106+
104107
Function,Count
105108
foo,123
106109

107110
if `--use-debug-loc` is passed then the CSV will include the source path, line number and column.
108111

109112
::
113+
110114
Source,Function,Count
111115
path:line:column,foo,3
112116

@@ -115,67 +119,83 @@ if `--use-debug-loc` is passed then the CSV will include the source path, line n
115119
count
116120
~~~~~
117121

118-
..program:: llvm-remarkutil count
122+
.. program:: llvm-remarkutil count
119123

120124
USAGE: :program:`llvm-remarkutil` count [*options*] <input file>
121125

122126
Summary
123127
^^^^^^^
124128

125-
:program:`llvm-remarkutil count` counts `remarks <https://llvm.org/docs/Remarks.html>` based on specified properties.
129+
:program:`llvm-remarkutil count` counts `remarks <https://llvm.org/docs/Remarks.html>`_ based on specified properties.
126130
By default the tool counts remarks based on how many occur in a source file or function or total for the generated remark file.
127131
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.
128132

129133
The tool contains utilities to filter the remark count based on remark name, pass name, argument value and remark type.
130-
OPTIONS
131-
-------
134+
135+
Options
136+
^^^^^^^
132137

133138
.. option:: --parser=<yaml|bitstream>
134139

135140
Select the type of input remark parser. Required.
136-
* ``yaml``: The tool will parse YAML remarks.
137-
* ``bitstream``: The tool will parse bitstream remarks.
138141

139-
.. option:: --count-by<value>
142+
* ``yaml`` : The tool will parse YAML remarks.
143+
* ``bitstream`` : The tool will parse bitstream remarks.
144+
145+
.. option:: --count-by=<value>
146+
140147
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.
148+
149+
* ``remark-name`` : count how many individual remarks exist.
150+
* ``arg`` : count remarks based on specified arguments passed by --(r)args. The argument value must be a number.
143151

144152
.. option:: --group-by=<value>
153+
145154
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.
155+
156+
* ``source`` : Count will be collected per source path. Remarks with no debug location will not be counted.
157+
* ``function`` : Count is collected per function.
158+
* ``function-with-loc`` : Count is collected per function per source. Remarks with no debug location will not be counted.
159+
* ``Total`` : Report a count for the provided remark file.
150160

151161
.. option:: --args[=arguments]
162+
152163
If `count-by` is set to `arg` this flag can be used to collect from specified remark arguments represented as a comma separated string.
153164
The arguments must have a numeral value to be able to count remarks by
154165

155166
.. option:: --rargs[=arguments]
167+
156168
If `count-by` is set to `arg` this flag can be used to collect from specified remark arguments using regular expression.
157169
The arguments must have a numeral value to be able to count remarks by
158170

159171
.. option:: --pass-name[=<string>]
172+
160173
Filter count by pass name.
161174

162175
.. option:: --rpass-name[=<string>]
176+
163177
Filter count by pass name using regular expressions.
164178

165179
.. option:: --remark-name[=<string>]
180+
166181
Filter count by remark name.
167182

168183
.. option:: --rremark-name[=<string>]
184+
169185
Filter count by remark name using regular expressions.
170186

171187
.. option:: --filter-arg-by[=<string>]
188+
172189
Filter count by argument value.
173190

174191
.. option:: --rfilter-arg-by[=<string>]
192+
175193
Filter count by argument value using regular expressions.
176194

177195
.. option:: --remark-type=<value>
196+
178197
Filter remarks by type with the following options.
198+
179199
* ``unknown``
180200
* ``passed``
181201
* ``missed``
@@ -210,20 +230,22 @@ compiling a **fixed source** with **differing compilers** or
210230
`bitstream <https://llvm.org/docs/Remarks.html#llvm-bitstream-remarks>`_
211231
remarks.
212232

213-
OPTIONS
214-
-------
233+
Options
234+
^^^^^^^
215235

216236
.. option:: --parser=<yaml|bitstream>
217237

218-
Select the type of input remark parser. Required.
219-
* ``yaml``: The tool will parse YAML remarks.
220-
* ``bitstream``: The tool will parse bitstream remarks.
238+
Select the type of input remark parser. Required.
239+
240+
* ``yaml`` : The tool will parse YAML remarks.
241+
* ``bitstream`` : The tool will parse bitstream remarks.
221242

222243
.. option:: --report-style=<human|json>
223244

224245
Output style.
225-
* ``human``: Human-readable textual report. Default option.
226-
* ``json``: JSON report.
246+
247+
* ``human`` : Human-readable textual report. Default option.
248+
* ``json`` : JSON report.
227249

228250
.. option:: --pretty
229251

@@ -235,8 +257,8 @@ OPTIONS
235257

236258
Output file for the report. Outputs to stdout by default.
237259

238-
HUMAN-READABLE OUTPUT
239-
---------------------
260+
Human-Readable Output
261+
^^^^^^^^^^^^^^^^^^^^^
240262

241263
The human-readable format for :program:`llvm-remarkutil size-diff` is composed of
242264
two sections:
@@ -245,7 +267,7 @@ two sections:
245267
* A high-level summary of all changes.
246268

247269
Changed Function Section
248-
~~~~~~~~~~~~~~~~~~~~~~~~
270+
^^^^^^^^^^^^^^^^^^^^^^^^
249271

250272
Suppose you are comparing two remark files OLD and NEW.
251273

@@ -282,7 +304,7 @@ A breakdown of the format is below:
282304
Second file stack byte count - first file stack byte count.
283305

284306
Summary Section
285-
~~~~~~~~~~~~~~~
307+
^^^^^^^^^^^^^^^
286308

287309
:program:`llvm-remarkutil size-diff` will output a high-level summary after
288310
printing all changed functions.
@@ -307,10 +329,10 @@ printing all changed functions.
307329
file.
308330

309331
JSON OUTPUT
310-
-----------
332+
^^^^^^^^^^^^
311333

312334
High-Level view
313-
~~~~~~~~~~~~~~~
335+
^^^^^^^^^^^^^^^
314336

315337
Suppose we are comparing two files, OLD and NEW.
316338

@@ -352,7 +374,7 @@ Suppose we are comparing two files, OLD and NEW.
352374
Functions only present in the second file.
353375

354376
Function JSON
355-
~~~~~~~~~~~~~
377+
^^^^^^^^^^^^^
356378

357379
The ``InBoth``, ``OnlyInA``, and ``OnlyInB`` sections contain size information
358380
for each function in the input remark files.
@@ -387,7 +409,7 @@ for each function in the input remark files.
387409
* ``STACK_BYTES_B``: Stack bytes in NEW.
388410

389411
Computing Diffs From Function JSON
390-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
412+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
391413

392414
Function JSON does not contain the diffs. Tools consuming JSON output from
393415
:program:`llvm-remarkutil size-diff` are responsible for computing the diffs
@@ -399,7 +421,7 @@ separately.
399421
* Stack byte count diff: ``STACK_BYTES_B - STACK_BYTES_A``
400422

401423
EXIT STATUS
402-
-----------
424+
^^^^^^^^^^^
403425

404426
:program:`llvm-remarkutil size-diff` returns 0 on success, and a non-zero value
405427
otherwise.

0 commit comments

Comments
 (0)