mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-25 00:29:20 +00:00
Use std::stable_sort instead of std::sort when sorting stack slots
to guarantee deterministic code generation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168074 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7c6694946d
commit
f38aa4272c
@ -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
Block a user