diff options
author | Bob Wilson <bob.wilson@apple.com> | 2010-04-17 00:49:11 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2010-04-17 00:49:11 +0000 |
commit | f4a83a31319b6f4b1849f33668ae09407a469dc5 (patch) | |
tree | 9e3abf15b426570160db1cb7fde6d0ecc71c2b4a /lib/CodeGen/PostRASchedulerList.cpp | |
parent | 451f8eccb47a6ecc5a5fa188b9d0e937e245b5e1 (diff) | |
download | external_llvm-f4a83a31319b6f4b1849f33668ae09407a469dc5.tar.gz external_llvm-f4a83a31319b6f4b1849f33668ae09407a469dc5.tar.bz2 external_llvm-f4a83a31319b6f4b1849f33668ae09407a469dc5.zip |
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PostRASchedulerList.cpp')
-rw-r--r-- | lib/CodeGen/PostRASchedulerList.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/CodeGen/PostRASchedulerList.cpp b/lib/CodeGen/PostRASchedulerList.cpp index 38abcb42b0..79a25efd97 100644 --- a/lib/CodeGen/PostRASchedulerList.cpp +++ b/lib/CodeGen/PostRASchedulerList.cpp @@ -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(); |