llvm-project/llvm/test/tools/llvm-remarkutil/instruction-count.test
Zain Jaffal 31c2cf1136
[Remarks] Introduce count subcommand for llvm-remarkutil. (#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.
2023-10-12 16:03:39 +01:00

15 lines
856 B
Plaintext

RUN: llvm-remarkutil instruction-count --parser=yaml %p/Inputs/instruction-count.yaml | FileCheck %s
RUN: llvm-remarkutil yaml2bitstream %p/Inputs/instruction-count.yaml | llvm-remarkutil instruction-count --parser=bitstream | FileCheck %s
RUN: llvm-remarkutil count --parser=yaml --count-by=arg --group-by=function --remark-name="InstructionCount" %p/Inputs/instruction-count.yaml | FileCheck %s --check-prefix=COUNT-CHECK
RUN: llvm-remarkutil yaml2bitstream %p/Inputs/instruction-count.yaml | llvm-remarkutil count --parser=bitstream --count-by=arg --group-by=function --remark-name="InstructionCount" | FileCheck %s --check-prefix=COUNT-CHECK
; CHECK-LABEL: Function,InstructionCount
; CHECK: func1,1
; CHECK: func2,2
; CHECK: func3,3
; COUNT-CHECK-LABEL: Function,NumInstructions
; COUNT-CHECK: func1,1
; COUNT-CHECK: func2,2
; COUNT-CHECK: func3,3