mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-02 20:38:34 +00:00
While extracting lexical scopes from machine instruction stream, work on one machine basic block at a time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136106 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
36711e4a3c
commit
a671a3092a
@ -1702,11 +1702,11 @@ bool DwarfDebug::extractScopeInformation() {
|
|||||||
// Scan each instruction and create scopes. First build working set of scopes.
|
// Scan each instruction and create scopes. First build working set of scopes.
|
||||||
SmallVector<DbgRange, 4> MIRanges;
|
SmallVector<DbgRange, 4> MIRanges;
|
||||||
DenseMap<const MachineInstr *, DbgScope *> MI2ScopeMap;
|
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();
|
for (MachineFunction::const_iterator I = Asm->MF->begin(), E = Asm->MF->end();
|
||||||
I != E; ++I) {
|
I != E; ++I) {
|
||||||
|
const MachineInstr *RangeBeginMI = NULL;
|
||||||
|
const MachineInstr *PrevMI = NULL;
|
||||||
|
DebugLoc PrevDL;
|
||||||
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
|
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
|
||||||
II != IE; ++II) {
|
II != IE; ++II) {
|
||||||
const MachineInstr *MInsn = II;
|
const MachineInstr *MInsn = II;
|
||||||
@ -1749,13 +1749,13 @@ bool DwarfDebug::extractScopeInformation() {
|
|||||||
PrevMI = MInsn;
|
PrevMI = MInsn;
|
||||||
PrevDL = MIDL;
|
PrevDL = MIDL;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Create last instruction range.
|
// Create last instruction range.
|
||||||
if (RangeBeginMI && PrevMI && !PrevDL.isUnknown()) {
|
if (RangeBeginMI && PrevMI && !PrevDL.isUnknown()) {
|
||||||
DbgRange R(RangeBeginMI, PrevMI);
|
DbgRange R(RangeBeginMI, PrevMI);
|
||||||
MIRanges.push_back(R);
|
MIRanges.push_back(R);
|
||||||
MI2ScopeMap[RangeBeginMI] = getOrCreateDbgScope(PrevDL);
|
MI2ScopeMap[RangeBeginMI] = getOrCreateDbgScope(PrevDL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CurrentFnDbgScope)
|
if (!CurrentFnDbgScope)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user