forked from OSchip/llvm-project
Use std::stable_sort instead of std::sort when sorting stack slots
to guarantee deterministic code generation. llvm-svn: 168074
This commit is contained in:
parent
4921017afd
commit
dcee8ce8ed
|
@ -720,7 +720,9 @@ bool StackColoring::runOnMachineFunction(MachineFunction &Func) {
|
|||
// and continue.
|
||||
|
||||
// Sort the slots according to their size. Place unused slots at the end.
|
||||
std::sort(SortedSlots.begin(), SortedSlots.end(), SlotSizeSorter(MFI));
|
||||
// Use stable sort to guarantee deterministic code generation.
|
||||
std::stable_sort(SortedSlots.begin(), SortedSlots.end(),
|
||||
SlotSizeSorter(MFI));
|
||||
|
||||
bool Chanded = true;
|
||||
while (Chanded) {
|
||||
|
|
Loading…
Reference in New Issue