[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Jan 11 14:21:18 PST 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAGPrinter.cpp updated: 1.4 -> 1.5
---
Log message:
Print the value types in the nodes of the graph
---
Diffs of the changes: (+19 -0)
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.4 llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.5
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp:1.4 Mon Jan 10 18:34:33 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp Tue Jan 11 16:21:04 2005
@@ -47,6 +47,25 @@
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)) {
More information about the llvm-commits
mailing list