Subzero: Add rudimentary statistics on generated code.
The following are collected:
- Number of machine instructions emitted
- Number of registers saved/restored in prolog/epilog
- Number of stack frame bytes (non-alloca) allocated
- Number of "spills", or stores to stack slots
- Number of "fills", or loads/operations from stack slots
- Fill+Spill count (sum of above two)
These are somewhat reasonable approximations of code quality, and the primary intention is to compare before-and-after when trying out an optimization.
The statistics are dumped after translating each function. Per-function and cumulative statistics are collected. The output lines have a prefix that is easy to filter.
BUG= none
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/580633002
9 files changed