[PATCH] D36963: Use sorting instead of a lot of stable_partitions for `ICF::segregate` function

Alex Telishev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 25 15:34:38 PDT 2017


alex.telishev added a comment.

Intel Inspector indeed found a race here between `findBoundary` and `stable_sort`. `findBoundary` checks for `if (Chunks[Begin]->Class[Cnt % 2] != Chunks[I]->Class[Cnt % 2])` and `Chunks[I]` or `Chunks[Begin]` can be located in the other thread equality range and is modified by `stable_sort` (and `stable_partition` too, btw).  But I'm not sure if it really can affect results because all alements in the next range should have different `Class` from previous chunk.


https://reviews.llvm.org/D36963





More information about the llvm-commits mailing list