Added LLVM project notice to the top of every C++ source file.
[oota-llvm.git] / lib / CodeGen / InstrSched / SchedPriorities.cpp
index b60a33bcfdbbe4d11020e6ceff364bdea27d6d22..a35600c0f0e16383731bb638e26b5a757075747f 100644 (file)
@@ -1,5 +1,12 @@
 //===-- SchedPriorities.h - Encapsulate scheduling heuristics -------------===//
 // 
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// 
+//===----------------------------------------------------------------------===//
+// 
 // Strategy:
 //    Priority ordering rules:
 //    (1) Max delay, which is the order of the heap S.candsAsHeap.
@@ -59,7 +66,7 @@ SchedPriorities::computeDelays(const SchedGraph* graph)
          for (SchedGraphNode::const_iterator E=node->beginOutEdges();
               E != node->endOutEdges(); ++E)
            {
-             cycles_t sinkDelay = getNodeDelay((*E)->getSink());
+             cycles_t sinkDelay = getNodeDelay((SchedGraphNode*)(*E)->getSink());
              nodeDelay = std::max(nodeDelay, sinkDelay + (*E)->getMinDelay());
            }
        }
@@ -71,7 +78,7 @@ SchedPriorities::computeDelays(const SchedGraph* graph)
 void
 SchedPriorities::initializeReadyHeap(const SchedGraph* graph)
 {
-  const SchedGraphNode* graphRoot = graph->getRoot();
+  const SchedGraphNode* graphRoot = (const SchedGraphNode*)graph->getRoot();
   assert(graphRoot->getMachineInstr() == NULL && "Expect dummy root");
   
   // Insert immediate successors of dummy root, which are the actual roots
@@ -137,7 +144,7 @@ SchedPriorities::issuedReadyNodeAt(cycles_t curTime,
   for (SchedGraphNode::const_iterator E=node->beginOutEdges();
        E != node->endOutEdges(); ++E)
     {
-      cycles_t& etime = getEarliestReadyTimeForNodeRef((*E)->getSink());
+      cycles_t& etime = getEarliestReadyTimeForNodeRef((SchedGraphNode*)(*E)->getSink());
       etime = std::max(etime, curTime + (*E)->getMinDelay());
     }    
 }