Hi,
Here is the part of invoke.texi that currently confuses
check-params-in-docs.py:
@item aarch64-autovec-preference
Force an ISA selection strategy for auto-vectorization.
@table @samp
@item default
Use the default heuristics.
@item asimd-only
Use only Advanced SIMD for auto-vectorization.
@item sve-only
Use only SVE for auto-vectorization.
@item prefer-asimd
Use both Advanced SIMD and SVE. Prefer Advanced SIMD when the costs are
deemed equal.
@item prefer-sve
Use both Advanced SIMD and SVE. Prefer SVE when the costs are deemed equal.
@end table
The script reports
Extra:
{'default', 'asimd-only', 'sve-only', 'prefer-asimd', 'prefer-sve'}
Is the patch ok to be pushed?
Cheers,
Filip Kastl
-- 8< --
Currently check-params-in-docs.py reports extra params being listed in
invoke.texi. However, those aren't actual params but items in a table of
possible values of the aarch64-autove-preference param.
This patch changes check-params-in-docs.py to ignore similar tables.
contrib/ChangeLog:
* check-params-in-docs.py: Skip tables of values of a param.
Signed-off-by: Filip Kastl <[email protected]>
---
contrib/check-params-in-docs.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/contrib/check-params-in-docs.py b/contrib/check-params-in-docs.py
index ccdb8d72169..8574842a4e7 100755
--- a/contrib/check-params-in-docs.py
+++ b/contrib/check-params-in-docs.py
@@ -66,7 +66,18 @@ texi = takewhile(lambda x: '@node Instrumentation Options'
not in x, texi)
texi = list(texi)[1:]
texi_params = []
+skip = False
for line in texi:
+ # Skip @table @samp sections of manual where values of a param are usually
+ # listed
+ if skip:
+ if line.startswith('@end table'):
+ skip = False
+ continue
+ elif line.startswith('@table @samp'):
+ skip = True
+ continue
+
for token in ('@item ', '@itemx '):
if line.startswith(token):
texi_params.append(line[len(token):])
--
2.46.0