@@ -1244,12 +1244,10 @@ class BoUpSLP {
1244
1244
};
1245
1245
1246
1246
using ValueList = SmallVector<Value *, 8>;
1247
- using InstrList = SmallVector<Instruction *, 16>;
1248
1247
using ValueSet = SmallPtrSet<Value *, 16>;
1249
- using StoreList = SmallVector<StoreInst *, 8>;
1250
1248
using ExtraValueToDebugLocsMap =
1251
1249
MapVector<Value *, SmallVector<Instruction *, 2>>;
1252
- using OrdersType = SmallVector<unsigned, 4 >;
1250
+ using OrdersType = SmallVector<unsigned, 0 >;
1253
1251
1254
1252
BoUpSLP(Function *Func, ScalarEvolution *Se, TargetTransformInfo *Tti,
1255
1253
TargetLibraryInfo *TLi, AAResults *Aa, LoopInfo *Li,
@@ -1471,7 +1469,7 @@ class BoUpSLP {
1471
1469
/// \param TryRecursiveCheck used to check if long masked gather can be
1472
1470
/// represented as a serie of loads/insert subvector, if profitable.
1473
1471
LoadsState canVectorizeLoads(ArrayRef<Value *> VL, const Value *VL0,
1474
- SmallVectorImpl<unsigned> &Order,
1472
+ OrdersType &Order,
1475
1473
SmallVectorImpl<Value *> &PointerOps,
1476
1474
bool TryRecursiveCheck = true) const;
1477
1475
@@ -2840,7 +2838,7 @@ class BoUpSLP {
2840
2838
/// \param ResizeAllowed indicates whether it is allowed to handle subvector
2841
2839
/// extract order.
2842
2840
bool canReuseExtract(ArrayRef<Value *> VL, Value *OpValue,
2843
- SmallVectorImpl<unsigned> &CurrentOrder,
2841
+ OrdersType &CurrentOrder,
2844
2842
bool ResizeAllowed = false) const;
2845
2843
2846
2844
/// Vectorize a single entry in the tree.
@@ -3084,10 +3082,10 @@ class BoUpSLP {
3084
3082
CombinedOpcode CombinedOp = NotCombinedOp;
3085
3083
3086
3084
/// Does this sequence require some shuffling?
3087
- SmallVector<int, 4 > ReuseShuffleIndices;
3085
+ SmallVector<int, 0 > ReuseShuffleIndices;
3088
3086
3089
3087
/// Does this entry require reordering?
3090
- SmallVector<unsigned, 4> ReorderIndices;
3088
+ OrdersType ReorderIndices;
3091
3089
3092
3090
/// Points back to the VectorizableTree.
3093
3091
///
@@ -4300,12 +4298,12 @@ static void reorderReuses(SmallVectorImpl<int> &Reuses, ArrayRef<int> Mask) {
4300
4298
/// the original order of the scalars. Procedure transforms the provided order
4301
4299
/// in accordance with the given \p Mask. If the resulting \p Order is just an
4302
4300
/// identity order, \p Order is cleared.
4303
- static void reorderOrder(SmallVectorImpl<unsigned> &Order, ArrayRef<int> Mask,
4301
+ static void reorderOrder(BoUpSLP::OrdersType &Order, ArrayRef<int> Mask,
4304
4302
bool BottomOrder = false) {
4305
4303
assert(!Mask.empty() && "Expected non-empty mask.");
4306
4304
unsigned Sz = Mask.size();
4307
4305
if (BottomOrder) {
4308
- SmallVector<unsigned> PrevOrder;
4306
+ BoUpSLP::OrdersType PrevOrder;
4309
4307
if (Order.empty()) {
4310
4308
PrevOrder.resize(Sz);
4311
4309
std::iota(PrevOrder.begin(), PrevOrder.end(), 0);
@@ -4695,7 +4693,7 @@ getShuffleCost(const TargetTransformInfo &TTI, TTI::ShuffleKind Kind,
4695
4693
}
4696
4694
4697
4695
BoUpSLP::LoadsState BoUpSLP::canVectorizeLoads(
4698
- ArrayRef<Value *> VL, const Value *VL0, SmallVectorImpl<unsigned> &Order,
4696
+ ArrayRef<Value *> VL, const Value *VL0, OrdersType &Order,
4699
4697
SmallVectorImpl<Value *> &PointerOps, bool TryRecursiveCheck) const {
4700
4698
// Check that a vectorized load would load the same memory as a scalar
4701
4699
// load. For example, we don't want to vectorize loads that are smaller
@@ -4823,7 +4821,7 @@ BoUpSLP::LoadsState BoUpSLP::canVectorizeLoads(
4823
4821
for (unsigned Cnt = 0, End = VL.size(); Cnt + VF <= End;
4824
4822
Cnt += VF, ++VectorizedCnt) {
4825
4823
ArrayRef<Value *> Slice = VL.slice(Cnt, VF);
4826
- SmallVector<unsigned> Order;
4824
+ OrdersType Order;
4827
4825
SmallVector<Value *> PointerOps;
4828
4826
LoadsState LS =
4829
4827
canVectorizeLoads(Slice, Slice.front(), Order, PointerOps,
@@ -5397,7 +5395,7 @@ void BoUpSLP::reorderNodeWithReuses(TreeEntry &TE, ArrayRef<int> Mask) const {
5397
5395
TE.ReorderIndices.clear();
5398
5396
// Try to improve gathered nodes with clustered reuses, if possible.
5399
5397
ArrayRef<int> Slice = ArrayRef(NewMask).slice(0, Sz);
5400
- SmallVector<unsigned> NewOrder(Slice);
5398
+ OrdersType NewOrder(Slice);
5401
5399
inversePermutation(NewOrder, NewMask);
5402
5400
reorderScalars(TE.Scalars, NewMask);
5403
5401
// Fill the reuses mask with the identity submasks.
@@ -7717,7 +7715,7 @@ unsigned BoUpSLP::canMapToVector(Type *T) const {
7717
7715
}
7718
7716
7719
7717
bool BoUpSLP::canReuseExtract(ArrayRef<Value *> VL, Value *OpValue,
7720
- SmallVectorImpl<unsigned> &CurrentOrder,
7718
+ OrdersType &CurrentOrder,
7721
7719
bool ResizeAllowed) const {
7722
7720
const auto *It = find_if(VL, IsaPred<ExtractElementInst, ExtractValueInst>);
7723
7721
assert(It != VL.end() && "Expected at least one extract instruction.");
0 commit comments