summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-07-26 18:09:53 +0000
committerDevang Patel <dpatel@apple.com>2011-07-26 18:09:53 +0000
commit613958c82c09f550797631b558e50d191cdbfe7d (patch)
tree6770d9e9498eba02105b00aadff4ca0a7b726908
parent4e895470bdeb99ba7c6cd7145efe38a3cef81352 (diff)
downloadbcm5719-llvm-613958c82c09f550797631b558e50d191cdbfe7d.tar.gz
bcm5719-llvm-613958c82c09f550797631b558e50d191cdbfe7d.zip
While extracting lexical scopes from machine instruction stream, work on one machine basic block at a time.
llvm-svn: 136106
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 696f72b8d5c..adc7a900d17 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1702,11 +1702,11 @@ bool DwarfDebug::extractScopeInformation() {
// Scan each instruction and create scopes. First build working set of scopes.
SmallVector<DbgRange, 4> MIRanges;
DenseMap<const MachineInstr *, DbgScope *> MI2ScopeMap;
- DebugLoc PrevDL;
- const MachineInstr *RangeBeginMI = NULL;
- const MachineInstr *PrevMI = NULL;
for (MachineFunction::const_iterator I = Asm->MF->begin(), E = Asm->MF->end();
I != E; ++I) {
+ const MachineInstr *RangeBeginMI = NULL;
+ const MachineInstr *PrevMI = NULL;
+ DebugLoc PrevDL;
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
II != IE; ++II) {
const MachineInstr *MInsn = II;
@@ -1749,13 +1749,13 @@ bool DwarfDebug::extractScopeInformation() {
PrevMI = MInsn;
PrevDL = MIDL;
}
- }
- // Create last instruction range.
- if (RangeBeginMI && PrevMI && !PrevDL.isUnknown()) {
- DbgRange R(RangeBeginMI, PrevMI);
- MIRanges.push_back(R);
- MI2ScopeMap[RangeBeginMI] = getOrCreateDbgScope(PrevDL);
+ // Create last instruction range.
+ if (RangeBeginMI && PrevMI && !PrevDL.isUnknown()) {
+ DbgRange R(RangeBeginMI, PrevMI);
+ MIRanges.push_back(R);
+ MI2ScopeMap[RangeBeginMI] = getOrCreateDbgScope(PrevDL);
+ }
}
if (!CurrentFnDbgScope)
OpenPOWER on IntegriCloud