[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h

Jim Laskey jlaskey at apple.com
Mon Oct 2 05:27:09 PDT 2006



Changes in directory llvm/include/llvm/CodeGen:

SelectionDAG.h updated: 1.130 -> 1.131
---
Log message:

Add ability to annotate (color) nodes in a viewGraph.

---
Diffs of the changes:  (+20 -1)

 SelectionDAG.h |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/CodeGen/SelectionDAG.h
diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.130 llvm/include/llvm/CodeGen/SelectionDAG.h:1.131
--- llvm/include/llvm/CodeGen/SelectionDAG.h:1.130	Tue Sep 12 15:59:22 2006
+++ llvm/include/llvm/CodeGen/SelectionDAG.h	Mon Oct  2 07:26:53 2006
@@ -69,10 +69,29 @@
   TargetLowering &getTargetLoweringInfo() const { return TLI; }
   MachineDebugInfo *getMachineDebugInfo() const { return DI; }
 
-  /// viewGraph - Pop up a ghostview window with the DAG rendered using 'dot'.
+  /// viewGraph - Pop up a GraphViz/gv window with the DAG rendered using 'dot'.
   ///
   void viewGraph();
+  
+#ifndef NDEBUG
+  std::map<const SDNode *, std::string> NodeGraphAttrs;
+#endif
 
+  /// clearGraphAttrs - Clear all previously defined node graph attributes.
+  /// Intended to be used from a debugging tool (eg. gdb).
+  void clearGraphAttrs();
+  
+  /// setGraphAttrs - Set graph attributes for a node. (eg. "color=red".)
+  ///
+  void setGraphAttrs(const SDNode *N, const char *Attrs);
+  
+  /// getGraphAttrs - Get graph attributes for a node. (eg. "color=red".)
+  /// Used from getNodeAttributes.
+  const std::string getGraphAttrs(const SDNode *N) const;
+  
+  /// setGraphColor - Convenience for setting node color attribute.
+  ///
+  void setGraphColor(const SDNode *N, const char *Color);
 
   typedef ilist<SDNode>::const_iterator allnodes_const_iterator;
   allnodes_const_iterator allnodes_begin() const { return AllNodes.begin(); }






More information about the llvm-commits mailing list