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
37 /// -stats - Command line option to cause transformations to emit stats about
42 "stats",
51 std::vector<const Statistic*> Stats;
58 Stats.push_back(S);
69 // If stats are enabled, inform StatInfo that this statistic should be
99 StatisticInfo &Stats = *StatInfo;
103 for (size_t i = 0, e = Stats.Stats.size(); i != e; ++i) {
105 (unsigned)utostr(Stats.Stats[i]->getValue()).size());
107 (unsigned)std::strlen(Stats.Stats[i]->getName()));
111 std::stable_sort(Stats.Stats.begin(), Stats.Stats.end(),
126 for (size_t i = 0, e = Stats.Stats.size(); i != e; ++i)
128 MaxValLen, Stats.Stats[i]->getValue(),
129 MaxNameLen, Stats.Stats[i]->getName(),
130 Stats.Stats[i]->getDesc());
139 StatisticInfo &Stats = *StatInfo;
142 if (Stats.Stats.empty()) return;
149 // Check if the -stats option is set instead of checking
150 // !Stats.Stats.empty(). In release builds, Statistics operators
151 // do nothing, so stats are never Registered.