summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveDebugVariables.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-08-04 18:45:38 +0000
committerDevang Patel <dpatel@apple.com>2011-08-04 18:45:38 +0000
commitad90d3a343ca73c32693e2b05b74462ccd9659cd (patch)
tree4c7dc0cab548cc44613e14a43f376e367a7d9272 /lib/CodeGen/LiveDebugVariables.cpp
parenta81388fb4ab78cf85019840a27057b185f828ad1 (diff)
downloadllvm-ad90d3a343ca73c32693e2b05b74462ccd9659cd.tar.gz
llvm-ad90d3a343ca73c32693e2b05b74462ccd9659cd.tar.bz2
llvm-ad90d3a343ca73c32693e2b05b74462ccd9659cd.tar.xz
Add counter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136901 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveDebugVariables.cpp')
-rw-r--r--lib/CodeGen/LiveDebugVariables.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveDebugVariables.cpp b/lib/CodeGen/LiveDebugVariables.cpp
index eb9bbacb7b..096c47fac9 100644
--- a/lib/CodeGen/LiveDebugVariables.cpp
+++ b/lib/CodeGen/LiveDebugVariables.cpp
@@ -26,6 +26,7 @@
#include "llvm/Metadata.h"
#include "llvm/Value.h"
#include "llvm/ADT/IntervalMap.h"
+#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineFunction.h"
@@ -44,6 +45,7 @@ static cl::opt<bool>
EnableLDV("live-debug-variables", cl::init(true),
cl::desc("Enable the live debug variables pass"), cl::Hidden);
+STATISTIC(NumInsertedDebugValues, "Number of DBG_VALUEs inserted");
char LiveDebugVariables::ID = 0;
INITIALIZE_PASS_BEGIN(LiveDebugVariables, "livedebugvars",
@@ -924,7 +926,7 @@ void UserValue::emitDebugValues(VirtRegMap *VRM, LiveIntervals &LIS,
DEBUG(dbgs() << " BB#" << MBB->getNumber() << '-' << MBBEnd);
insertDebugValue(MBB, Start, LocNo, LIS, TII);
-
+ ++NumInsertedDebugValues;
// This interval may span multiple basic blocks.
// Insert a DBG_VALUE into each one.
while(Stop > MBBEnd) {
@@ -935,6 +937,7 @@ void UserValue::emitDebugValues(VirtRegMap *VRM, LiveIntervals &LIS,
MBBEnd = LIS.getMBBEndIdx(MBB);
DEBUG(dbgs() << " BB#" << MBB->getNumber() << '-' << MBBEnd);
insertDebugValue(MBB, Start, LocNo, LIS, TII);
+ ++NumInsertedDebugValues;
}
DEBUG(dbgs() << '\n');
if (MBB == MFEnd)