forked from OSchip/llvm-project
[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:
parent
b34b1e3838
commit
2f01785857
|
@ -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});
|
||||
|
|
Loading…
Reference in New Issue