diff options
author | Andrew Trick <atrick@apple.com> | 2012-03-07 00:18:22 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-03-07 00:18:22 +0000 |
commit | 1b2324d0e8b9cb1b20845862769d53f2b11c9add (patch) | |
tree | cf216b03d490d1024cc81237aeea034c1da9acf4 /llvm/lib/CodeGen/ScheduleDAGPrinter.cpp | |
parent | 320c7030dbfed01a58421e61f9f48b59b39ee652 (diff) | |
download | bcm5719-llvm-1b2324d0e8b9cb1b20845862769d53f2b11c9add.tar.gz bcm5719-llvm-1b2324d0e8b9cb1b20845862769d53f2b11c9add.zip |
Cleanup in preparation for misched: Move DAG visualization logic.
Soon, ScheduleDAG will not refer to the BB.
llvm-svn: 152177
Diffstat (limited to 'llvm/lib/CodeGen/ScheduleDAGPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ScheduleDAGPrinter.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/ScheduleDAGPrinter.cpp b/llvm/lib/CodeGen/ScheduleDAGPrinter.cpp index f2c2f773f28..38feee95a58 100644 --- a/llvm/lib/CodeGen/ScheduleDAGPrinter.cpp +++ b/llvm/lib/CodeGen/ScheduleDAGPrinter.cpp @@ -81,18 +81,17 @@ std::string DOTGraphTraits<ScheduleDAG*>::getNodeLabel(const SUnit *SU, /// viewGraph - Pop up a ghostview window with the reachable parts of the DAG /// rendered using 'dot'. /// -void ScheduleDAG::viewGraph() { -// This code is only for debugging! +void ScheduleDAG::viewGraph(const Twine &Name, const Twine &Title) { + // This code is only for debugging! #ifndef NDEBUG - if (BB->getBasicBlock()) - ViewGraph(this, "dag." + MF.getFunction()->getName(), false, - "Scheduling-Units Graph for " + MF.getFunction()->getName() + - ":" + BB->getBasicBlock()->getName()); - else - ViewGraph(this, "dag." + MF.getFunction()->getName(), false, - "Scheduling-Units Graph for " + MF.getFunction()->getName()); + ViewGraph(this, Name, false, Title); #else errs() << "ScheduleDAG::viewGraph is only available in debug builds on " << "systems with Graphviz or gv!\n"; #endif // NDEBUG } + +/// Out-of-line implementation with no arguments is handy for gdb. +void ScheduleDAG::viewGraph() { + viewGraph(getDAGName(), "Scheduling-Units Graph for " + getDAGName()); +} |