diff options
| author | Jim Grosbach <grosbach@apple.com> | 2010-05-14 21:18:04 +0000 |
|---|---|---|
| committer | Jim Grosbach <grosbach@apple.com> | 2010-05-14 21:18:04 +0000 |
| commit | 25749ad5c275987c206d58bb2cd5b080034f8ae5 (patch) | |
| tree | a6c65828a0fb54e7b5ed316d19a5cdf8792ab57f /llvm/lib/CodeGen/PostRASchedulerList.cpp | |
| parent | 7bf4bae5dcb4748525c38d7b959797ced8d7417f (diff) | |
| download | llvm-25749ad5c275987c206d58bb2cd5b080034f8ae5.zip llvm-25749ad5c275987c206d58bb2cd5b080034f8ae5.tar.gz llvm-25749ad5c275987c206d58bb2cd5b080034f8ae5.tar.bz2 | |
add cmd line option to leave dbgvalues in during post-RA sceduling. Useful
while debugging what's mishandled about them in the post-RA pass.
llvm-svn: 103805
Diffstat (limited to 'llvm/lib/CodeGen/PostRASchedulerList.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/PostRASchedulerList.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/PostRASchedulerList.cpp b/llvm/lib/CodeGen/PostRASchedulerList.cpp index d3e1295..4f1e04b 100644 --- a/llvm/lib/CodeGen/PostRASchedulerList.cpp +++ b/llvm/lib/CodeGen/PostRASchedulerList.cpp @@ -80,6 +80,12 @@ DebugMod("postra-sched-debugmod", cl::desc("Debug control MBBs that are scheduled"), cl::init(0), cl::Hidden); +static cl::opt<bool> +EnablePostRADbgValue("post-RA-dbg-value", + cl::desc("Enable processing of dbg_value in post-RA"), + cl::init(false), cl::Hidden); + + AntiDepBreaker::~AntiDepBreaker() { } namespace { @@ -269,11 +275,14 @@ bool PostRAScheduler::runOnMachineFunction(MachineFunction &Fn) { // 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(); + if (!EnablePostRADbgValue) { + DEBUG(dbgs() << "*** Maintaining DbgValues in PostRAScheduler\n"); + 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 |
