mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-18 01:35:44 +00:00
MachineSink: Sort the successors before trying to find SuccToSinkTo.
Use stable_sort instead of sort. Follow-up to r161062. rdar://11980766 llvm-svn: 161075
This commit is contained in:
parent
3dc189f67b
commit
b9e9c55911
@ -538,7 +538,7 @@ MachineBasicBlock *MachineSinking::FindSuccToSinkTo(MachineInstr *MI,
|
||||
// we should sink to.
|
||||
// We give successors with smaller loop depth higher priority.
|
||||
SmallVector<MachineBasicBlock*, 4> Succs(MBB->succ_begin(), MBB->succ_end());
|
||||
std::sort(Succs.begin(), Succs.end(), SuccessorSorter(LI));
|
||||
std::stable_sort(Succs.begin(), Succs.end(), SuccessorSorter(LI));
|
||||
for (SmallVector<MachineBasicBlock*, 4>::iterator SI = Succs.begin(),
|
||||
E = Succs.end(); SI != E; ++SI) {
|
||||
MachineBasicBlock *SuccBlock = *SI;
|
||||
|
Loading…
x
Reference in New Issue
Block a user