diff options
author | Devang Patel <dpatel@apple.com> | 2011-08-04 18:45:38 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-08-04 18:45:38 +0000 |
commit | b456866b7bcf2b55e6c3fccb144f674c4439a081 (patch) | |
tree | f8368a0d64f71cab527133d64a0c356ea60adcf6 /llvm/lib/CodeGen/LiveDebugVariables.cpp | |
parent | e4df6a2add7b8b91636f6a987377cc22c373e0c8 (diff) | |
download | bcm5719-llvm-b456866b7bcf2b55e6c3fccb144f674c4439a081.tar.gz bcm5719-llvm-b456866b7bcf2b55e6c3fccb144f674c4439a081.zip |
Add counter.
llvm-svn: 136901
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugVariables.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index eb9bbacb7b3..096c47fac96 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/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) |