Lines Matching refs:Stats
1 //===-- Statistic.cpp - Easy way to expose stats information --------------===//
12 // printed at the end of a run, when the -stats command line option is enabled
39 /// -stats - Command line option to cause transformations to emit stats about
44 "stats",
53 std::vector<const Statistic*> Stats;
60 Stats.push_back(S);
71 // If stats are enabled, inform StatInfo that this statistic should be
115 StatisticInfo &Stats = *StatInfo;
119 for (size_t i = 0, e = Stats.Stats.size(); i != e; ++i) {
121 (unsigned)utostr(Stats.Stats[i]->getValue()).size());
123 (unsigned)std::strlen(Stats.Stats[i]->getName()));
127 std::stable_sort(Stats.Stats.begin(), Stats.Stats.end(), NameCompare());
135 for (size_t i = 0, e = Stats.Stats.size(); i != e; ++i)
137 MaxValLen, Stats.Stats[i]->getValue(),
138 MaxNameLen, Stats.Stats[i]->getName(),
139 Stats.Stats[i]->getDesc());
148 StatisticInfo &Stats = *StatInfo;
151 if (Stats.Stats.empty()) return;
158 // Check if the -stats option is set instead of checking
159 // !Stats.Stats.empty(). In release builds, Statistics operators
160 // do nothing, so stats are never Registered.