From b2ae02979fb95540bd909d8124fb169897a1e962 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 1 Dec 2009 19:20:00 +0000 Subject: Add edge source labels to SelectionDAG graphs, now that the graph printing framework omits differentiated edge sources in the case where the labels are empty strings. llvm-svn: 90254 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp') diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp index 74f7e51220d..83fa5a8fd1b 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp @@ -50,6 +50,11 @@ namespace llvm { return ((const SDNode *) Node)->getValueType(i).getEVTString(); } + template + static std::string getEdgeSourceLabel(const void *Node, EdgeIter I) { + return itostr(I - SDNodeIterator::begin((SDNode *) Node)); + } + /// edgeTargetsEdgeSource - This method returns true if this outgoing edge /// should actually target another edge source, not a node. If this method /// is implemented, getEdgeTarget should be implemented. -- cgit v1.2.3