Lines Matching full:strategy

45 /// Implements a high-level vectorization strategy on a Function.
631 VectorizationStrategy *strategy) {
634 if (patternDepth - depthInPattern > strategy->vectorSizes.size()) {
638 strategy->loopToVectorDim[loop] =
639 strategy->vectorSizes.size() - (patternDepth - depthInPattern);
642 /// Implements a simple strawman strategy for vectorization.
643 /// Given a matched pattern `matches` of depth `patternDepth`, this strategy
647 /// load/store MemRefs, this creates a generic vectorization strategy that works
660 VectorizationStrategy *strategy) {
663 patternDepth, strategy))) {
667 patternDepth, strategy);
765 // The strategy drives which loop to vectorize by which amount.
766 const VectorizationStrategy *strategy = nullptr;
935 /// strategy on the scalar type.
937 const VectorizationStrategy *strategy) {
939 return VectorType::get(strategy->vectorSizes, scalarTy);
951 auto vecTy = getVectorType(scalarTy, state.strategy);
1010 auto vecTy = getVectorType(scalarTy, state.strategy);
1026 assert(state.strategy->vectorSizes.size() == 1 &&
1028 assert(vecForOp.getStep() == state.strategy->vectorSizes[0] &&
1080 Type maskTy = VectorType::get(state.strategy->vectorSizes,
1094 /// strategy.
1097 // strategy are considered vector uniforms.
1099 const VectorizationStrategy *strategy) {
1101 if (forOp && strategy->loopToVectorDim.count(forOp) == 0)
1104 for (auto loopToDim : strategy->loopToVectorDim) {
1113 /// vectorization strategy in 'state'.
1121 auto vectorTy = getVectorType(uniformVal.getType(), state.strategy);
1141 /// Returns an operand that has been vectorized to match `state`'s strategy if
1167 if (isUniformDefinition(operand, state.strategy)) {
1184 /// Vectorizes an affine load with the vectorization strategy in 'state' by
1194 auto vectorType = VectorType::get(state.strategy->vectorSizes, elementType);
1234 /// Vectorizes an affine store with the vectorization strategy in 'state' by
1293 /// Vectorizes a loop with the vectorization strategy in 'state'. A new loop is
1301 const VectorizationStrategy &strategy = *state.strategy;
1302 auto loopToVecDimIt = strategy.loopToVectorDim.find(forOp);
1303 bool isLoopVecDim = loopToVecDimIt != strategy.loopToVectorDim.end();
1320 assert(vectorDim < strategy.vectorSizes.size() && "vector dim overflow");
1321 int64_t forOpVecFactor = strategy.vectorSizes[vectorDim];
1330 auto it = strategy.reductionLoops.find(forOp);
1331 assert(it != strategy.reductionLoops.end() &&
1425 VectorType::get(state.strategy->vectorSizes, result.getType()));
1560 /// using an n-D vectorization strategy.
1563 const VectorizationStrategy &strategy) {
1568 state.strategy = &strategy;
1571 // Since we do not want a fully greedy strategy in general, we decouple
1634 const VectorizationStrategy &strategy) {
1637 return vectorizeLoopNest(loopsToVectorize, strategy);
1722 VectorizationStrategy strategy;
1724 strategy.vectorSizes.assign(vectorSizes.begin(), vectorSizes.end());
1725 strategy.reductionLoops = reductionLoops;
1727 patternDepth, &strategy))) {
1731 &strategy);
1736 if (succeeded(vectorizeRootMatch(match, strategy)))
1851 /// n-D vectorization strategy (see doc in VectorizationStrategy definition).
1887 const VectorizationStrategy &strategy) {
1892 return vectorizeLoopNest(loops, strategy);