[llvm-commits] [llvm] r126562 - in /llvm/trunk: include/llvm/Support/DOTGraphTraits.h include/llvm/Support/GraphWriter.h lib/CodeGen/ScheduleDAGPrinter.cpp lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp

Tobias Grosser grosser at fim.uni-passau.de
Sat Feb 26 20:11:03 PST 2011


Author: grosser
Date: Sat Feb 26 22:11:03 2011
New Revision: 126562

URL: http://llvm.org/viewvc/llvm-project?rev=126562&view=rev
Log:
Pass the graph to the DOTGraphTraits.getEdgeAttributes().

This follows the interface of getNodeAttributes.

Modified:
    llvm/trunk/include/llvm/Support/DOTGraphTraits.h
    llvm/trunk/include/llvm/Support/GraphWriter.h
    llvm/trunk/lib/CodeGen/ScheduleDAGPrinter.cpp
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp

Modified: llvm/trunk/include/llvm/Support/DOTGraphTraits.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/DOTGraphTraits.h?rev=126562&r1=126561&r2=126562&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/DOTGraphTraits.h (original)
+++ llvm/trunk/include/llvm/Support/DOTGraphTraits.h Sat Feb 26 22:11:03 2011
@@ -89,8 +89,9 @@
 
   /// If you want to override the dot attributes printed for a particular edge,
   /// override this method.
-  template<typename EdgeIter>
-  static std::string getEdgeAttributes(const void *Node, EdgeIter EI) {
+  template<typename EdgeIter, typename GraphType>
+  static std::string getEdgeAttributes(const void *Node, EdgeIter EI,
+                                       const GraphType& Graph) {
     return "";
   }
 

Modified: llvm/trunk/include/llvm/Support/GraphWriter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/GraphWriter.h?rev=126562&r1=126561&r2=126562&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/GraphWriter.h (original)
+++ llvm/trunk/include/llvm/Support/GraphWriter.h Sat Feb 26 22:11:03 2011
@@ -240,7 +240,7 @@
 
       emitEdge(static_cast<const void*>(Node), edgeidx,
                static_cast<const void*>(TargetNode), DestPort,
-               DTraits.getEdgeAttributes(Node, EI));
+               DTraits.getEdgeAttributes(Node, EI, G));
     }
   }
 

Modified: llvm/trunk/lib/CodeGen/ScheduleDAGPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ScheduleDAGPrinter.cpp?rev=126562&r1=126561&r2=126562&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ScheduleDAGPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/ScheduleDAGPrinter.cpp Sat Feb 26 22:11:03 2011
@@ -51,7 +51,8 @@
     /// If you want to override the dot attributes printed for a particular
     /// edge, override this method.
     static std::string getEdgeAttributes(const SUnit *Node,
-                                         SUnitIterator EI) {
+                                         SUnitIterator EI,
+                                         const ScheduleDAG *Graph) {
       if (EI.isArtificialDep())
         return "color=cyan,style=dashed";
       if (EI.isCtrlDep())

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp?rev=126562&r1=126561&r2=126562&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp Sat Feb 26 22:11:03 2011
@@ -90,7 +90,8 @@
     /// If you want to override the dot attributes printed for a particular
     /// edge, override this method.
     template<typename EdgeIter>
-    static std::string getEdgeAttributes(const void *Node, EdgeIter EI) {
+    static std::string getEdgeAttributes(const void *Node, EdgeIter EI,
+                                         const SelectionDAG *Graph) {
       SDValue Op = EI.getNode()->getOperand(EI.getOperand());
       EVT VT = Op.getValueType();
       if (VT == MVT::Glue)





More information about the llvm-commits mailing list