[libc] [llvm] [libc] Improve qsort (PR #120450)
Michael Jones via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 20 13:05:25 PST 2024
================
@@ -15,9 +15,13 @@
#define LIBC_QSORT_QUICK_SORT 1
#define LIBC_QSORT_HEAP_SORT 2
+#ifdef LIBC_OPTIMIZE_FOR_SIZE
+#define LIBC_QSORT_IMPL LIBC_QSORT_HEAP_SORT
+#else
----------------
michaelrj-google wrote:
`config.json` is how we set up the compile flags for individual targets (the one I linked is the primary one but there are others in `/config/<TARGET>/<ARCH>/`. In future we'll likely have something similar to `LIBC_OPTIMIZE_FOR_SIZE` but in the build system so that we can have a cmake flag that sets lots of individual macros, while also allowing for fine tuning if necessary.
In short: I like the idea, but I don't think it fits into this patch. Perhaps in a followup?
https://github.com/llvm/llvm-project/pull/120450
More information about the llvm-commits
mailing list