[llvm-commits] [llvm] r152178 - /llvm/trunk/lib/CodeGen/MachineScheduler.cpp

Andrew Trick atrick at apple.com
Tue Mar 6 16:18:25 PST 2012


Author: atrick
Date: Tue Mar  6 18:18:25 2012
New Revision: 152178

URL: http://llvm.org/viewvc/llvm-project?rev=152178&view=rev
Log:
Added -view-misched=dags options.

Modified:
    llvm/trunk/lib/CodeGen/MachineScheduler.cpp

Modified: llvm/trunk/lib/CodeGen/MachineScheduler.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineScheduler.cpp?rev=152178&r1=152177&r2=152178&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineScheduler.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineScheduler.cpp Tue Mar  6 18:18:25 2012
@@ -30,6 +30,13 @@
 
 using namespace llvm;
 
+#ifndef NDEBUG
+static cl::opt<bool> ViewMISchedDAGs("view-misched-dags", cl::Hidden,
+  cl::desc("Pop up a window to show MISched dags after they are processed"));
+#else
+static bool ViewMISchedDAGs = false;
+#endif // NDEBUG
+
 //===----------------------------------------------------------------------===//
 // Machine Instruction Scheduling Pass and Registry
 //===----------------------------------------------------------------------===//
@@ -205,6 +212,8 @@
   DEBUG(for (unsigned su = 0, e = SUnits.size(); su != e; ++su)
           SUnits[su].dumpAll(this));
 
+  if (ViewMISchedDAGs) viewGraph();
+
   // Release any successors of the special Entry node. It is currently unused,
   // but we keep up appearances.
   releaseSuccessors(&EntrySU);





More information about the llvm-commits mailing list