[llvm-commits] [llvm] r136901 - /llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
Devang Patel
dpatel at apple.com
Thu Aug 4 11:45:39 PDT 2011
Author: dpatel
Date: Thu Aug 4 13:45:38 2011
New Revision: 136901
URL: http://llvm.org/viewvc/llvm-project?rev=136901&view=rev
Log:
Add counter.
Modified:
llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
Modified: llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp?rev=136901&r1=136900&r2=136901&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp (original)
+++ llvm/trunk/lib/CodeGen/LiveDebugVariables.cpp Thu Aug 4 13:45:38 2011
@@ -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 @@
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 @@
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 @@
MBBEnd = LIS.getMBBEndIdx(MBB);
DEBUG(dbgs() << " BB#" << MBB->getNumber() << '-' << MBBEnd);
insertDebugValue(MBB, Start, LocNo, LIS, TII);
+ ++NumInsertedDebugValues;
}
DEBUG(dbgs() << '\n');
if (MBB == MFEnd)
More information about the llvm-commits
mailing list