summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveDebugVariables.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-07-21 20:45:59 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-07-21 20:45:59 +0000
commit26f2268cc52069c170ff6b2583e6f2f376fa5d74 (patch)
treed1db5f8d369f9ae3f4a12036b39bd4f8591eb32f /llvm/lib/CodeGen/LiveDebugVariables.cpp
parent9c4c3c58cbf8e739a6917d522b8980d9e6fb36b7 (diff)
downloadbcm5719-llvm-26f2268cc52069c170ff6b2583e6f2f376fa5d74.tar.gz
bcm5719-llvm-26f2268cc52069c170ff6b2583e6f2f376fa5d74.zip
Revert "Recommit r212203: Don't try to construct debug LexicalScopes hierarchy for functions that do not have top level debug information."
This reverts commit r212649 while I investigate/reduce/etc PR20367. llvm-svn: 213581
Diffstat (limited to 'llvm/lib/CodeGen/LiveDebugVariables.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveDebugVariables.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp
index 7d5646bebfa..388f58fde2a 100644
--- a/llvm/lib/CodeGen/LiveDebugVariables.cpp
+++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp
@@ -329,13 +329,12 @@ class LDVImpl {
void computeIntervals();
public:
- LDVImpl(LiveDebugVariables *ps)
- : pass(*ps), MF(nullptr), EmitDone(false), ModifiedMF(false) {}
+ LDVImpl(LiveDebugVariables *ps) : pass(*ps), EmitDone(false),
+ ModifiedMF(false) {}
bool runOnMachineFunction(MachineFunction &mf);
/// clear - Release all memory.
void clear() {
- MF = nullptr;
userValues.clear();
virtRegToEqClass.clear();
userVarMap.clear();
@@ -694,11 +693,11 @@ void LDVImpl::computeIntervals() {
}
bool LDVImpl::runOnMachineFunction(MachineFunction &mf) {
- clear();
MF = &mf;
LIS = &pass.getAnalysis<LiveIntervals>();
MDT = &pass.getAnalysis<MachineDominatorTree>();
TRI = mf.getTarget().getRegisterInfo();
+ clear();
LS.initialize(mf);
DEBUG(dbgs() << "********** COMPUTING LIVE DEBUG VARIABLES: "
<< mf.getName() << " **********\n");
@@ -713,8 +712,6 @@ bool LDVImpl::runOnMachineFunction(MachineFunction &mf) {
bool LiveDebugVariables::runOnMachineFunction(MachineFunction &mf) {
if (!EnableLDV)
return false;
- if (!FunctionDIs.count(mf.getFunction()))
- return false;
if (!pImpl)
pImpl = new LDVImpl(this);
return static_cast<LDVImpl*>(pImpl)->runOnMachineFunction(mf);
@@ -977,8 +974,6 @@ void UserValue::emitDebugValues(VirtRegMap *VRM, LiveIntervals &LIS,
void LDVImpl::emitDebugValues(VirtRegMap *VRM) {
DEBUG(dbgs() << "********** EMITTING LIVE DEBUG VARIABLES **********\n");
- if (!MF)
- return;
const TargetInstrInfo *TII = MF->getTarget().getInstrInfo();
for (unsigned i = 0, e = userValues.size(); i != e; ++i) {
DEBUG(userValues[i]->print(dbgs(), &MF->getTarget()));
@@ -993,10 +988,6 @@ void LiveDebugVariables::emitDebugValues(VirtRegMap *VRM) {
static_cast<LDVImpl*>(pImpl)->emitDebugValues(VRM);
}
-bool LiveDebugVariables::doInitialization(Module &M) {
- FunctionDIs = makeSubprogramMap(M);
- return Pass::doInitialization(M);
-}
#ifndef NDEBUG
void LiveDebugVariables::dump() {
OpenPOWER on IntegriCloud