diff options
author | 2021-04-11 22:02:57 +0300 | |
---|---|---|
committer | 2021-04-11 23:56:22 +0300 | |
commit | 6d44b3c56d4a80b16f144a52bc841111c0b4d2c2 (patch) | |
tree | 4345cf696b02807637686413165650887c5b4e35 | |
parent | [LoopUnroll] Add AArch64 test case with large vector ops. (diff) | |
download | llvm-project-6d44b3c56d4a80b16f144a52bc841111c0b4d2c2.tar.gz llvm-project-6d44b3c56d4a80b16f144a52bc841111c0b4d2c2.tar.bz2 llvm-project-6d44b3c56d4a80b16f144a52bc841111c0b4d2c2.zip |
[NFCI][DomTreeUpdater] applyUpdates(): reserve space for updates first
While, indeed, we may end up pushing less updates that we'd reserve space
for, self-dominating updates aren't often enough for that to matter.
But this should matter for normal updates.
-rw-r--r-- | llvm/lib/Analysis/DomTreeUpdater.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/DomTreeUpdater.cpp b/llvm/lib/Analysis/DomTreeUpdater.cpp index 8ac7d9d4efd0..6e299263e66d 100644 --- a/llvm/lib/Analysis/DomTreeUpdater.cpp +++ b/llvm/lib/Analysis/DomTreeUpdater.cpp @@ -232,6 +232,7 @@ void DomTreeUpdater::applyUpdates(ArrayRef<DominatorTree::UpdateType> Updates) { return; if (Strategy == UpdateStrategy::Lazy) { + PendUpdates.reserve(PendUpdates.size() + Updates.size()); for (const auto &U : Updates) if (!isSelfDominance(U)) PendUpdates.push_back(U); |