Changes For Bug 352
[oota-llvm.git] / lib / CodeGen / InstrSched / SchedGraph.cpp
index e88c801a425f1795d254a60615feba58db653875..00b48d537d3eee8089fb54d58f2dd5fd1ee442b6 100644 (file)
 
 #include "SchedGraph.h"
 #include "llvm/Function.h"
-#include "llvm/iOther.h"
-#include "llvm/CodeGen/MachineCodeForInstruction.h"
+#include "llvm/Instructions.h"
 #include "llvm/CodeGen/MachineFunction.h"
 #include "llvm/Target/TargetInstrInfo.h"
 #include "llvm/Target/TargetMachine.h"
+#include "../../Target/SparcV9/MachineCodeForInstruction.h"
 #include "../../Target/SparcV9/SparcV9RegInfo.h"
-#include "Support/STLExtras.h"
+#include "../../Target/SparcV9/SparcV9InstrInfo.h"
+#include "llvm/ADT/STLExtras.h"
+#include <iostream>
 
 namespace llvm {
 
@@ -106,7 +108,7 @@ SchedGraph::~SchedGraph() {
 void SchedGraph::dump() const {
   std::cerr << "  Sched Graph for Basic Block: "
             << MBB.getBasicBlock()->getName()
-            << " (" << MBB.getBasicBlock() << ")"
+            << " (" << *MBB.getBasicBlock() << ")"
             << "\n\n    Actual Root nodes: ";
   for (SchedGraphNodeCommon::const_iterator I = graphRoot->beginOutEdges(),
                                             E = graphRoot->endOutEdges();
@@ -560,7 +562,7 @@ void SchedGraph::buildNodesForBB(const TargetMachine& target,
   unsigned i = 0;
   for (MachineBasicBlock::iterator I = MBB.begin(), E = MBB.end(); I != E;
        ++I, ++i)
-    if (!mii.isDummyPhiInstr(I->getOpcode())) {
+    if (I->getOpcode() != V9::PHI) {
       SchedGraphNode* node = new SchedGraphNode(getNumNodes(), &MBB, i, target);
       noteGraphNodeForInstr(I, node);
       
@@ -693,7 +695,7 @@ void SchedGraphEdge::print(std::ostream &os) const {
     os<< "Control Dep"; 
     break;
   case SchedGraphEdge::ValueDep:        
-    os<< "Reg Value " << val; 
+    os<< "Reg Value " << *val; 
     break;
   case SchedGraphEdge::MemoryDep:      
     os<< "Memory Dep";