From e5f21cea3e8c3abee7ed46511a50924af228b5ec Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 14 Apr 2008 23:15:07 +0000 Subject: [PATCH] In -view-sunit-dags, display "special" chain dependencies as cyan instead of blue to distinguish them from regular dependencies. llvm-svn: 49696 --- llvm/include/llvm/CodeGen/ScheduleDAG.h | 1 + llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/llvm/include/llvm/CodeGen/ScheduleDAG.h b/llvm/include/llvm/CodeGen/ScheduleDAG.h index 12e6c499b7cf..ebc21a164ba6 100644 --- a/llvm/include/llvm/CodeGen/ScheduleDAG.h +++ b/llvm/include/llvm/CodeGen/ScheduleDAG.h @@ -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 { diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp index 7779acce634f..b07b86eb949f 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp @@ -283,6 +283,8 @@ namespace llvm { /// edge, override this method. template 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 "";