[PATCH] D134765: [llvm-remarkutil] Add an option to print out function sizes

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 14:36:23 PDT 2022


paquette created this revision.
paquette added reviewers: thegameg, jroelofs, fhahn.
Herald added a project: All.
paquette requested review of this revision.
Herald added a project: LLVM.

This adds a `size` command to llvm-remarkutil.

  llvm-remarkutil size --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.


https://reviews.llvm.org/D134765

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134765.463341.patch
Type: text/x-patch
Size: 12710 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220927/a4634bbd/attachment.bin>


More information about the llvm-commits mailing list