mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
Fix the post-RA instruction scheduler to handle instructions referenced by
more than one dbg_value instruction. rdar://7759363 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104174 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -210,7 +210,7 @@ void ScheduleDAGInstrs::BuildSchedGraph(AliasAnalysis *AA) {
|
||||
assert(TRI->isPhysicalRegister(Reg) && "Virtual register encountered!");
|
||||
|
||||
if (MO.isDef() && DanglingDebugValue[Reg].first!=0) {
|
||||
SU->setDbgInstr(DanglingDebugValue[Reg].first);
|
||||
SU->DbgInstrList.push_back(DanglingDebugValue[Reg].first);
|
||||
DbgValueVec[DanglingDebugValue[Reg].second] = 0;
|
||||
DanglingDebugValue[Reg] = std::make_pair((MachineInstr*)0, 0);
|
||||
}
|
||||
@@ -599,8 +599,8 @@ MachineBasicBlock *ScheduleDAGInstrs::EmitSchedule() {
|
||||
}
|
||||
|
||||
BB->insert(InsertPos, SU->getInstr());
|
||||
if (SU->getDbgInstr())
|
||||
BB->insert(InsertPos, SU->getDbgInstr());
|
||||
for (unsigned i = 0, e = SU->DbgInstrList.size() ; i < e ; ++i)
|
||||
BB->insert(InsertPos, SU->DbgInstrList[i]);
|
||||
}
|
||||
|
||||
// Update the Begin iterator, as the first instruction in the block
|
||||
|
Reference in New Issue
Block a user