[ADT] Automatically forward llvm::sort to array_pod_sort if safe
This is safe if the iterator type is a pointer and the comparator is stateless. The enable_if pattern I'm adding here only uses array_pod_sort for the default comparator (std::less). Using array_pod_sort has a potential performance impact, but I didn't notice anything when testing clang. Sorting doesn't seem to be on the hot path anywhere in LLVM. Shrinks Release+Asserts clang by 73k.
Loading
Please register or sign in to comment