Correctly clone FlaggedNodes.
authorDan Gohman <gohman@apple.com>
Mon, 10 Mar 2008 23:48:14 +0000 (23:48 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 10 Mar 2008 23:48:14 +0000 (23:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48196 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/ScheduleDAG.cpp

index 31a784eca8883b359bd7eef045e6d9f15a6a5eaf..5b3b28162b5173de627c6159dafc44b74394953b 100644 (file)
@@ -69,8 +69,7 @@ static void CheckForPhysRegDependency(SDNode *Def, SDNode *Use, unsigned Op,
 
 SUnit *ScheduleDAG::Clone(SUnit *Old) {
   SUnit *SU = NewSUnit(Old->Node);
-  for (unsigned i = 0, e = SU->FlaggedNodes.size(); i != e; ++i)
-    SU->FlaggedNodes.push_back(SU->FlaggedNodes[i]);
+  SU->FlaggedNodes = Old->FlaggedNodes;
   SU->InstanceNo = SUnitMap[Old->Node].size();
   SU->Latency = Old->Latency;
   SU->isTwoAddress = Old->isTwoAddress;