Lines Matching refs:ArrayRef

233 static std::string shortBundleName(ArrayRef<Value *> VL) {  in shortBundleName()
244 static bool allSameBlock(ArrayRef<Value *> VL) { in allSameBlock()
265 static bool allConstant(ArrayRef<Value *> VL) { in allConstant()
273 static bool isSplat(ArrayRef<Value *> VL) { in isSplat()
355 static SmallBitVector buildUseMask(int VF, ArrayRef<int> Mask, in buildUseMask()
445 isFixedVectorShuffle(ArrayRef<Value *> VL, SmallVectorImpl<int> &Mask) { in isFixedVectorShuffle()
588 static InstructionsState getSameOpcode(ArrayRef<Value *> VL,
630 static InstructionsState getSameOpcode(ArrayRef<Value *> VL, in getSameOpcode()
769 static bool allSameType(ArrayRef<Value *> VL) { in allSameType()
824 static void addMask(SmallVectorImpl<int> &Mask, ArrayRef<int> SubMask, in addMask()
887 static void inversePermutation(ArrayRef<unsigned> Indices, in inversePermutation()
898 ArrayRef<int> Mask) { in reorderScalars()
955 static bool doesNotNeedToSchedule(ArrayRef<Value *> VL) { in doesNotNeedToSchedule()
1024 InstructionCost getTreeCost(ArrayRef<Value *> VectorizedVals = std::nullopt);
1028 void buildTree(ArrayRef<Value *> Roots,
1032 void buildTree(ArrayRef<Value *> Roots);
1041 ArrayRef<Value *> getRootNodeScalars() const { in getRootNodeScalars()
1268 ArrayRef<Value *> MainAltOps) const { in getShallowScore()
1432 ArrayRef<Value *> MainAltOps) const { in getScoreAtLevelRec()
1659 int getLookAheadScore(Value *LHS, Value *RHS, ArrayRef<Value *> MainAltOps, in getLookAheadScore()
1703 ArrayRef<ReorderingMode> ReorderingModes, in getBestOperand()
1704 ArrayRef<Value *> MainAltOps) { in getBestOperand()
1912 void appendOperandsOfVL(ArrayRef<Value *> VL) { in appendOperandsOfVL()
1987 VLOperands(ArrayRef<Value *> RootVL, const TargetLibraryInfo &TLI, in VLOperands()
2062 ArrayRef<OperandData> Op0 = OpsVec.front(); in reorder()
2065 for (ArrayRef<OperandData> Op : drop_begin(OpsVec, 1)) { in reorder()
2203 findBestRootPair(ArrayRef<std::pair<Value *, Value *>> Candidates, in findBestRootPair()
2244 bool areAnalyzedReductionVals(ArrayRef<Value *> VL) const { in areAnalyzedReductionVals()
2249 void analyzedReductionVals(ArrayRef<Value *> VL) { in analyzedReductionVals()
2290 ArrayRef<TreeEntry *> ReorderableGathers,
2295 void reorderNodeWithReuses(TreeEntry &TE, ArrayRef<int> Mask) const;
2300 ArrayRef<Value *> VL = UserTE->getOperand(OpIdx); in getVectorizedOperand()
2339 TargetTransformInfo::OperandValueInfo getOperandInfo(ArrayRef<Value *> Ops);
2346 ArrayRef<Value *> VectorizedVals,
2350 void buildTree_rec(ArrayRef<Value *> Roots, unsigned Depth,
2360 bool canReuseExtract(ArrayRef<Value *> VL, Value *OpValue,
2420 const TreeEntry *TE, ArrayRef<Value *> VL, MutableArrayRef<int> Mask,
2433 const TreeEntry *TE, ArrayRef<Value *> VL, SmallVectorImpl<int> &Mask,
2441 InstructionCost getGatherCost(ArrayRef<Value *> VL, bool ForPoisonSrc) const;
2449 Value *gather(ArrayRef<Value *> VL, Value *Root);
2458 ArrayRef<Value *> VL, SmallVectorImpl<Value *> &Left,
2472 bool canFormVector(ArrayRef<StoreInst *> StoresVec,
2497 bool isSame(ArrayRef<Value *> VL) const { in isSame()
2498 auto &&IsSame = [VL](ArrayRef<Value *> Scalars, ArrayRef<int> Mask) { in isSame()
2616 void setOperand(unsigned OpIdx, ArrayRef<Value *> OpVL) { in setOperand()
2645 void reorderOperands(ArrayRef<int> Mask) { in reorderOperands()
2657 ArrayRef<Value *> getOperand(unsigned OpIdx) const { in getOperand()
2813 TreeEntry *newTreeEntry(ArrayRef<Value *> VL, in newTreeEntry()
2817 ArrayRef<int> ReuseShuffleIndices = std::nullopt, in newTreeEntry()
2818 ArrayRef<unsigned> ReorderIndices = std::nullopt) { in newTreeEntry()
2825 TreeEntry *newTreeEntry(ArrayRef<Value *> VL, in newTreeEntry()
2830 ArrayRef<int> ReuseShuffleIndices = std::nullopt, in newTreeEntry()
2831 ArrayRef<unsigned> ReorderIndices = std::nullopt) { in newTreeEntry()
2923 InstructionsState &S, ArrayRef<Value *> VL, bool IsScatterVectorizeUserTE,
3442 ScheduleData *buildBundle(ArrayRef<Value *> VL);
3450 tryScheduleBundle(ArrayRef<Value *> VL, BoUpSLP *SLP,
3454 void cancelScheduling(ArrayRef<Value *> VL, Value *OpValue);
3721 static void reorderReuses(SmallVectorImpl<int> &Reuses, ArrayRef<int> Mask) { in reorderReuses()
3735 static void reorderOrder(SmallVectorImpl<unsigned> &Order, ArrayRef<int> Mask) { in reorderOrder()
3795 auto &&IsIdentityOrder = [NumScalars](ArrayRef<unsigned> CurrentOrder) { in findReusedOrderedScalars()
3851 static LoadsState canVectorizeLoads(ArrayRef<Value *> VL, const Value *VL0, in canVectorizeLoads()
3934 static bool clusterSortPtrAccesses(ArrayRef<Value *> VL, Type *ElemTy, in clusterSortPtrAccesses()
4119 SmallVector<int> SubMask{ArrayRef(ReusedMask).slice(K, Sz)}; in getReorderingData()
4266 static bool isRepeatedNonIdentityClusteredMask(ArrayRef<int> Mask, in isRepeatedNonIdentityClusteredMask()
4268 ArrayRef<int> FirstCluster = Mask.slice(0, Sz); in isRepeatedNonIdentityClusteredMask()
4272 ArrayRef<int> Cluster = Mask.slice(I, Sz); in isRepeatedNonIdentityClusteredMask()
4279 void BoUpSLP::reorderNodeWithReuses(TreeEntry &TE, ArrayRef<int> Mask) const { in reorderNodeWithReuses()
4295 ArrayRef<int> Slice = ArrayRef(NewMask).slice(0, Sz); in reorderNodeWithReuses()
4404 ArrayRef<TreeEntry *> OrderedEntries = It->second.getArrayRef(); in reorderTopToBottom()
4497 ArrayRef<unsigned> BestOrder = OrdersUses.front().first; in reorderTopToBottom()
4569 ArrayRef<TreeEntry *> ReorderableGathers, in canReorderOperands()
4775 ArrayRef<std::pair<unsigned, TreeEntry *>> Ops = Users[UserTE]; in reorderBottomToTop()
4813 ArrayRef<unsigned> BestOrder = OrdersUses.front().first; in reorderBottomToTop()
5002 bool BoUpSLP::canFormVector(ArrayRef<StoreInst *> StoresVec, in canFormVector()
5106 void BoUpSLP::buildTree(ArrayRef<Value *> Roots, in buildTree()
5115 void BoUpSLP::buildTree(ArrayRef<Value *> Roots) { in buildTree()
5125 static bool needToScheduleSingleInstruction(ArrayRef<Value *> VL) { in needToScheduleSingleInstruction()
5235 InstructionsState &S, ArrayRef<Value *> VL, bool IsScatterVectorizeUserTE, in getScalarsVectorizationState()
5540 void BoUpSLP::buildTree_rec(ArrayRef<Value *> VL, unsigned Depth, in buildTree_rec()
5667 Depth](ArrayRef<Value *> VL) { in buildTree_rec()
5697 Candidates, [this](ArrayRef<std::pair<Value *, Value *>> Cand) { in buildTree_rec()
5710 Candidates, [this](ArrayRef<std::pair<Value *, Value *>> Cand) { in buildTree_rec()
6350 bool BoUpSLP::canReuseExtract(ArrayRef<Value *> VL, Value *OpValue, in canReuseExtract()
6542 TTI::OperandValueInfo BoUpSLP::getOperandInfo(ArrayRef<Value *> Ops) { in getOperandInfo()
6589 static bool isIdentityMask(ArrayRef<int> Mask, const FixedVectorType *VecTy, in isIdentityMask()
6604 ArrayRef<int> Slice = Mask.slice(Idx * VF, VF); in isIdentityMask()
6618 ArrayRef<int> ExtMask) { in combineMasks()
6780 static T createShuffle(Value *V1, Value *V2, ArrayRef<int> Mask, in createShuffle()
6877 ArrayRef(CombinedMask1)))) in createShuffle()
6902 VectorType *Tp, ArrayRef<int> Mask = std::nullopt, in getShuffleCost()
6905 ArrayRef<const Value *> Args = std::nullopt) { in getShuffleCost()
6958 InstructionCost getBuildVectorCost(ArrayRef<Value *> VL, Value *Root) { in getBuildVectorCost()
6974 ArrayRef<Value *> SubVL = VL.slice(Idx * MinVF, MinVF); in getBuildVectorCost()
6989 ArrayRef<Value *> Slice = VL.slice(Cnt, VF); in getBuildVectorCost()
7110 computeExtractCost(ArrayRef<Value *> VL, ArrayRef<int> Mask, in computeExtractCost()
7111 ArrayRef<std::optional<TTI::ShuffleKind>> ShuffleKinds, in computeExtractCost()
7159 ArrayRef<int> MaskSlice = in computeExtractCost()
7187 ArrayRef<int> Mask) { in transformMaskAfterShuffle()
7196 ArrayRef<int> Mask, unsigned Part, in estimateNodesPermuteCost()
7208 assert(all_of(ArrayRef(CommonMask).slice(Part * SliceSize, SliceSize), in estimateNodesPermuteCost()
7211 ArrayRef<int> SubMask = in estimateNodesPermuteCost()
7212 ArrayRef(Mask).slice(Part * SliceSize, SliceSize); in estimateNodesPermuteCost()
7231 static bool isEmptyOrIdentity(ArrayRef<int> Mask, unsigned VF) { in isEmptyOrIdentity()
7244 ArrayRef<int> Mask) const { in createShuffleVector()
7253 InstructionCost createShuffleVector(Value *V1, ArrayRef<int> Mask) const { in createShuffleVector()
7275 ArrayRef<int> Mask) { in createShuffle()
7422 ArrayRef<Value *> VectorizedVals, BoUpSLP &R, in ShuffleCostEstimator()
7427 ArrayRef<std::optional<TTI::ShuffleKind>> ShuffleKinds, in adjustExtracts()
7433 ArrayRef<Value *> VL = E->Scalars; in adjustExtracts()
7440 ArrayRef(R.VectorizableTree).take_front(E->Idx), in adjustExtracts()
7455 ArrayRef<int> SubMask = Mask.slice(Part * SliceSize, SliceSize); in adjustExtracts()
7524 ArrayRef<SmallVector<const TreeEntry *>>) const { in needToDelay()
7528 void add(const TreeEntry &E1, const TreeEntry &E2, ArrayRef<int> Mask) { in add()
7555 void add(const TreeEntry &E1, ArrayRef<int> Mask) { in add()
7576 void add(Value *V1, Value *V2, ArrayRef<int> Mask) { in add()
7594 void add(Value *V1, ArrayRef<int> Mask, bool ForExtracts = false) { in add()
7642 Value *gather(ArrayRef<Value *> VL, unsigned MaskVF = 0, in gather()
7668 finalize(ArrayRef<int> ExtMask, unsigned VF = 0, in finalize()
7733 BoUpSLP::getEntryCost(const TreeEntry *E, ArrayRef<Value *> VectorizedVals, in getEntryCost()
7735 ArrayRef<Value *> VL = E->Scalars; in getEntryCost()
7887 auto GetGEPCostDiff = [=](ArrayRef<Value *> Ptrs, Value *BasePtr) { in getEntryCost()
8828 function_ref<std::pair<T *, bool>(T *, ArrayRef<int>, bool)> ResizeAction, in performExtractsShuffleAction()
8829 function_ref<T *(ArrayRef<int>, ArrayRef<T *>)> Action) { in performExtractsShuffleAction()
8871 ArrayRef<int> SecMask = VMIt->second; in performExtractsShuffleAction()
8885 ArrayRef<int> SecMask = VMIt->second; in performExtractsShuffleAction()
8907 ArrayRef<int> SecMask = VMIt->second; in performExtractsShuffleAction()
8922 InstructionCost BoUpSLP::getTreeCost(ArrayRef<Value *> VectorizedVals) { in getTreeCost()
9101 auto &&ResizeToVF = [this, &Cost](const TreeEntry *TE, ArrayRef<int> Mask, in getTreeCost()
9129 auto EstimateShufflesCost = [&](ArrayRef<int> Mask, in getTreeCost()
9130 ArrayRef<const TreeEntry *> TEs) { in getTreeCost()
9348 const TreeEntry *TE, ArrayRef<Value *> VL, MutableArrayRef<int> Mask, in isGatherShuffledSingleRegisterEntry()
9663 !VL.equals(ArrayRef(TE->Scalars) in isGatherShuffledSingleRegisterEntry()
9704 const TreeEntry *TE, ArrayRef<Value *> VL, SmallVectorImpl<int> &Mask, in isGatherShuffledEntry()
9721 ArrayRef<Value *> SubVL = VL.slice(Part * SliceSize, SliceSize); in isGatherShuffledEntry()
9754 InstructionCost BoUpSLP::getGatherCost(ArrayRef<Value *> VL, in getGatherCost()
9802 ArrayRef<Value *> VL, SmallVectorImpl<Value *> &Left, in reorderInputsAccordingToOpcode()
9983 Value *BoUpSLP::gather(ArrayRef<Value *> VL, Value *Root) { in gather()
10122 Value *createShuffleVector(Value *V1, Value *V2, ArrayRef<int> Mask) { in createShuffleVector()
10132 Value *createShuffleVector(Value *V1, ArrayRef<int> Mask) { in createShuffleVector()
10178 Value *createShuffle(Value *V1, Value *V2, ArrayRef<int> Mask) { in createShuffle()
10189 ArrayRef<int> Mask) { in transformMaskAfterShuffle()
10201 ArrayRef<std::optional<TTI::ShuffleKind>> ShuffleKinds, in adjustExtracts()
10250 ArrayRef<Value *> VL = in adjustExtracts()
10251 ArrayRef(E->Scalars).slice(Part * SliceSize, SliceSize); in adjustExtracts()
10287 ArrayRef<int> SubMask = in adjustExtracts()
10318 ArrayRef<SmallVector<const TreeEntry *>> Deps) const { in needToDelay()
10320 if (all_of(Deps, [](ArrayRef<const TreeEntry *> TEs) { in needToDelay()
10335 void add(const TreeEntry &E1, const TreeEntry &E2, ArrayRef<int> Mask) { in add()
10340 void add(const TreeEntry &E1, ArrayRef<int> Mask) { in add()
10344 void add(Value *V1, Value *V2, ArrayRef<int> Mask) { in add()
10372 void add(Value *V1, ArrayRef<int> Mask, bool = false) { in add()
10429 void addOrdered(Value *V1, ArrayRef<unsigned> Order) { in addOrdered()
10434 Value *gather(ArrayRef<Value *> VL, unsigned MaskVF = 0, in gather()
10443 finalize(ArrayRef<int> ExtMask, unsigned VF = 0, in finalize()
10541 auto FinalShuffle = [&](Value *V, ArrayRef<int> Mask) { in vectorizeOperand()
10769 any_of(Entries, [&](ArrayRef<const TreeEntry *> TEs) { in __anon79d97e3ccb02()
10938 auto SubMask = ArrayRef(Mask).slice(I * SliceSize, SliceSize);
11083 ArrayRef<int> Mask = in vectorizeTree()
11084 ArrayRef(reinterpret_cast<const int *>(E->ReorderIndices.begin()), in vectorizeTree()
11205 ArrayRef<Value *> Op = E->getOperand(1); in vectorizeTree()
11844 ArrayRef<const TreeEntry *> PostponedNodes = PostponedGathers.getArrayRef(); in vectorizeTree()
12133 auto CreateShuffle = [&](Value *V1, Value *V2, ArrayRef<int> Mask) { in vectorizeTree()
12150 auto &&ResizeToVF = [&CreateShuffle](Value *Vec, ArrayRef<int> Mask, in vectorizeTree()
12189 [FirstInsert, &CreateShuffle](ArrayRef<int> Mask, in vectorizeTree()
12190 ArrayRef<Value *> Vals) { in vectorizeTree()
12360 ArrayRef<int> SM1 = SI1->getShuffleMask(); in optimizeGatherSequence()
12441 BoUpSLP::BlockScheduling::buildBundle(ArrayRef<Value *> VL) { in buildBundle()
12470 BoUpSLP::BlockScheduling::tryScheduleBundle(ArrayRef<Value *> VL, BoUpSLP *SLP, in tryScheduleBundle()
12566 void BoUpSLP::BlockScheduling::cancelScheduling(ArrayRef<Value *> VL, in cancelScheduling()
13428 bool SLPVectorizerPass::vectorizeStoreChain(ArrayRef<Value *> Chain, BoUpSLP &R, in vectorizeStoreChain()
13473 bool SLPVectorizerPass::vectorizeStores(ArrayRef<StoreInst *> Stores, in vectorizeStores()
13537 ArrayRef<Value *> Slice = ArrayRef(Operands).slice(Cnt, Size); in vectorizeStores()
13720 bool SLPVectorizerPass::tryToVectorizeList(ArrayRef<Value *> VL, BoUpSLP &R, in tryToVectorizeList()
13793 ArrayRef<Value *> Ops = VL.slice(I, ActualVF); in tryToVectorizeList()
14258 static bool isGoodForReduction(ArrayRef<Value *> Data) { in isGoodForReduction()
14428 for (ArrayRef<Value *> Data : PossibleRedValsVect) { in matchAssociativeReduction()
14451 stable_sort(ReducedVals, [](ArrayRef<Value *> P1, ArrayRef<Value *> P2) { in matchAssociativeReduction()
14468 [](unsigned Num, ArrayRef<Value *> Vals) -> unsigned { in tryToReduce()
14475 all_of(ReducedVals, [](ArrayRef<Value *> RedV) { in tryToReduce()
14559 for (ArrayRef<Value *> Candidates : ReducedVals) in tryToReduce()
14571 ArrayRef<Value *> OrigReducedVals = ReducedVals[I]; in tryToReduce()
14623 for (Value *VC : ArrayRef(Candidates).drop_front()) { in tryToReduce()
14726 ArrayRef<Value *> VL(std::next(Candidates.begin(), Pos), ReduxWidth); in tryToReduce()
14980 [&](ArrayRef<std::pair<Instruction *, Value *>> InstVals, in tryToReduce()
15015 for (ArrayRef<Value *> Candidates : ReducedVals) { in tryToReduce()
15021 ArrayRef(ReducedValsToOps.find(RdxVal)->second) in tryToReduce()
15050 for (ArrayRef<Value *> RdxOps : ReductionOps) in tryToReduce()
15053 for (ArrayRef<Value *> RdxOps : ReductionOps) { in tryToReduce()
15081 ArrayRef<Value *> ReducedVals, in getReductionCost()
15232 ArrayRef<Value *> VL, in emitReusedOps()
15645 bool SLPVectorizerPass::tryToVectorize(ArrayRef<WeakTrackingVH> Insts, in tryToVectorize()
15689 function_ref<bool(ArrayRef<T *>, bool)> TryToVectorizeHelper, in tryToVectorizeSequence()
15718 TryToVectorizeHelper(ArrayRef(IncIt, NumElts), MaxVFOnly)) { in tryToVectorizeSequence()
15748 if (NumElts > 1 && TryToVectorizeHelper(ArrayRef(It, NumElts), in tryToVectorizeSequence()
15879 [this, &R](ArrayRef<Value *> Candidates, bool MaxVFOnly) { in vectorizeCmpInsts()
15946 ArrayRef<Value *> Opcodes1 = PHIToOpcodes[V1]; in vectorizeChainsInBlock()
15947 ArrayRef<Value *> Opcodes2 = PHIToOpcodes[V2]; in vectorizeChainsInBlock()
16007 ArrayRef<Value *> Opcodes1 = PHIToOpcodes[V1]; in vectorizeChainsInBlock()
16008 ArrayRef<Value *> Opcodes2 = PHIToOpcodes[V2]; in vectorizeChainsInBlock()
16076 [this, &R](ArrayRef<Value *> Candidates, bool MaxVFOnly) { in vectorizeChainsInBlock()
16245 ArrayRef<GetElementPtrInst *> GEPList(&Entry.second[BI], Len); in vectorizeGEPIndices()
16406 [this, &R](ArrayRef<StoreInst *> Candidates, bool) { in vectorizeStoreChains()