Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
2 changed files
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters