[PATCH] D121870: Use a stable-sort when combining bases

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 16 21:13:40 PDT 2022


efriedma accepted this revision.
efriedma added a comment.
This revision is now accepted and ready to land.

LGTM

> I suspect that the test is too stringent in its check--the resultant code looks functionally identical to me under both stable and unstable sorting,

We don't want the code generated by LLVM to depend on the way std::sort is implemented.  Even if there isn't any functional difference, any sort of non-determinism makes it harder to understand bugs or performance issues.  (Output changing based on the host C++ library isn't as bad as cases where it depends on ASLR randomization or something like that, but still.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D121870/new/

https://reviews.llvm.org/D121870



More information about the llvm-commits mailing list