First version of SchedGraph common class and refactoring of SchedGraph.
llvm-svn: 8148
diff --git a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp
index ae19a06..00a6a55 100644
--- a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp
+++ b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp
@@ -1047,8 +1047,8 @@
for (SchedGraphNode::const_iterator EI = node->beginInEdges();
EI != node->endInEdges(); ++EI)
- if (! (*EI)->getSrc()->isDummyNode()
- && mii.isLoad((*EI)->getSrc()->getOpCode())
+ if (! ((SchedGraphNode*)(*EI)->getSrc())->isDummyNode()
+ && mii.isLoad(((SchedGraphNode*)(*EI)->getSrc())->getOpCode())
&& (*EI)->getDepType() == SchedGraphEdge::CtrlDep)
return false;
@@ -1065,7 +1065,7 @@
bool onlyCDEdgeToBranch = true;
for (SchedGraphNode::const_iterator OEI = node->beginOutEdges();
OEI != node->endOutEdges(); ++OEI)
- if (! (*OEI)->getSink()->isDummyNode()
+ if (! ((SchedGraphNode*)(*OEI)->getSink())->isDummyNode()
&& ((*OEI)->getSink() != brNode
|| (*OEI)->getDepType() != SchedGraphEdge::CtrlDep))
{