Skip to content

Commit a5f1956

Browse files
committed
Added -view-misched=dags options.
llvm-svn: 152178
1 parent 1b2324d commit a5f1956

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

llvm/lib/CodeGen/MachineScheduler.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@
3030

3131
using namespace llvm;
3232

33+
#ifndef NDEBUG
34+
static cl::opt<bool> ViewMISchedDAGs("view-misched-dags", cl::Hidden,
35+
cl::desc("Pop up a window to show MISched dags after they are processed"));
36+
#else
37+
static bool ViewMISchedDAGs = false;
38+
#endif // NDEBUG
39+
3340
//===----------------------------------------------------------------------===//
3441
// Machine Instruction Scheduling Pass and Registry
3542
//===----------------------------------------------------------------------===//
@@ -205,6 +212,8 @@ void ScheduleTopDownLive::Schedule() {
205212
DEBUG(for (unsigned su = 0, e = SUnits.size(); su != e; ++su)
206213
SUnits[su].dumpAll(this));
207214

215+
if (ViewMISchedDAGs) viewGraph();
216+
208217
// Release any successors of the special Entry node. It is currently unused,
209218
// but we keep up appearances.
210219
releaseSuccessors(&EntrySU);

0 commit comments

Comments
 (0)