[ADT] Specialize std::swap() for SetVector
This is intended to address a compile-time regression from 1eddce41. A SmallPtrSet was replaced with a SetVector there, which had an unexpected large compile-time impact. It turns out that this structure is getting swapped a lot, and previously this used an optimized std::swap() specialization for SmallPtrSet. Now it ends up using the default, triple-move based implementation, which is much more expensive. This patch (partly) addresses the issue by specializing std::swap() for SetVector. Differential Revision: https://reviews.llvm.org/D82230
Loading
Please register or sign in to comment