[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Evan Cheng evan.cheng at apple.com
Tue Oct 10 13:05:24 PDT 2006



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.344 -> 1.345
---
Log message:

SDNode::dump should also print out extension type and VT.

---
Diffs of the changes:  (+21 -0)

 SelectionDAG.cpp |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.344 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.345
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.344	Mon Oct  9 15:57:24 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp	Tue Oct 10 15:05:10 2006
@@ -2691,6 +2691,27 @@
       std::cerr << "<null:" << M->getOffset() << ">";
   } else if (const VTSDNode *N = dyn_cast<VTSDNode>(this)) {
     std::cerr << ":" << getValueTypeString(N->getVT());
+  } else if (const LoadSDNode *LD = dyn_cast<LoadSDNode>(this)) {
+    bool doExt = true;
+    switch (LD->getExtensionType()) {
+    default: doExt = false; break;
+    case ISD::EXTLOAD:
+      std::cerr << " <anyext ";
+      break;
+    case ISD::SEXTLOAD:
+      std::cerr << " <sext ";
+      break;
+    case ISD::ZEXTLOAD:
+      std::cerr << " <zext ";
+      break;
+    }
+    if (doExt)
+      std::cerr << MVT::getValueTypeString(LD->getLoadVT()) << ">";
+
+    if (LD->getAddressingMode() == ISD::PRE_INDEXED)
+      std::cerr << " <pre>";
+    else if (LD->getAddressingMode() == ISD::POST_INDEXED)
+      std::cerr << " <post>";
   }
 }
 






More information about the llvm-commits mailing list