In -view-sunit-dags, display "special" chain dependencies as cyan
authorDan Gohman <gohman@apple.com>
Mon, 14 Apr 2008 23:15:07 +0000 (23:15 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 14 Apr 2008 23:15:07 +0000 (23:15 +0000)
instead of blue to distinguish them from regular dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49696 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/ScheduleDAG.h
lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp

index 12e6c499b7cf0e92553c03a3c4bb7ae986dafb31..ebc21a164ba634bc3493abaa330de2639440edd5 100644 (file)
@@ -456,6 +456,7 @@ namespace llvm {
     unsigned getOperand() const { return Operand; }
     const SUnit *getNode() const { return Node; }
     bool isCtrlDep() const { return Node->Preds[Operand].isCtrl; }
+    bool isSpecialDep() const { return Node->Preds[Operand].isSpecial; }
   };
 
   template <> struct GraphTraits<SUnit*> {
index 7779acce634fb769374dbc3c1b8ffa4f42a265d9..b07b86eb949f0957a59945c92f7b9f99ad7347af 100644 (file)
@@ -283,6 +283,8 @@ namespace llvm {
     /// edge, override this method.
     template<typename EdgeIter>
     static std::string getEdgeAttributes(const void *Node, EdgeIter EI) {
+      if (EI.isSpecialDep())
+        return "color=cyan,style=dashed";
       if (EI.isCtrlDep())
         return "color=blue,style=dashed";
       return "";