This adds an `instruction-count` command to llvm-remarkutil. ``` llvm-remarkutil instruction-count --parser=<bitstream|yaml> <file> ``` This will, for now, only print out asm-printer `InstructionCount` remarks. Frequently I need to find out things like "what are the top 10 largest functions" in a given project. This makes it so we can find that information quickly and easily from any format of remarks. I chose a CSV because I usually want to stick these into a spreadsheet, and the data is two-dimensional. In the future, we may want to change this to another format if we add more complicated data. Differential Revision: https://reviews.llvm.org/D134765
8 lines
333 B
Plaintext
8 lines
333 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
|
|
|
|
; CHECK-LABEL: Function,InstructionCount
|
|
; CHECK: func1,1
|
|
; CHECK: func2,2
|
|
; CHECK: func3,3
|