[NFC][InstCombine] Aggregate reconstruction: use plain map

Now that we no longer require for this map to have stable iteration order,
we no longer need to pay for keeping the iteration order stable,
so switch from `SmallMapVector` to `SmallDenseMap`.
This commit is contained in:
Roman Lebedev 2020-08-19 01:08:38 +03:00
parent b34b1e3838
commit 2f01785857
No known key found for this signature in database
GPG Key ID: 083C3EBB4A1689E0
1 changed files with 1 additions and 1 deletions

View File

@ -945,7 +945,7 @@ Instruction *InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(
// For each predecessor, what is the source aggregate,
// from which all the elements were originally extracted from?
// Note that we want for the map to have stable iteration order!
SmallMapVector<BasicBlock *, Value *, 4> SourceAggregates;
SmallDenseMap<BasicBlock *, Value *, 4> SourceAggregates;
for (BasicBlock *Pred : Preds) {
std::pair<decltype(SourceAggregates)::iterator, bool> IV =
SourceAggregates.insert({Pred, nullptr});