OSDN Git Service

[DebugCounters] Keep track of total counts
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Mon, 23 Jul 2018 21:49:36 +0000 (21:49 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Mon, 23 Jul 2018 21:49:36 +0000 (21:49 +0000)
commit4f40986a056b41fbe20c5ad408607de2686de2a5
tree42dbff5ef60412320ba6eaee854116d0fcedfaf8
parent94363b3cf675fe10a405ba198fea9a32af134b49
[DebugCounters] Keep track of total counts

This patch makes debug counters keep track of the total number of times
we've called `shouldExecute` for each counter, so it's easier to build
automated tooling on top of these.

A patch to print these counts is coming soon.

Patch by Zhizhou Yang!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337748 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/DebugCounter.h
lib/Support/DebugCounter.cpp
lib/Transforms/Scalar/NewGVN.cpp
unittests/Support/CMakeLists.txt
unittests/Support/DebugCounterTest.cpp [new file with mode: 0644]