mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[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.
This commit is contained in:
parent
15909798a0
commit
645cab47a5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user