[llvm-commits] [llvm] r59281 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp
Dan Gohman
gohman at apple.com
Thu Nov 13 16:33:17 PST 2008
Author: djg
Date: Thu Nov 13 18:33:17 2008
New Revision: 59281
URL: http://llvm.org/viewvc/llvm-project?rev=59281&view=rev
Log:
For post-regalloc scheduling, remove the instructions from the block
before re-inserting them.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp?rev=59281&r1=59280&r2=59281&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGEmit.cpp Thu Nov 13 18:33:17 2008
@@ -675,6 +675,12 @@
/// 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++) {
More information about the llvm-commits
mailing list