Skip to content

Commit

Permalink
[NFC] Use initial-stack-allocations for some nested containers
Browse files Browse the repository at this point in the history
I've done a little more testing on these as, being nested, there's more
initialization to do when they're created. The net effect is positive on
the compile-time-tracker.
  • Loading branch information
jmorse committed Sep 30, 2024
1 parent c161cf1 commit b8ec33b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18005,7 +18005,7 @@ class HorizontalReduction {
/// List of possibly reduced values.
SmallVector<SmallVector<Value *>> ReducedVals;
/// Maps reduced value to the corresponding reduction operation.
DenseMap<Value *, SmallVector<Instruction *>> ReducedValsToOps;
SmallDenseMap<Value *, SmallVector<Instruction *>, 16> ReducedValsToOps;
WeakTrackingVH ReductionRoot;
/// The type of reduction operation.
RecurKind RdxKind;
Expand Down Expand Up @@ -18374,7 +18374,9 @@ class HorizontalReduction {
// instruction op id and/or alternate op id, plus do extra analysis for
// loads (grouping them by the distabce between pointers) and cmp
// instructions (grouping them by the predicate).
MapVector<size_t, MapVector<size_t, MapVector<Value *, unsigned>>>
SmallMapVector<
size_t, SmallMapVector<size_t, SmallMapVector<Value *, unsigned, 2>, 2>,
8>
PossibleReducedVals;
initReductionOps(Root);
DenseMap<Value *, SmallVector<LoadInst *>> LoadsMap;
Expand Down

0 comments on commit b8ec33b

Please sign in to comment.