[PATCH] D39245: [ADT] Shuffle containers before sorting to uncover non-deterministic behavior

Grang, Mandeep Singh via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 13:27:47 PDT 2017


Vedant,

I am not sure if stable_sort is the correct solution in r316490. Try 
calling std::random_shuffle before you do std::stable_sort for 
InstantiationSubViews in SourceCoverageView.cpp and you will still see 
the two llvm-cov tests failing.

I guess the problem is that InstantiationSubViews is filled from an 
unordered container and the input order itself is undefined. So 
stable_sort won't help in this case.

--Mandeep


On 10/24/2017 1:04 PM, Vedant Kumar via Phabricator wrote:
> vsk added a comment.
>
> @mgrang thanks, should be fixed in r316490.
>
>
> Repository:
>    rL LLVM
>
> https://reviews.llvm.org/D39245
>
>
>



More information about the llvm-commits mailing list