Skip to content
Commit b9c2dd11 authored by Nikita Popov's avatar Nikita Popov
Browse files

[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
parent 77c9aafc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment