[all-commits] [llvm/llvm-project] a4591a: [llvm-remarkutil] Add an option to print out funct...

Jessica Paquette via All-commits all-commits at lists.llvm.org
Wed Sep 28 15:46:42 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a4591a61df9c7d501012fa191ed8bc406836afee
      https://github.com/llvm/llvm-project/commit/a4591a61df9c7d501012fa191ed8bc406836afee
  Author: Jessica Paquette <jpaquette at apple.com>
  Date:   2022-09-28 (Wed, 28 Sep 2022)

  Changed paths:
    M llvm/docs/CommandGuide/llvm-remarkutil.rst
    A llvm/test/tools/llvm-remarkutil/Inputs/instruction-count.yaml
    A llvm/test/tools/llvm-remarkutil/Inputs/made-up-fake-remarks.yaml
    M llvm/test/tools/llvm-remarkutil/broken-bitstream-remark.test
    M llvm/test/tools/llvm-remarkutil/broken-yaml-remark.test
    M llvm/test/tools/llvm-remarkutil/empty-file.test
    A llvm/test/tools/llvm-remarkutil/instruction-count.test
    A llvm/test/tools/llvm-remarkutil/no-instruction-count.test
    M llvm/tools/llvm-remarkutil/RemarkUtil.cpp

  Log Message:
  -----------
  [llvm-remarkutil] Add an option to print out function sizes

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




More information about the All-commits mailing list