aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-07-21 20:00:07 +0000
committerDan Gohman <gohman@apple.com>2008-07-21 20:00:07 +0000
commit462dc7f4960e5074ddf4769ec8b2ef1ba7a4d2c8 (patch)
tree47d4f104a9cb4c01e109dc5f3468a538ea73de12 /lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
parent2d3ff5a7aee24024765629d17ebff351ea11c9bb (diff)
downloadexternal_llvm-462dc7f4960e5074ddf4769ec8b2ef1ba7a4d2c8.zip
external_llvm-462dc7f4960e5074ddf4769ec8b2ef1ba7a4d2c8.tar.gz
external_llvm-462dc7f4960e5074ddf4769ec8b2ef1ba7a4d2c8.tar.bz2
Add titles to the various SelectionDAG viewGraph calls
that include useful information like the name of the block being viewed and the current phase of compilation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53872 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
index 2ca4d8f..ea93d11 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
@@ -215,10 +215,11 @@ std::string DOTGraphTraits<SelectionDAG*>::getNodeLabel(const SDNode *Node,
/// viewGraph - Pop up a ghostview window with the reachable parts of the DAG
/// rendered using 'dot'.
///
-void SelectionDAG::viewGraph() {
+void SelectionDAG::viewGraph(const std::string &Title) {
// This code is only for debugging!
#ifndef NDEBUG
- ViewGraph(this, "dag." + getMachineFunction().getFunction()->getName());
+ ViewGraph(this, "dag." + getMachineFunction().getFunction()->getName(),
+ Title);
#else
cerr << "SelectionDAG::viewGraph is only available in debug builds on "
<< "systems with Graphviz or gv!\n";
@@ -348,7 +349,9 @@ std::string DOTGraphTraits<ScheduleDAG*>::getNodeLabel(const SUnit *SU,
void ScheduleDAG::viewGraph() {
// This code is only for debugging!
#ifndef NDEBUG
- ViewGraph(this, "dag." + DAG.getMachineFunction().getFunction()->getName());
+ ViewGraph(this, "dag." + MF->getFunction()->getName(),
+ "Scheduling-Units Graph for " + MF->getFunction()->getName() + ':' +
+ BB->getBasicBlock()->getName());
#else
cerr << "ScheduleDAG::viewGraph is only available in debug builds on "
<< "systems with Graphviz or gv!\n";