diff options
| author | Manman Ren <mren@apple.com> | 2012-07-31 20:45:38 +0000 | 
|---|---|---|
| committer | Manman Ren <mren@apple.com> | 2012-07-31 20:45:38 +0000 | 
| commit | f288d2f12083339d7baa0bba898b1ae2f188c744 (patch) | |
| tree | 968fd9fdf502811392c39201a7081c7602308135 /llvm/lib/CodeGen | |
| parent | 059e647c6d97a7aa63e5ab383570d974b458bc5c (diff) | |
| download | bcm5719-llvm-f288d2f12083339d7baa0bba898b1ae2f188c744.tar.gz bcm5719-llvm-f288d2f12083339d7baa0bba898b1ae2f188c744.zip | |
MachineSink: Sort the successors before trying to find SuccToSinkTo.
Use stable_sort instead of sort. Follow-up to r161062.
rdar://11980766
llvm-svn: 161075
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/MachineSink.cpp | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/llvm/lib/CodeGen/MachineSink.cpp b/llvm/lib/CodeGen/MachineSink.cpp index d02aa6fe601..bc383cba455 100644 --- a/llvm/lib/CodeGen/MachineSink.cpp +++ b/llvm/lib/CodeGen/MachineSink.cpp @@ -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; | 

