/// 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";
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";