diff options
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp index d60dd493576..0c679734ea1 100644 --- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp @@ -675,6 +675,12 @@ void ScheduleDAG::EmitCrossRCCopy(SUnit *SU,  /// EmitSchedule - Emit the machine code in scheduled order.  MachineBasicBlock *ScheduleDAG::EmitSchedule() { +  // For post-regalloc scheduling, we're rescheduling the instructions in the +  // block, so start by removing them from the block. +  if (!DAG) +    while (!BB->empty()) +      BB->remove(BB->begin()); +    DenseMap<SDValue, unsigned> VRBaseMap;    DenseMap<SUnit*, unsigned> CopyVRBaseMap;    for (unsigned i = 0, e = Sequence.size(); i != e; i++) { | 

