Add an option to run the inst-count pass after performing optimizations.

This will enable via the -print-stats function the ability to quickly
find out the final count of various forms of instructions. My intention
is to use this to count retains and releases.

Swift SVN r18946
This commit is contained in:
Michael Gottesman
2014-06-17 02:30:34 +00:00
parent cb3ea09140
commit a0f7d9c3fd
4 changed files with 15 additions and 0 deletions

View File

@@ -776,6 +776,7 @@ static bool ParseSILArgs(SILOptions &Opts, ArgList &Args,
Opts.PrintAll |= Args.hasArg(OPT_sil_print_all);
Opts.TimeTransforms |= Args.hasArg(OPT_sil_time_transforms);
Opts.DebugSerialization |= Args.hasArg(OPT_sil_debug_serialization);
Opts.PrintInstCounts |= Args.hasArg(OPT_print_inst_counts);
return false;
}