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
This commit is contained in:
Dan Gohman 2009-05-06 22:54:33 +00:00
parent f9d90275f9
commit 39b480cea0
1 changed files with 1 additions and 1 deletions

View File

@ -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