mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-01 09:18:30 +00:00
make sure ScheduleDAGInstrs::EmitSchedule does not crash when the first instruction in Sequence is a Noop
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145677 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
64c34e2535
commit
db809e0eb7
@ -677,12 +677,12 @@ MachineBasicBlock *ScheduleDAGInstrs::EmitSchedule() {
|
||||
else
|
||||
// Null SUnit* is a noop.
|
||||
EmitNoop();
|
||||
}
|
||||
|
||||
// Update the Begin iterator, as the first instruction in the block
|
||||
// may have been scheduled later.
|
||||
if (!Sequence.empty())
|
||||
Begin = Sequence[0]->getInstr();
|
||||
// Update the Begin iterator, as the first instruction in the block
|
||||
// may have been scheduled later.
|
||||
if (i == 0)
|
||||
Begin = prior(InsertPos);
|
||||
}
|
||||
|
||||
// Reinsert any remaining debug_values.
|
||||
for (std::vector<std::pair<MachineInstr *, MachineInstr *> >::iterator
|
||||
|
Loading…
Reference in New Issue
Block a user