[Stats] Add ALWAYS_ENABLED_STATISTIC enabled regardless of LLVM_ENABLE_STATS.
authorVolodymyr Sapsai <vsapsai@apple.com>
Fri, 11 Oct 2019 00:57:41 +0000 (00:57 +0000)
committerVolodymyr Sapsai <vsapsai@apple.com>
Fri, 11 Oct 2019 00:57:41 +0000 (00:57 +0000)
commitadb203feda9036d39ffecc21f5a9c463a20ef115
tree74f6fc9a05e55a1fd253c743813439b323b732a0
parent63835f3ac7672a6f1c32109f303a849b6c044b39
[Stats] Add ALWAYS_ENABLED_STATISTIC enabled regardless of LLVM_ENABLE_STATS.

The intended usage is to measure relatively expensive operations. So the
cost of the statistic is negligible compared to the cost of a measured
operation and can be enabled all the time without impairing the
compilation time.

rdar://problem/55715134

Reviewers: dsanders, bogner, rtereshin

Reviewed By: dsanders

Subscribers: hiraditya, jkorous, dexonsmith, ributzka, cfe-commits, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68252

llvm-svn: 374490
llvm/include/llvm/ADT/Statistic.h
llvm/lib/Support/Statistic.cpp
llvm/unittests/ADT/StatisticTest.cpp