[cfe-commits] r55463 - /cfe/trunk/Driver/AnalysisConsumer.cpp

Ted Kremenek kremenek at apple.com
Wed Aug 27 22:02:09 PDT 2008


Author: kremenek
Date: Thu Aug 28 00:02:09 2008
New Revision: 55463

URL: http://llvm.org/viewvc/llvm-project?rev=55463&view=rev
Log:
Ubigraph visualization: represent cached nodes with a different style.

Modified:
    cfe/trunk/Driver/AnalysisConsumer.cpp

Modified: cfe/trunk/Driver/AnalysisConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/AnalysisConsumer.cpp?rev=55463&r1=55462&r2=55463&view=diff

==============================================================================
--- cfe/trunk/Driver/AnalysisConsumer.cpp (original)
+++ cfe/trunk/Driver/AnalysisConsumer.cpp Thu Aug 28 00:02:09 2008
@@ -479,8 +479,7 @@
   
 public:
   UbigraphViz(llvm::raw_ostream* out, llvm::sys::Path& dir,
-              llvm::sys::Path& filename)
-    : Out(out), Dir(dir), Filename(filename), Cntr(0) {} 
+              llvm::sys::Path& filename);
   
   ~UbigraphViz();
   
@@ -535,14 +534,26 @@
     M[Dst] = DstID = Cntr++;
     *Out << "('vertex', " << DstID << ")\n";
   }
-  else
+  else {
+    // We have hit DstID before.  Change its style to reflect a cache hit.
     DstID = DstI->second;
+    *Out << "('change_vertex_style', " << DstID << ", 1)\n";
+  }
 
   // Add the edge.
   *Out << "('edge', " << SrcID << ", " << DstID 
        << ", ('arrow','true'), ('oriented', 'true'))\n";
 }
 
+UbigraphViz::UbigraphViz(llvm::raw_ostream* out, llvm::sys::Path& dir,
+                         llvm::sys::Path& filename)
+  : Out(out), Dir(dir), Filename(filename), Cntr(0) {
+
+  *Out << "('vertex_style_attribute', 0, ('shape', 'icosahedron'))\n";
+  *Out << "('vertex_style', 1, 0, ('shape', 'sphere'), ('color', '#ffcc66'),"
+          " ('size', '1.5'))\n";
+}
+
 UbigraphViz::~UbigraphViz() {
   Out.reset(0);
   llvm::cerr << "Running 'ubiviz' program... ";





More information about the cfe-commits mailing list