[PATCH] D39214: [MachineModuleInfoImpls] Replace qsort with std::stable_sort
Mandeep Singh Grang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 09:11:56 PDT 2017
mgrang added a comment.
In https://reviews.llvm.org/D39214#904490, @efriedma wrote:
> Using stable_sort doesn't solve anything here: the input is constructed by iterating over a DenseMap whose key is a pointer.
>
> (If you just want to clean this up without actually changing the algorithm, there's a three-operand overload of array_pod_sort.)
I agree. But using array_pod_sort also does not solve anything since the input order itself is random. Maybe we can specify a stronger sort predicate?
Repository:
rL LLVM
https://reviews.llvm.org/D39214
More information about the llvm-commits
mailing list