[all-commits] [llvm/llvm-project] fc7604: Instantiate fewer templates in PassManager::addPass()
aeubanks via All-commits
all-commits at lists.llvm.org
Thu Sep 30 09:48:21 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fc7604a2c0791d81ca097e935d19784b80bd016d
https://github.com/llvm/llvm-project/commit/fc7604a2c0791d81ca097e935d19784b80bd016d
Author: Arthur Eubanks <aeubanks at google.com>
Date: 2021-09-30 (Thu, 30 Sep 2021)
Changed paths:
M llvm/include/llvm/IR/PassManager.h
M llvm/include/llvm/Transforms/Scalar/LoopPassManager.h
Log Message:
-----------
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
More information about the All-commits
mailing list