]> git.ipfire.org Git - thirdparty/gcc.git/commit
Expose stable sort algorithm to gcc_sort_r and add vec::stablesort
authorRichard Biener <rguenther@suse.de>
Thu, 10 Jun 2021 09:03:55 +0000 (11:03 +0200)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 25 Jan 2022 20:01:07 +0000 (12:01 -0800)
commit94c179971913b4837ec76a9e02a9a8a5cbf8e024
treeabacc53ac2c1d3b087d99b0817e466c6badbb8ac
parent8dd63b832feaa0b1c213fe2debd3412dedc81894
Expose stable sort algorithm to gcc_sort_r and add vec::stablesort

This makes it possible to apply GCCs stable sort algorithm to vec<>
and also use it with the qsort_r compatible interface.

2021-06-10  Richard Biener  <rguenther@suse.de>

* system.h (gcc_stablesort_r): Declare.
* sort.cc (gcc_sort_r): Support stable sort.
(gcc_stablesort_r): Define.
* vec.h (vec<>::stablesort): Add.

(cherry-picked from commit 367f52dcc24045b072aeb26bc301a2980b39241f)
gcc/ChangeLog.omp
gcc/sort.cc
gcc/system.h
gcc/vec.h