[llvm-commits] [PATCH] Fix nondeterministic codegen in stack-coloring pass

Nadav Rotem nrotem at apple.com
Thu Nov 15 11:28:38 PST 2012


LGTM!

   // 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 determinisic code generation.
+  std::stable_sort(SortedSlots.begin(), SortedSlots.end(),
+                   SlotSizeSorter(MFI));

You have a typo in "determinisic".

Thanks,
Nadav



More information about the llvm-commits mailing list