[libcxx-commits] [PATCH] D146421: [libc++] Disable the __insertion_sort_unguarded optimization

Nilay Vaish via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 20 10:14:14 PDT 2023


nilayvaish added a comment.

In D146421#4206608 <https://reviews.llvm.org/D146421#4206608>, @ldionne wrote:

> Okay so unfortunately, that didn't fix the issue like we were expecting. I tried a few things and the only thing that reliably fixed the issue we were seeing was reverting 4eddbf9f10a6d1881c93d84f4363d6d881daf848 <https://reviews.llvm.org/rG4eddbf9f10a6d1881c93d84f4363d6d881daf848> (aka D122780 <https://reviews.llvm.org/D122780>) entirely. I think I will need to get a reproducer before deciding what's the next step (i.e. whether the issue is sufficiently vexing that it's worth reverting or not).

Perhaps the broken code depends on the ordering of equivalent elements in the output.  One idea to try would be to use std::stable_sort, though that may also change the ordering of equivalent elements from what was emitted by previous implementation of std::sort.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146421



More information about the libcxx-commits mailing list