summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-11 22:21:04 +0000
committerChris Lattner <sabre@nondot.org>2005-01-11 22:21:04 +0000
commitc871e1d56fa9e4c73f01419d4f1fef6d47f24d29 (patch)
treeef30faebfaff323468584e10a25bff627d199f80 /lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
parentf1fdacae8c1bd9e5ff4619546b3a28e93fb75ab5 (diff)
downloadllvm-c871e1d56fa9e4c73f01419d4f1fef6d47f24d29.tar.gz
llvm-c871e1d56fa9e4c73f01419d4f1fef6d47f24d29.tar.bz2
llvm-c871e1d56fa9e4c73f01419d4f1fef6d47f24d29.tar.xz
Print the value types in the nodes of the graph
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19485 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
index f342f04abc..49568ee2c3 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
@@ -47,6 +47,25 @@ namespace llvm {
std::string DOTGraphTraits<SelectionDAG*>::getNodeLabel(const SDNode *Node,
const SelectionDAG *G) {
std::string Op = Node->getOperationName();
+
+ for (unsigned i = 0, e = Node->getNumValues(); i != e; ++i) {
+ switch (Node->getValueType(i)) {
+ default: Op += ":unknownvt!"; break;
+ case MVT::Other: Op += ":ch"; break;
+ case MVT::i1: Op += ":i1"; break;
+ case MVT::i8: Op += ":i8"; break;
+ case MVT::i16: Op += ":i16"; break;
+ case MVT::i32: Op += ":i32"; break;
+ case MVT::i64: Op += ":i64"; break;
+ case MVT::i128: Op += ":i128"; break;
+ case MVT::f32: Op += ":f32"; break;
+ case MVT::f64: Op += ":f64"; break;
+ case MVT::f80: Op += ":f80"; break;
+ case MVT::f128: Op += ":f128"; break;
+ case MVT::isVoid: Op += ":void"; break;
+ }
+ }
+
if (const ConstantSDNode *CSDN = dyn_cast<ConstantSDNode>(Node)) {
Op += ": " + utostr(CSDN->getValue());
} else if (const ConstantFPSDNode *CSDN = dyn_cast<ConstantFPSDNode>(Node)) {