summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-12-01 19:20:00 +0000
committerDan Gohman <gohman@apple.com>2009-12-01 19:20:00 +0000
commitb2ae02979fb95540bd909d8124fb169897a1e962 (patch)
tree7d8e973cf95ba0e7157e4a35e0ddbc5b472137c1 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
parent8def6e3daf3e50a44d5ece273ec84bbf99c5b9df (diff)
downloadbcm5719-llvm-b2ae02979fb95540bd909d8124fb169897a1e962.tar.gz
bcm5719-llvm-b2ae02979fb95540bd909d8124fb169897a1e962.zip
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
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp5
1 files changed, 5 insertions, 0 deletions
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<typename EdgeIter>
+ 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.
OpenPOWER on IntegriCloud