In FastISel mode, the scheduler may be invoked multiple times

in the same block. Fix the entry-block handling to only run at
at the beginning of the entry block, and not any other times.

llvm-svn: 55817
This commit is contained in:
Dan Gohman 2008-09-05 01:07:48 +00:00
parent 783f38e056
commit fcd2cbd985

View File

@ -731,7 +731,9 @@ void ScheduleDAG::EmitLiveInCopies(MachineBasicBlock *MBB) {
/// EmitSchedule - Emit the machine code in scheduled order.
MachineBasicBlock *ScheduleDAG::EmitSchedule() {
bool isEntryBB = &MF->front() == BB;
// If we're emitting the first code into the entry block, we
// have additional work to do.
bool isEntryBB = &MF->front() == BB && BB->empty();
if (isEntryBB && !SchedLiveInCopies) {
// If this is the first basic block in the function, and if it has live ins