Skip to content
Commit fc7604a2 authored by Arthur Eubanks's avatar Arthur Eubanks
Browse files

Instantiate fewer templates in PassManager::addPass()

We create many instantiations of PassManager::addPass() in
PassBuilder.cpp.  vector::emplace_back() and make_unique() are both
templated and would have many instantiations based on the number of
times we instantiate addPass().  Now we directly construct the
unique_ptr with the type as the actual unique_ptr type in the vector we
are adding it to, so we only have one unique_ptr constructor
instantiation across all addPass() instantiations and only the
non-templated push_back().

This makes PassBuilder.cpp slightly faster to build.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D110775
parent 76534829
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment