aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit69be7878c045ac40c9c847fe8d04f44e51663c04 (patch)
treec31f1859c4d65d980ce12621f697ee7da59a3631 /lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
parent8cb3747a8bb51ba03b38cf87e606e2bb33032d6e (diff)
downloadexternal_llvm-69be7878c045ac40c9c847fe8d04f44e51663c04.zip
external_llvm-69be7878c045ac40c9c847fe8d04f44e51663c04.tar.gz
external_llvm-69be7878c045ac40c9c847fe8d04f44e51663c04.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90254 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
index 74f7e51..83fa5a8 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
+++ b/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.