Change ScheduleDAG's DAG member from a reference to a pointer, to prepare
for the possibility of scheduling without a SelectionDAG being present.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59263 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
index 9cca672..22791d3 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp
@@ -387,7 +387,7 @@
   template<>
   struct DOTGraphTraits<ScheduleDAG*> : public DefaultDOTGraphTraits {
     static std::string getGraphName(const ScheduleDAG *G) {
-      return DOTGraphTraits<SelectionDAG*>::getGraphName(&G->DAG);
+      return DOTGraphTraits<SelectionDAG*>::getGraphName(G->DAG);
     }
 
     static bool renderGraphFromBottomUp() {
@@ -421,7 +421,7 @@
     static void addCustomGraphFeatures(ScheduleDAG *G,
                                        GraphWriter<ScheduleDAG*> &GW) {
       GW.emitSimpleNode(0, "plaintext=circle", "GraphRoot");
-      const SDNode *N = G->DAG.getRoot().getNode();
+      const SDNode *N = G->DAG->getRoot().getNode();
       if (N && N->getNodeId() != -1)
         GW.emitEdge(0, -1, &G->SUnits[N->getNodeId()], -1,
                     "color=blue,style=dashed");
@@ -435,11 +435,11 @@
 
   for (unsigned i = 0; i < SU->FlaggedNodes.size(); ++i) {
     Op += DOTGraphTraits<SelectionDAG*>::getNodeLabel(SU->FlaggedNodes[i],
-                                                      &G->DAG) + "\n";
+                                                      G->DAG) + "\n";
   }
 
   if (SU->Node)
-    Op += DOTGraphTraits<SelectionDAG*>::getNodeLabel(SU->Node, &G->DAG);
+    Op += DOTGraphTraits<SelectionDAG*>::getNodeLabel(SU->Node, G->DAG);
   else
     Op += "<CROSS RC COPY>";