diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-06-19 20:25:33 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-07-13 23:14:04 +0200 |
commit | b9c2dd11a5139b754afca050effac80f3b638bc8 (patch) | |
tree | 7ad6287b31f125d387c414fd956bd114eb8a934a /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 77c9aafc5d85a816c20d1f1fb176024bc0b8d0fe (diff) | |
download | llvm-b9c2dd11a5139b754afca050effac80f3b638bc8.zip llvm-b9c2dd11a5139b754afca050effac80f3b638bc8.tar.gz llvm-b9c2dd11a5139b754afca050effac80f3b638bc8.tar.bz2 |
[ADT] Specialize std::swap() for SetVector
This is intended to address a compile-time regression from
1eddce4177cfddc86d4696b758904443b0b4f193. 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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions