Lines Matching refs:mapOrSet
737 static void canonicalizePromotedSymbols(MapOrSet *mapOrSet, in canonicalizePromotedSymbols() argument
739 if (!mapOrSet || operands->empty()) in canonicalizePromotedSymbols()
742 assert(mapOrSet->getNumInputs() == operands->size() && in canonicalizePromotedSymbols()
745 auto *context = mapOrSet->getContext(); in canonicalizePromotedSymbols()
752 unsigned oldNumSyms = mapOrSet->getNumSymbols(); in canonicalizePromotedSymbols()
753 SmallVector<AffineExpr, 8> dimRemapping(mapOrSet->getNumDims()); in canonicalizePromotedSymbols()
754 for (unsigned i = 0, e = mapOrSet->getNumInputs(); i != e; ++i) { in canonicalizePromotedSymbols()
755 if (i < mapOrSet->getNumDims()) { in canonicalizePromotedSymbols()
771 *mapOrSet = mapOrSet->replaceDimsAndSymbols(dimRemapping, {}, nextDim, in canonicalizePromotedSymbols()
774 assert(mapOrSet->getNumInputs() == operands->size() && in canonicalizePromotedSymbols()
780 static void canonicalizeMapOrSetAndOperands(MapOrSet *mapOrSet, in canonicalizeMapOrSetAndOperands() argument
785 if (!mapOrSet || operands->empty()) in canonicalizeMapOrSetAndOperands()
788 assert(mapOrSet->getNumInputs() == operands->size() && in canonicalizeMapOrSetAndOperands()
791 canonicalizePromotedSymbols<MapOrSet>(mapOrSet, operands); in canonicalizeMapOrSetAndOperands()
794 llvm::SmallBitVector usedDims(mapOrSet->getNumDims()); in canonicalizeMapOrSetAndOperands()
795 llvm::SmallBitVector usedSyms(mapOrSet->getNumSymbols()); in canonicalizeMapOrSetAndOperands()
796 mapOrSet->walkExprs([&](AffineExpr expr) { in canonicalizeMapOrSetAndOperands()
803 auto *context = mapOrSet->getContext(); in canonicalizeMapOrSetAndOperands()
809 SmallVector<AffineExpr, 8> dimRemapping(mapOrSet->getNumDims()); in canonicalizeMapOrSetAndOperands()
811 for (unsigned i = 0, e = mapOrSet->getNumDims(); i != e; ++i) { in canonicalizeMapOrSetAndOperands()
825 SmallVector<AffineExpr, 8> symRemapping(mapOrSet->getNumSymbols()); in canonicalizeMapOrSetAndOperands()
827 for (unsigned i = 0, e = mapOrSet->getNumSymbols(); i != e; ++i) { in canonicalizeMapOrSetAndOperands()
834 if (matchPattern((*operands)[i + mapOrSet->getNumDims()], in canonicalizeMapOrSetAndOperands()
841 auto it = seenSymbols.find((*operands)[i + mapOrSet->getNumDims()]); in canonicalizeMapOrSetAndOperands()
844 resultOperands.push_back((*operands)[i + mapOrSet->getNumDims()]); in canonicalizeMapOrSetAndOperands()
845 seenSymbols.insert(std::make_pair((*operands)[i + mapOrSet->getNumDims()], in canonicalizeMapOrSetAndOperands()
851 *mapOrSet = mapOrSet->replaceDimsAndSymbols(dimRemapping, symRemapping, in canonicalizeMapOrSetAndOperands()