Pass the graph to the DOTGraphTraits.getEdgeAttributes().

This follows the interface of getNodeAttributes.

llvm-svn: 126562
This commit is contained in:
Tobias Grosser 2011-02-27 04:11:03 +00:00
parent ba6ce03e46
commit 3ac8689fa3
4 changed files with 8 additions and 5 deletions

View File

@ -89,8 +89,9 @@ public:
/// 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 "";
}

View File

@ -240,7 +240,7 @@ public:
emitEdge(static_cast<const void*>(Node), edgeidx,
static_cast<const void*>(TargetNode), DestPort,
DTraits.getEdgeAttributes(Node, EI));
DTraits.getEdgeAttributes(Node, EI, G));
}
}

View File

@ -51,7 +51,8 @@ namespace llvm {
/// 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())

View File

@ -90,7 +90,8 @@ namespace llvm {
/// 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)