projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c66949
)
Use std::stable_sort instead of std::sort when sorting stack slots
author
Ulrich Weigand
<ulrich.weigand@de.ibm.com>
Thu, 15 Nov 2012 19:33:30 +0000
(19:33 +0000)
committer
Ulrich Weigand
<ulrich.weigand@de.ibm.com>
Thu, 15 Nov 2012 19:33:30 +0000
(19:33 +0000)
to guarantee deterministic code generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168074
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/StackColoring.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/StackColoring.cpp
b/lib/CodeGen/StackColoring.cpp
index 1cbee843a125e24b692783532b2476241c0fa1b3..e306a2f2c20e6df3aa4dbcdb5692a41452a94059 100644
(file)
--- a/
lib/CodeGen/StackColoring.cpp
+++ b/
lib/CodeGen/StackColoring.cpp
@@
-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) {