diff options
author | Alexander Monakov <amonakov@ispras.ru> | 2018-09-03 19:51:24 +0300 |
---|---|---|
committer | Alexander Monakov <amonakov@gcc.gnu.org> | 2018-09-03 19:51:24 +0300 |
commit | a6405b11a6456fe63e16945f32e1ddc2035ecdf0 (patch) | |
tree | 5757fd55f33239602823d6e5a3826392f65fb9c5 /gcc/system.h | |
parent | 71acd8b9d9d8c9437bfffa51f1b56f93cfbc20e9 (diff) | |
download | gcc-a6405b11a6456fe63e16945f32e1ddc2035ecdf0.zip gcc-a6405b11a6456fe63e16945f32e1ddc2035ecdf0.tar.gz gcc-a6405b11a6456fe63e16945f32e1ddc2035ecdf0.tar.bz2 |
introduce gcc_stablesort
* sort.cc (struct sort_ctx): New field 'nlim'. Use it...
(mergesort): ... here as maximum count for using netsort.
(gcc_qsort): Set nlim to 3 if stable sort is requested.
(gcc_stablesort): New.
* system.h (gcc_stablesort): Declare.
From-SVN: r264066
Diffstat (limited to 'gcc/system.h')
-rw-r--r-- | gcc/system.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h index 203c6a4..100feb5 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -1202,6 +1202,8 @@ helper_const_non_const_cast (const char *p) corresponding to vec::qsort (cmp): they use C qsort internally anyway. */ void qsort_chk (void *, size_t, size_t, int (*)(const void *, const void *)); void gcc_qsort (void *, size_t, size_t, int (*)(const void *, const void *)); +void gcc_stablesort (void *, size_t, size_t, + int (*)(const void *, const void *)); #define PP_5th(a1, a2, a3, a4, a5, ...) a5 #undef qsort #define qsort(...) PP_5th (__VA_ARGS__, gcc_qsort, 3, 2, qsort, 0) (__VA_ARGS__) |