Early CFG simplification can fold conditionals down to selects, which is often a...
[oota-llvm.git] / include / llvm / Support / GraphWriter.h
index adfe5ec6f2e6b2740a6369e8650ed580ac0b53a0..2d29e525fb43d19938eb9ff6b39355c04e0c2ee2 100644 (file)
@@ -92,22 +92,18 @@ public:
     DTraits = DOTTraits(SN);
   }
 
-  void writeGraph(bool ShortNames = false,
-                  const std::string &Title = "") {
-    // Start the graph emission process...
-    GraphWriter<GraphType> W(O, G, ShortNames);
-
+  void writeGraph(const std::string &Title = "") {
     // Output the header for the graph...
-    W.writeHeader(Title);
+    writeHeader(Title);
 
     // Emit all of the nodes in the graph...
-    W.writeNodes();
+    writeNodes();
 
     // Output any customizations on the graph
-    DOTGraphTraits<GraphType>::addCustomGraphFeatures(G, W);
+    DOTGraphTraits<GraphType>::addCustomGraphFeatures(G, *this);
 
     // Output the end of the graph
-    W.writeFooter();
+    writeFooter();
   }
 
   void writeHeader(const std::string &Title) {
@@ -305,7 +301,7 @@ raw_ostream &WriteGraph(raw_ostream &O, const GraphType &G,
   GraphWriter<GraphType> W(O, G, ShortNames);
 
   // Emit the graph.
-  W.writeGraph(ShortNames, Title);
+  W.writeGraph(Title);
 
   return O;
 }