Skip to content

Commit 0603737

Browse files
committed
[llvm-remarkutil] Fix issues after #66214 and its fixups
Don't use reserved identifier (_GroupBy) Fix GCC 7.4/7.5 builds (return Filter => return std::move(Filter)) Remove trailing spaces
1 parent 8dd3bc1 commit 0603737

14 files changed

+50
-51
lines changed

llvm/docs/CommandGuide/llvm-remarkutil.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ CSV format is as follows:
7575
Function,InstructionCount
7676
foo,123
7777

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

8080
::
8181
Source,Function,InstructionCount
@@ -104,7 +104,7 @@ CSV format is as follows:
104104
Function,Count
105105
foo,123
106106

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

109109
::
110110
Source,Function,Count
@@ -122,7 +122,7 @@ USAGE: :program:`llvm-remarkutil` count [*options*] <input file>
122122
Summary
123123
^^^^^^^
124124

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

@@ -143,15 +143,15 @@ OPTIONS
143143

144144
.. option:: --group-by=<value>
145145
group count of remarks by property.
146-
* ``source``: Count will be collected per source path. Remarks with no debug location will not be counted.
146+
* ``source``: Count will be collected per source path. Remarks with no debug location will not be counted.
147147
* ``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.
148+
* ``function-with-loc``: Count is collected per function per source. Remarks with no debug location will not be counted.
149149
* ``Total``: Report a count for the provided remark file.
150150

151151
.. option:: --args[=arguments]
152152
If `count-by` is set to `arg` this flag can be used to collect from specified remark arguments represented as a comma seperated string.
153153
The arguments must have a numeral value to be able to count remarks by
154-
154+
155155
.. option:: --rargs[=arguments]
156156
If `count-by` is set to `arg` this flag can be used to collect from specified remark arguments using regular expression.
157157
The arguments must have a numeral value to be able to count remarks by
@@ -177,12 +177,12 @@ OPTIONS
177177
.. option:: --remark-type=<value>
178178
Filter remarks by type with the following options.
179179
* ``unknown``
180-
* ``passed``
181-
* ``missed``
182-
* ``analysis``
180+
* ``passed``
181+
* ``missed``
182+
* ``analysis``
183183
* ``analysis-fp-commute``
184-
* ``analysis-aliasing``
185-
* ``failure``
184+
* ``analysis-aliasing``
185+
* ``failure``
186186

187187
.. _size-diff_subcommand:
188188

llvm/test/tools/llvm-remarkutil/Inputs/annotation-count-with-dbg-loc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Args:
1212
Pass: annotation-remarks
1313
Name: AnnotationSummary
1414
DebugLoc: { File: path/to/anno2.c, Line: 1, Column: 2 }
15-
Function: func2
15+
Function: func2
1616
Args:
1717
- String: 'Annotated '
1818
- count: '2'

llvm/test/tools/llvm-remarkutil/Inputs/annotation-count.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
--- !Analysis
22
Pass: annotation-remarks
33
Name: AnnotationSummary
4-
Function: func1
4+
Function: func1
55
Args:
66
- String: 'Annotated '
77
- count: '1'
@@ -10,7 +10,7 @@ Args:
1010
--- !Analysis
1111
Pass: annotation-remarks
1212
Name: AnnotationSummary
13-
Function: func2
13+
Function: func2
1414
Args:
1515
- String: 'Annotated '
1616
- count: '2'

llvm/test/tools/llvm-remarkutil/count/Inputs/remark-count-by.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- !Analysis
22
Pass: generic-remarks-pass
3-
Name: Remark
3+
Name: Remark
44
DebugLoc: { File: path/to/anno.c, Line: 1, Column: 2 }
55
Function: func1
66
Args:
@@ -23,7 +23,7 @@ Args:
2323
- type: remark
2424
--- !Analysis
2525
Pass: generic-remarks-pass
26-
Name: Remark3
26+
Name: Remark3
2727
DebugLoc: { File: path/to/anno.c, Line: 1, Column: 2 }
2828
Function: func1
2929
Args:
@@ -32,7 +32,7 @@ Args:
3232
- type: remark
3333
--- !Analysis
3434
Pass: generic-remarks-pass
35-
Name: Remark
35+
Name: Remark
3636
DebugLoc: { File: path/to/anno.c, Line: 1, Column: 2 }
3737
Function: func2
3838
Args:

llvm/test/tools/llvm-remarkutil/count/Inputs/remark-filter-by.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- !Analysis
22
Pass: generic-remarks-pass
3-
Name: Remark
3+
Name: Remark
44
DebugLoc: { File: path/to/anno2.c, Line: 1, Column: 2 }
55
Function: func1
66
Args:
@@ -20,7 +20,7 @@ Args:
2020
- type: remark
2121
--- !Missed
2222
Pass: generic-remarks-pass
23-
Name: Remark3
23+
Name: Remark3
2424
DebugLoc: { File: path/to/anno.c, Line: 1, Column: 2 }
2525
Function: func1
2626
Args:
@@ -29,7 +29,7 @@ Args:
2929
- type: remark
3030
--- !Passed
3131
Pass: generic-remarks-pass
32-
Name: Remark
32+
Name: Remark
3333
DebugLoc: { File: path/to/anno.c, Line: 1, Column: 2 }
3434
Function: func1
3535
Args:

llvm/test/tools/llvm-remarkutil/count/Inputs/remark-group-by.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- !Analysis
22
Pass: generic-remarks-pass
3-
Name: Remark
3+
Name: Remark
44
DebugLoc: { File: path/to/anno.c, Line: 1, Column: 2 }
55
Function: func1
66
Args:
@@ -9,7 +9,7 @@ Args:
99
- type: remark
1010
--- !Missed
1111
Pass: generic-remarks-pass
12-
Name: Remark
12+
Name: Remark
1313
DebugLoc: { File: path/to/anno.c, Line: 1, Column: 2 }
1414
Function: func1
1515
Args:
@@ -18,7 +18,7 @@ Args:
1818
- type: remark
1919
--- !Passed
2020
Pass: generic-remarks-pass
21-
Name: Remark
21+
Name: Remark
2222
DebugLoc: { File: path/to/anno.c, Line: 1, Column: 2 }
2323
Function: func2
2424
Args:
@@ -27,7 +27,7 @@ Args:
2727
- type: remark
2828
--- !Analysis
2929
Pass: generic-remarks-pass2
30-
Name: Remark
30+
Name: Remark
3131
DebugLoc: { File: path/to/anno3.c, Line: 1, Column: 2 }
3232
Function: func1
3333
Args:
@@ -36,7 +36,7 @@ Args:
3636
- type: remark
3737
--- !Analysis
3838
Pass: generic-remarks-pass3
39-
Name: Remark
39+
Name: Remark
4040
DebugLoc: { File: path/to/anno.c, Line: 1, Column: 2 }
4141
Function: func2
4242
Args:
@@ -45,7 +45,7 @@ Args:
4545
- type: remark
4646
--- !Analysis
4747
Pass: generic-remarks-pass4
48-
Name: Remark
48+
Name: Remark
4949
DebugLoc: { File: path/to/anno2.c, Line: 1, Column: 2 }
5050
Function: func3
5151
Args:

llvm/test/tools/llvm-remarkutil/count/count-by-keys.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
RUN: llvm-remarkutil count --parser=yaml --count-by=arg --group-by=source %p/Inputs/remark-count-by.yaml | FileCheck %s
22
RUN: llvm-remarkutil count --parser=yaml --count-by=arg --group-by=function %p/Inputs/remark-count-by.yaml | FileCheck %s --check-prefix=CHECKFUNC
33
RUN: llvm-remarkutil count --parser=yaml --count-by=arg --group-by=function-with-loc %p/Inputs/remark-count-by.yaml | FileCheck %s --check-prefix=CHECKFUNCLOC
4-
RUN: llvm-remarkutil count --parser=yaml --count-by=arg --group-by=total %p/Inputs/remark-count-by.yaml | FileCheck %s --check-prefix=CHECKTOTAL
4+
RUN: llvm-remarkutil count --parser=yaml --count-by=arg --group-by=total %p/Inputs/remark-count-by.yaml | FileCheck %s --check-prefix=CHECKTOTAL
55

66
; CHECK-LABEL: Source,count1,count2,count3,count4
77
; CHECK: path/to/anno.c,3,4,6,4

llvm/test/tools/llvm-remarkutil/count/count-by-remark.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
RUN: llvm-remarkutil count --parser=yaml --count-by=remark-name --group-by=source %p/Inputs/remark-count-by.yaml | FileCheck %s
22
RUN: llvm-remarkutil count --parser=yaml --count-by=remark-name --group-by=function %p/Inputs/remark-count-by.yaml | FileCheck %s --check-prefix=CHECKFUNC
33
RUN: llvm-remarkutil count --parser=yaml --count-by=remark-name --group-by=function-with-loc %p/Inputs/remark-count-by.yaml | FileCheck %s --check-prefix=CHECKFUNCLOC
4-
RUN: llvm-remarkutil count --parser=yaml --count-by=remark-name --group-by=total %p/Inputs/remark-count-by.yaml | FileCheck %s --check-prefix=CHECKTOTAL
4+
RUN: llvm-remarkutil count --parser=yaml --count-by=remark-name --group-by=total %p/Inputs/remark-count-by.yaml | FileCheck %s --check-prefix=CHECKTOTAL
55

66
; CHECK-LABEL: Source,Count
77
; CHECK: path/to/anno.c,3

llvm/test/tools/llvm-remarkutil/count/filter-by-pass-name.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
RUN: llvm-remarkutil count --parser=yaml --pass-name=generic-remarks-pass %p/Inputs/remark-filter-by.yaml | FileCheck %s
2-
RUN: llvm-remarkutil count --parser=yaml --rpass-name=.* %p/Inputs/remark-filter-by.yaml | FileCheck %s --check-prefix=CHECKALL
1+
RUN: llvm-remarkutil count --parser=yaml --pass-name=generic-remarks-pass %p/Inputs/remark-filter-by.yaml | FileCheck %s
2+
RUN: llvm-remarkutil count --parser=yaml --rpass-name=.* %p/Inputs/remark-filter-by.yaml | FileCheck %s --check-prefix=CHECKALL
33

44
; CHECK-LABEL: Source,Count
55
; CHECK: path/to/anno.c,2

llvm/test/tools/llvm-remarkutil/count/filter-by-remark-name.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
RUN: llvm-remarkutil count --parser=yaml --remark-name=Remark %p/Inputs/remark-filter-by.yaml | FileCheck %s
2-
RUN: llvm-remarkutil count --parser=yaml --rremark-name=R.* %p/Inputs/remark-filter-by.yaml | FileCheck %s --check-prefix=CHECKALL
1+
RUN: llvm-remarkutil count --parser=yaml --remark-name=Remark %p/Inputs/remark-filter-by.yaml | FileCheck %s
2+
RUN: llvm-remarkutil count --parser=yaml --rremark-name=R.* %p/Inputs/remark-filter-by.yaml | FileCheck %s --check-prefix=CHECKALL
33

44
; CHECK-LABEL: Source,Count
55
; CHECK: path/to/anno.c,1

0 commit comments

Comments
 (0)