mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-16 08:08:01 +00:00
misched: obvious iterator update fixes for bottom-up.
llvm-svn: 153160
This commit is contained in:
parent
df5159527c
commit
e695f9d01e
@ -369,8 +369,12 @@ void ScheduleDAGMI::releasePredecessors(SUnit *SU) {
|
||||
|
||||
void ScheduleDAGMI::moveInstruction(MachineInstr *MI,
|
||||
MachineBasicBlock::iterator InsertPos) {
|
||||
// Fix RegionBegin if the first instruction moves down.
|
||||
if (&*RegionBegin == MI)
|
||||
RegionBegin = llvm::next(RegionBegin);
|
||||
BB->splice(InsertPos, BB, MI);
|
||||
LIS->handleMove(MI);
|
||||
// Fix RegionBegin if another instruction moves above the first instruction.
|
||||
if (RegionBegin == InsertPos)
|
||||
RegionBegin = MI;
|
||||
}
|
||||
@ -440,6 +444,8 @@ void ScheduleDAGMI::schedule() {
|
||||
if (&*llvm::prior(CurrentBottom) == MI)
|
||||
--CurrentBottom;
|
||||
else {
|
||||
if (&*CurrentTop == MI)
|
||||
CurrentTop = llvm::next(CurrentTop);
|
||||
moveInstruction(MI, CurrentBottom);
|
||||
CurrentBottom = MI;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user