diff options
author | Dan Gohman <gohman@apple.com> | 2008-07-14 18:19:29 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-07-14 18:19:29 +0000 |
commit | adec96f4388afaeb5e5babfcc901fb65202a437a (patch) | |
tree | 666686a2a459dc764ae08d1797931c0b2690974c /llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp | |
parent | 191a6b1f1bf9d8c8e1e26735fc1059f2f002f103 (diff) | |
download | bcm5719-llvm-adec96f4388afaeb5e5babfcc901fb65202a437a.tar.gz bcm5719-llvm-adec96f4388afaeb5e5babfcc901fb65202a437a.zip |
Reapply 53476 and 53480, with a fix so that it properly updates
the BB member to the current basic block after emitting
instructions.
llvm-svn: 53567
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp index 02f20f919e6..982bbab3cb2 100644 --- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp @@ -1082,7 +1082,7 @@ void ScheduleDAG::EmitLiveInCopies(MachineBasicBlock *MBB) { } /// EmitSchedule - Emit the machine code in scheduled order. -void ScheduleDAG::EmitSchedule() { +MachineBasicBlock *ScheduleDAG::EmitSchedule() { bool isEntryBB = &MF->front() == BB; if (isEntryBB && !SchedLiveInCopies) { @@ -1118,6 +1118,8 @@ void ScheduleDAG::EmitSchedule() { if (isEntryBB && SchedLiveInCopies) EmitLiveInCopies(MF->begin()); + + return BB; } /// dump - dump the schedule. @@ -1133,9 +1135,12 @@ void ScheduleDAG::dumpSchedule() const { /// Run - perform scheduling. /// -MachineBasicBlock *ScheduleDAG::Run() { +void ScheduleDAG::Run() { Schedule(); - return BB; + + DOUT << "*** Final schedule ***\n"; + DEBUG(dumpSchedule()); + DOUT << "\n"; } /// SUnit - Scheduling unit. It's an wrapper around either a single SDNode or |