This is an archive of the discontinued LLVM Phabricator instance.

[llvm-remarkutil] Add an option to print out function sizes
ClosedPublic

Authored by paquette on Sep 27 2022, 2:36 PM.

Details

Summary

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.

Diff Detail

Event Timeline

paquette created this revision.Sep 27 2022, 2:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 27 2022, 2:36 PM
paquette requested review of this revision.Sep 27 2022, 2:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 27 2022, 2:36 PM

I wonder if it's not more appropriate to use instruction-count instead of size?

paquette updated this revision to Diff 463673.Sep 28 2022, 2:09 PM

s/size/instruction-count/

thegameg accepted this revision.Sep 28 2022, 2:11 PM

Thanks!

This revision is now accepted and ready to land.Sep 28 2022, 2:11 PM