[llvm-commits] [llvm] r103805 - /llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
Jim Grosbach
grosbach at apple.com
Fri May 14 14:18:04 PDT 2010
Author: grosbach
Date: Fri May 14 16:18:04 2010
New Revision: 103805
URL: http://llvm.org/viewvc/llvm-project?rev=103805&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
Modified: llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp?rev=103805&r1=103804&r2=103805&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp (original)
+++ llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp Fri May 14 16:18:04 2010
@@ -80,6 +80,12 @@
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 @@
// 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
More information about the llvm-commits
mailing list