Skip to content

Commit 2f01785

Browse files
committed
[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`.
1 parent b34b1e3 commit 2f01785

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ Instruction *InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(
945945
// For each predecessor, what is the source aggregate,
946946
// from which all the elements were originally extracted from?
947947
// Note that we want for the map to have stable iteration order!
948-
SmallMapVector<BasicBlock *, Value *, 4> SourceAggregates;
948+
SmallDenseMap<BasicBlock *, Value *, 4> SourceAggregates;
949949
for (BasicBlock *Pred : Preds) {
950950
std::pair<decltype(SourceAggregates)::iterator, bool> IV =
951951
SourceAggregates.insert({Pred, nullptr});

0 commit comments

Comments
 (0)