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
Please sign in to comment