phate / jlm

GNU Lesser General Public License v2.1
54 stars 15 forks source link

Improve statistics command line flag #357

Open phate opened 10 months ago

phate commented 10 months ago

The statistics command line flags for jlc and jlm-opt are very verbose and partly non-descriptive. The following should be done:

  1. Improve the descriptiveness of the statistics command line flags. They should describe/reflect the (optimization) pass they are gathering statistics for.
  2. We should transform the statistics flag into a comma separated list: --statistics=statistics1, statistics2,...
haved commented 10 months ago

The duplication I was referencing is the set of statistics options listed both at https://github.com/phate/jlm/blob/master/jlm%2Ftooling%2FCommandLine.cpp#L512

and

https://github.com/phate/jlm/blob/master/jlm%2Ftooling%2FCommandLine.cpp#L771

Which can be nicely deduplicated by replacing the individual command line flags by a single comma separated string.

Also, the mapping between StatisticsId and statistic name can use a BiMap :)