diff options
author | Dan Gohman <gohman@apple.com> | 2009-05-06 22:54:33 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-05-06 22:54:33 +0000 |
commit | 0a8eb57c3d57a79f382b8db32059ea3689f7a076 (patch) | |
tree | f6d93e5550eedd78a56050a78693a577aed32c4b /lib/Analysis/ScalarEvolution.cpp | |
parent | 3f500d935884332f23e9a1a10689aef12e332f9e (diff) |
Use stable_sort instead of plain sort to avoid the risk of generating
trivially different code on different hosts (due to differing
std::sort implementations).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71124 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 1b3aae8789..50cece0365 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -472,7 +472,7 @@ static void GroupByComplexity(std::vector<SCEVHandle> &Ops) { } // Do the rough sort by complexity. - std::sort(Ops.begin(), Ops.end(), SCEVComplexityCompare()); + std::stable_sort(Ops.begin(), Ops.end(), SCEVComplexityCompare()); // Now that we are sorted by complexity, group elements of the same // complexity. Note that this is, at worst, N^2, but the vector is likely to |