include alignment and volatility information in -view-*-dags output
authorChris Lattner <sabre@nondot.org>
Fri, 25 Jan 2008 06:40:45 +0000 (06:40 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 25 Jan 2008 06:40:45 +0000 (06:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46347 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp

index 588fc6aaf41d49b7cd0caf6cf52b6d163eb0c351..5cf3b049fa7bff62acfa873b5dc01aba105f13b4 100644 (file)
@@ -164,13 +164,20 @@ std::string DOTGraphTraits<SelectionDAG*>::getNodeLabel(const SDNode *Node,
       break;
     }
     if (doExt)
-      Op = Op + MVT::getValueTypeString(LD->getLoadedVT()) + ">";
-
+      Op += MVT::getValueTypeString(LD->getLoadedVT()) + ">";
+    if (LD->isVolatile())
+      Op += "<V>";
     Op += LD->getIndexedModeName(LD->getAddressingMode());
+    if (LD->getAlignment() > 1)
+      Op += " A=" + utostr(LD->getAlignment());
   } else if (const StoreSDNode *ST = dyn_cast<StoreSDNode>(Node)) {
     if (ST->isTruncatingStore())
-      Op = Op + "<trunc " + MVT::getValueTypeString(ST->getStoredVT()) + ">";
+      Op += "<trunc " + MVT::getValueTypeString(ST->getStoredVT()) + ">";
+    if (ST->isVolatile())
+      Op += "<V>";
     Op += ST->getIndexedModeName(ST->getAddressingMode());
+    if (ST->getAlignment() > 1)
+      Op += " A=" + utostr(ST->getAlignment());
   }
 
 #if 0