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 | 39b480cea0749a5b7ce17db642ef9068d8fd54d8 (patch) | |
tree | b68901f14c33087d189a412d8441e2fcd25450c4 /llvm/lib | |
parent | f9d90275f96c0232e7be7f467bb8fca67f803b8f (diff) | |
download | bcm5719-llvm-39b480cea0749a5b7ce17db642ef9068d8fd54d8.tar.gz bcm5719-llvm-39b480cea0749a5b7ce17db642ef9068d8fd54d8.zip |
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).
llvm-svn: 71124
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 1b3aae87895..50cece03657 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/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 |