mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-05 12:31:33 +00:00
Add counter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136901 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a81388fb4a
commit
ad90d3a343
@ -26,6 +26,7 @@
|
|||||||
#include "llvm/Metadata.h"
|
#include "llvm/Metadata.h"
|
||||||
#include "llvm/Value.h"
|
#include "llvm/Value.h"
|
||||||
#include "llvm/ADT/IntervalMap.h"
|
#include "llvm/ADT/IntervalMap.h"
|
||||||
|
#include "llvm/ADT/Statistic.h"
|
||||||
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
|
#include "llvm/CodeGen/LiveIntervalAnalysis.h"
|
||||||
#include "llvm/CodeGen/MachineDominators.h"
|
#include "llvm/CodeGen/MachineDominators.h"
|
||||||
#include "llvm/CodeGen/MachineFunction.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
@ -44,6 +45,7 @@ static cl::opt<bool>
|
|||||||
EnableLDV("live-debug-variables", cl::init(true),
|
EnableLDV("live-debug-variables", cl::init(true),
|
||||||
cl::desc("Enable the live debug variables pass"), cl::Hidden);
|
cl::desc("Enable the live debug variables pass"), cl::Hidden);
|
||||||
|
|
||||||
|
STATISTIC(NumInsertedDebugValues, "Number of DBG_VALUEs inserted");
|
||||||
char LiveDebugVariables::ID = 0;
|
char LiveDebugVariables::ID = 0;
|
||||||
|
|
||||||
INITIALIZE_PASS_BEGIN(LiveDebugVariables, "livedebugvars",
|
INITIALIZE_PASS_BEGIN(LiveDebugVariables, "livedebugvars",
|
||||||
@ -924,7 +926,7 @@ void UserValue::emitDebugValues(VirtRegMap *VRM, LiveIntervals &LIS,
|
|||||||
|
|
||||||
DEBUG(dbgs() << " BB#" << MBB->getNumber() << '-' << MBBEnd);
|
DEBUG(dbgs() << " BB#" << MBB->getNumber() << '-' << MBBEnd);
|
||||||
insertDebugValue(MBB, Start, LocNo, LIS, TII);
|
insertDebugValue(MBB, Start, LocNo, LIS, TII);
|
||||||
|
++NumInsertedDebugValues;
|
||||||
// This interval may span multiple basic blocks.
|
// This interval may span multiple basic blocks.
|
||||||
// Insert a DBG_VALUE into each one.
|
// Insert a DBG_VALUE into each one.
|
||||||
while(Stop > MBBEnd) {
|
while(Stop > MBBEnd) {
|
||||||
@ -935,6 +937,7 @@ void UserValue::emitDebugValues(VirtRegMap *VRM, LiveIntervals &LIS,
|
|||||||
MBBEnd = LIS.getMBBEndIdx(MBB);
|
MBBEnd = LIS.getMBBEndIdx(MBB);
|
||||||
DEBUG(dbgs() << " BB#" << MBB->getNumber() << '-' << MBBEnd);
|
DEBUG(dbgs() << " BB#" << MBB->getNumber() << '-' << MBBEnd);
|
||||||
insertDebugValue(MBB, Start, LocNo, LIS, TII);
|
insertDebugValue(MBB, Start, LocNo, LIS, TII);
|
||||||
|
++NumInsertedDebugValues;
|
||||||
}
|
}
|
||||||
DEBUG(dbgs() << '\n');
|
DEBUG(dbgs() << '\n');
|
||||||
if (MBB == MFEnd)
|
if (MBB == MFEnd)
|
||||||
|
Loading…
Reference in New Issue
Block a user