1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

As a temporary workaround for post-RA not handling DebugValue instructions,

just remove them all.  Radar 7873207 (working around the root problem of
Radar 7759363).

llvm-svn: 101604
This commit is contained in:
Bob Wilson 2010-04-17 00:49:11 +00:00
parent 2f0fbb4587
commit 01b8b8ef7d

View File

@ -265,6 +265,17 @@ bool PostRAScheduler::runOnMachineFunction(MachineFunction &Fn) {
// Initialize register live-range state for scheduling in this block.
Scheduler.StartBlock(MBB);
// FIXME: Temporary workaround for <rdar://problem/7759363>: The post-RA
// scheduler has some sort of problem with DebugValue instructions that
// causes an assertion in LeaksContext.h to fail occasionally. Just
// remove all those instructions for now.
for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end();
I != E; ) {
MachineInstr *MI = &*I++;
if (MI->isDebugValue())
MI->eraseFromParent();
}
// Schedule each sequence of instructions not interrupted by a label
// or anything else that effectively needs to shut down scheduling.
MachineBasicBlock::iterator Current = MBB->end();