Also update getNodeLabel for LoadSDNode.
authorEvan Cheng <evan.cheng@apple.com>
Tue, 10 Oct 2006 20:11:26 +0000 (20:11 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Tue, 10 Oct 2006 20:11:26 +0000 (20:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30861 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp

index c0d6b54a4b5a2247bf4b59c333688cf7b437d6c4..75c0cb337e771a61ab8c3ea00ad0147e0229a3ea 100644 (file)
@@ -130,6 +130,27 @@ std::string DOTGraphTraits<SelectionDAG*>::getNodeLabel(const SDNode *Node,
     Op = Op + " VT=" + getValueTypeString(N->getVT());
   } else if (const StringSDNode *N = dyn_cast<StringSDNode>(Node)) {
     Op = Op + "\"" + N->getValue() + "\"";
+  } else if (const LoadSDNode *LD = dyn_cast<LoadSDNode>(Node)) {
+    bool doExt = true;
+    switch (LD->getExtensionType()) {
+    default: doExt = false; break;
+    case ISD::EXTLOAD:
+      Op = Op + "<anyext ";
+      break;
+    case ISD::SEXTLOAD:
+      Op = Op + " <sext ";
+      break;
+    case ISD::ZEXTLOAD:
+      Op = Op + " <zext ";
+      break;
+    }
+    if (doExt)
+      Op = Op + MVT::getValueTypeString(LD->getLoadVT()) + ">";
+
+    if (LD->getAddressingMode() == ISD::PRE_INDEXED)
+      Op = Op + "<pre>";
+    else if (LD->getAddressingMode() == ISD::POST_INDEXED)
+      Op = Op + "<post>";
   }
   
   return Op;