Port a shift-by-1 optimization from LegalizeDAG: it
[oota-llvm.git] / lib / CodeGen / SelectionDAG / SelectionDAGPrinter.cpp
index 07f3221777d266932f62277b3841566f8c22d457..db119a649549c0e42dd947410101b3ebfa451ad9 100644 (file)
@@ -18,6 +18,7 @@
 #include "llvm/CodeGen/ScheduleDAG.h"
 #include "llvm/CodeGen/MachineConstantPool.h"
 #include "llvm/CodeGen/MachineFunction.h"
+#include "llvm/CodeGen/MachineModuleInfo.h"
 #include "llvm/Target/TargetRegisterInfo.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Support/GraphWriter.h"
@@ -138,6 +139,13 @@ std::string DOTGraphTraits<SelectionDAG*>::getNodeLabel(const SDNode *Node,
     } else {
       Op += " #" + utostr(R->getReg());
     }
+  } else if (const DbgStopPointSDNode *D = dyn_cast<DbgStopPointSDNode>(Node)) {
+    Op += ": " + D->getCompileUnit()->getFileName();
+    Op += ":" + utostr(D->getLine());
+    if (D->getColumn() != 0)
+      Op += ":" + utostr(D->getColumn());
+  } else if (const LabelSDNode *L = dyn_cast<LabelSDNode>(Node)) {
+    Op += ": LabelID=" + utostr(L->getLabelID());
   } else if (const ExternalSymbolSDNode *ES =
              dyn_cast<ExternalSymbolSDNode>(Node)) {
     Op += "'" + std::string(ES->getSymbol()) + "'";
@@ -155,8 +163,6 @@ std::string DOTGraphTraits<SelectionDAG*>::getNodeLabel(const SDNode *Node,
     Op = Op + " AF=" + N->getArgFlags().getArgFlagsString();
   } else if (const VTSDNode *N = dyn_cast<VTSDNode>(Node)) {
     Op = Op + " VT=" + N->getVT().getMVTString();
-  } 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()) {