Home
last modified time | relevance | path

Searched refs:opOperand (Results 1 – 25 of 38) sorted by relevance

12

/llvm-project-15.0.7/mlir/lib/Dialect/Linalg/Transforms/
H A DBufferizableOpInterfaceImpl.cpp42 for (OpOperand *opOperand : op.getInputOperands()) { in bufferizeLinalgOp()
43 if (op.isScalar(opOperand)) { in bufferizeLinalgOp()
44 newInputBuffers.push_back(opOperand->get()); in bufferizeLinalgOp()
56 OpOperand *opOperand = op.getOutputOperand(opResult.getResultNumber()); in bufferizeLinalgOp() local
58 getBuffer(rewriter, opOperand->get(), options); in bufferizeLinalgOp()
91 bool bufferizesToMemoryRead(Operation *op, OpOperand &opOperand, in bufferizesToMemoryRead()
95 return genericOp.payloadUsesValueFromOperand(&opOperand); in bufferizesToMemoryRead()
98 bool bufferizesToMemoryWrite(Operation *op, OpOperand &opOperand, in bufferizesToMemoryWrite()
102 return !bufferizableOp.getAliasingOpResult(opOperand, state).empty(); in bufferizesToMemoryWrite()
119 if (genericOp.isOutputTensor(&opOperand)) in getAliasingOpResult()
[all …]
H A DInlineScalarOperands.cpp38 for (OpOperand *opOperand : genericOp.getInputOperands()) { in matchAndRewrite()
39 AffineMap map = genericOp.getTiedIndexingMap(opOperand); in matchAndRewrite()
40 if (genericOp.isInputTensor(opOperand) && map.isConstant()) { in matchAndRewrite()
41 scalarOperands.emplace_back(opOperand->getOperandNumber()); in matchAndRewrite()
44 newOperands.emplace_back(opOperand->get()); in matchAndRewrite()
51 for (OpOperand *opOperand : genericOp.getOutputOperands()) in matchAndRewrite()
52 newIndexingMaps.emplace_back(genericOp.getTiedIndexingMap(opOperand)); in matchAndRewrite()
69 OpOperand *opOperand = genericOp.getInputOperand(idx); in matchAndRewrite() local
70 AffineMap map = genericOp.getTiedIndexingMap(opOperand); in matchAndRewrite()
77 loc, opOperand->get(), indicesValues); in matchAndRewrite()
H A DElementwiseOpFusion.cpp276 fusedOperands.push_back(opOperand->get()); in fuseElementwiseOpsImpl()
284 fusedOperands.push_back(opOperand->get()); in fuseElementwiseOpsImpl()
287 opOperand, producerResultIndexMap, in fuseElementwiseOpsImpl()
304 for (OpOperand *opOperand : in fuseElementwiseOpsImpl()
306 fusedOperands.push_back(opOperand->get()); in fuseElementwiseOpsImpl()
719 if (opOperand == fusableOpOperand) { in fuseWithReshapeByExpansion()
724 if (genericOp.isInputTensor(opOperand)) { in fuseWithReshapeByExpansion()
747 expandedOpOperands.push_back(opOperand->get()); in fuseWithReshapeByExpansion()
1281 Value operand = opOperand->get(); in getCollapsedOpOperand()
1541 if (inputOperand == opOperand) in matchAndRewrite()
[all …]
H A DSplit.cpp33 for (OpOperand *opOperand : op.getInputAndOutputOperands()) { in getOperandSlices()
34 auto type = opOperand->get().getType().dyn_cast<ShapedType>(); in getOperandSlices()
35 AffineMap indexing = op.getTiedIndexingMap(opOperand); in getOperandSlices()
42 slices.push_back(opOperand->get()); in getOperandSlices()
62 operands[opOperand->getOperandNumber()], in getOperandSlices()
87 [](OpOperand *opOperand) { return opOperand->get(); })); in createSplitPart() argument
124 [](OpOperand *opOperand) { return opOperand->get(); })); in splitOp() argument
H A DPromotion.cpp152 for (OpOperand *opOperand : linalgOp.getInputAndOutputOperands()) { in LinalgOpInstancePromotionOptions()
153 int64_t operandNumber = opOperand->getOperandNumber(); in LinalgOpInstancePromotionOptions()
157 Operation *op = opOperand->get().getDefiningOp(); in LinalgOpInstancePromotionOptions()
326 for (OpOperand *opOperand : op.getInputAndOutputOperands()) { in promoteSubViews()
327 int64_t operandNumber = opOperand->getOperandNumber(); in promoteSubViews()
329 if (options.useFullTileBuffers[opOperand->get()]) in promoteSubViews()
337 opOperand->get(), in promoteSubViews()
340 opViews.push_back(opOperand->get()); in promoteSubViews()
368 for (OpOperand *opOperand : linalgOp.getInputAndOutputOperands()) { in promoteSubviewsPrecondition()
370 isa_and_nonnull<memref::SubViewOp>(opOperand->get().getDefiningOp()); in promoteSubviewsPrecondition()
[all …]
H A DDropUnitDims.cpp240 replaceUnitExtents(GenericOp genericOp, OpOperand *opOperand, in replaceUnitExtents() argument
242 AffineMap indexingMap = genericOp.getTiedIndexingMap(opOperand); in replaceUnitExtents()
243 ArrayRef<int64_t> shape = genericOp.getShape(opOperand); in replaceUnitExtents()
250 int64_t origRank = genericOp.getRank(opOperand); in replaceUnitExtents()
258 Type actualType = opOperand->get().getType(); in replaceUnitExtents()
284 Type elementType = getElementTypeOrSelf(opOperand->get()); in replaceUnitExtents()
286 if (elementType == opOperand->get().getType()) { in replaceUnitExtents()
373 for (OpOperand *opOperand : genericOp.getInputAndOutputOperands()) { in matchAndRewrite()
380 replacementInfo->type != opOperand->get().getType(); in matchAndRewrite()
385 newInputOutputTypes.push_back(opOperand->get().getType()); in matchAndRewrite()
[all …]
H A DFusion.cpp72 for (OpOperand *opOperand : op.getInputAndOutputOperands()) { in getShapeDefiningLoopRange()
81 opOperand->get().getDefiningOp())) in getShapeDefiningLoopRange()
84 AffineMap map = op.getTiedIndexingMap(opOperand); in getShapeDefiningLoopRange()
86 << opOperand->getOperandNumber() << "\n"); in getShapeDefiningLoopRange()
98 << opOperand->get() << "\n"); in getShapeDefiningLoopRange()
99 return ShapeDimension{opOperand->get(), in getShapeDefiningLoopRange()
445 OpOperand *opOperand = in fuseProducerOfTensor() local
448 fuse(b, producerOp, producerOp.getTiedIndexingMap(opOperand), in fuseProducerOfTensor()
H A DTransforms.cpp169 OpBuilder &b, linalg::LinalgOp opToPad, OpOperand *opOperand, in padOperandToSmallestStaticBoundingBox() argument
172 AffineMap indexingMap = opToPad.getTiedIndexingMap(opOperand); in padOperandToSmallestStaticBoundingBox()
173 ArrayRef<int64_t> shape = opToPad.getShape(opOperand); in padOperandToSmallestStaticBoundingBox()
184 bool nofold = opOperand->getOperandNumber() < packPaddings.size() in padOperandToSmallestStaticBoundingBox()
185 ? packPaddings[opOperand->getOperandNumber()] in padOperandToSmallestStaticBoundingBox()
191 return opOperand->get(); in padOperandToSmallestStaticBoundingBox()
194 if (opOperand->getOperandNumber() >= paddingValues.size()) in padOperandToSmallestStaticBoundingBox()
201 OpOperand *currOpOperand = opOperand; in padOperandToSmallestStaticBoundingBox()
248 paddedShape, getElementTypeOrSelf(opOperand->get())); in padOperandToSmallestStaticBoundingBox()
424 OpOperand *opOperand = &paddedOp->getOpOperand(en.index()); in returningMatchAndRewrite() local
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/Bufferization/IR/
H A DBufferizableOpInterface.cpp139 if (state.isInPlace(opOperand)) in resolveTensorOpOperandConflicts()
145 state.getAliasingOpResult(opOperand); in resolveTensorOpOperandConflicts()
162 if (!state.canOmitTensorCopy(opOperand)) in resolveTensorOpOperandConflicts()
169 if (!state.canOmitTensorCopy(opOperand)) in resolveTensorOpOperandConflicts()
170 copiedOpOperands.insert(&opOperand); in resolveTensorOpOperandConflicts()
182 copiedOpOperands.contains(opOperand)); in resolveTensorOpOperandConflicts()
449 if (hasUndefinedContents(&opOperand)) in canOmitTensorCopy()
454 if (bufferizesToMemoryWrite(opOperand) && !bufferizesToMemoryRead(opOperand)) in canOmitTensorCopy()
459 if (!bufferizesToMemoryRead(opOperand) && in canOmitTensorCopy()
470 if (isa<ToMemrefOp>(opOperand.getOwner())) in isInPlace()
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/Vector/Transforms/
H A DBufferizableOpInterfaceImpl.cpp29 bool bufferizesToMemoryRead(Operation *op, OpOperand &opOperand, in bufferizesToMemoryRead()
31 assert(opOperand.get().getType().isa<RankedTensorType>() && in bufferizesToMemoryRead()
36 bool bufferizesToMemoryWrite(Operation *op, OpOperand &opOperand, in bufferizesToMemoryWrite()
38 assert(opOperand.get().getType().isa<RankedTensorType>() && in bufferizesToMemoryWrite()
43 SmallVector<OpResult> getAliasingOpResult(Operation *op, OpOperand &opOperand, in getAliasingOpResult()
69 bool bufferizesToMemoryRead(Operation *op, OpOperand &opOperand, in bufferizesToMemoryRead()
71 assert(opOperand.get().getType().isa<TensorType>() && in bufferizesToMemoryRead()
76 bool bufferizesToMemoryWrite(Operation *op, OpOperand &opOperand, in bufferizesToMemoryWrite()
78 assert(opOperand.get().getType().isa<TensorType>() && in bufferizesToMemoryWrite()
83 SmallVector<OpResult> getAliasingOpResult(Operation *op, OpOperand &opOperand, in getAliasingOpResult()
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/Linalg/IR/
H A DLinalgInterfaces.cpp34 if (llvm::is_contained(droppedOperands, opOperand)) in canOpOperandsBeDroppedImpl()
475 [](OpOperand *opOperand) { return opOperand->get(); }); in operator SmallVector<Value>() argument
504 llvm::append_range(res, getShape(opOperand)); in createFlatListOfOperandStaticDims()
599 for (OpOperand *opOperand : getOutputOperands()) { in reifyResultShapes()
661 << opOperand->getOperandNumber(); in verifyStructuredOpInterface()
670 int64_t rank = linalgOp.getRank(opOperand); in verifyStructuredOpInterface()
674 << opOperand->getOperandNumber() << " (" in verifyStructuredOpInterface()
695 << opOperand->getOperandNumber() << " (" in verifyStructuredOpInterface()
696 << opOperand->get().getType() << ")" in verifyStructuredOpInterface()
798 << opOperand->getOperandNumber() in verifyStructuredOpInterface()
[all …]
H A DLinalgOps.cpp1495 for (OpOperand &opOperand : op->getOpOperands()) { in verifyYield()
1499 if (opOperand.get().getType() != elementType) in verifyYield()
1658 if (opOperand->get().isa<BlockArgument>()) in matchAndRewrite()
1675 : opOperand->get()); in matchAndRewrite()
1767 for (OpOperand *opOperand : operands) { in populateMap()
1768 if (linalgOp.isScalar(opOperand)) in populateMap()
1770 Value src = opOperand->get(); in populateMap()
1809 Value src = opOperand->get(); in createNewOperandWithStaticSizes()
1811 if (linalgOp.isScalar(opOperand)) in createNewOperandWithStaticSizes()
1845 unsigned index = opOperand->getOperandNumber(); in createNewOperandWithStaticSizes()
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/Bufferization/Transforms/
H A DOneShotAnalysis.cpp78 Operation *op = opOperand.getOwner(); in setInPlaceOpOperand()
204 aliasInfo.markInPlace(opOperand); in OneShotAnalysisState()
212 return aliasInfo.isInPlace(opOperand); in isInPlace()
292 return undefinedTensorUses.contains(opOperand); in hasUndefinedContents()
333 if (!state.bufferizesToMemoryWrite(opOperand)) in isInplaceMemoryWrite()
336 return aliasInfo.isInPlace(opOperand); in isInplaceMemoryWrite()
677 if (aliasInfo.isInPlace(*opOperand) || currentOpOperand == opOperand) in hasPrecedingAliasingNonWritableTensor()
678 worklist.push_back(opOperand->get()); in hasPrecedingAliasingNonWritableTensor()
804 for (OpOperand *opOperand : in equivalenceAnalysis()
806 if (state.isInPlace(*opOperand)) in equivalenceAnalysis()
[all …]
H A DFuncBufferizableOpInterfaceImpl.cpp147 bool bufferizesToMemoryRead(Operation *op, OpOperand &opOperand, in bufferizesToMemoryRead()
159 opOperand.getOperandNumber()); in bufferizesToMemoryRead()
174 opOperand.getOperandNumber()); in bufferizesToMemoryWrite()
196 opOperand.getOperandNumber()); in getAliasingOpResult()
213 for (OpOperand &opOperand : op->getOpOperands()) in getAliasingOpOperand()
214 if (opOperand.get().getType().isa<TensorType>()) in getAliasingOpOperand()
215 result.push_back(&opOperand); in getAliasingOpOperand()
296 for (OpOperand &opOperand : callOp->getOpOperands()) { in bufferize()
297 unsigned idx = opOperand.getOperandNumber(); in bufferize()
298 Value tensorOperand = opOperand.get(); in bufferize()
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/Tensor/Transforms/
H A DBufferizableOpInterfaceImpl.cpp30 bool bufferizesToMemoryRead(Operation *op, OpOperand &opOperand, in bufferizesToMemoryRead()
35 bool bufferizesToMemoryWrite(Operation *op, OpOperand &opOperand, in bufferizesToMemoryWrite()
100 if (&opOperand == &op->getOpOperand(0) /*src*/) in getAliasingOpResult()
224 if (&opOperand == &op->getOpOperand(0) /*src*/) in getAliasingOpResult()
268 if (&opOperand == &op->getOpOperand(0) /*source*/) in getAliasingOpResult()
523 assert(&opOperand == &op->getOpOperand(1) /*dest*/ && in getAliasingOpResult()
676 return &opOperand == &op->getOpOperand(1) /*dest*/; in bufferizesToMemoryWrite()
681 if (&opOperand == &op->getOpOperand(1) /*dest*/) in getAliasingOpResult()
779 if (&opOperand == &op->getOpOperand(1) /* shape */) in bufferizesToMemoryRead()
823 if (&opOperand != &op->getOpOperand(1) /*dest*/) in getAliasingOpResult()
[all …]
/llvm-project-15.0.7/mlir/include/mlir/Dialect/Linalg/IR/
H A DLinalgInterfaces.td367 [](OpOperand &opOperand) { return &opOperand; });
397 [](OpOperand *opOperand) {
416 [](OpOperand *opOperand) {
441 [](OpOperand &opOperand) { return &opOperand; });
484 [](OpOperand *opOperand) {
503 [](OpOperand *opOperand) {
565 [](OpOperand &opOperand) { return &opOperand; });
766 `opOperand`.
878 [&](OpOperand &opOperand) {
894 [&](OpOperand &opOperand) {
[all …]
/llvm-project-15.0.7/mlir/lib/Dialect/SparseTensor/Transforms/
H A DBufferizableOpInterfaceImpl.cpp38 bool bufferizesToMemoryRead(Operation *op, OpOperand &opOperand, in bufferizesToMemoryRead()
43 bool bufferizesToMemoryWrite(Operation *op, OpOperand &opOperand, in bufferizesToMemoryWrite()
48 SmallVector<OpResult> getAliasingOpResult(Operation *op, OpOperand &opOperand, in getAliasingOpResult()
62 bool bufferizesToMemoryRead(Operation *op, OpOperand &opOperand, in bufferizesToMemoryRead()
67 bool bufferizesToMemoryWrite(Operation *op, OpOperand &opOperand, in bufferizesToMemoryWrite()
72 SmallVector<OpResult> getAliasingOpResult(Operation *op, OpOperand &opOperand, in getAliasingOpResult()
/llvm-project-15.0.7/mlir/test/lib/Dialect/Linalg/
H A DTestLinalgFusionTransforms.cpp41 for (OpOperand *opOperand : linalgOp.getInputAndOutputOperands()) { in fuseLinalgOpsGreedily()
42 if (opOperand->get().getType().isa<MemRefType>()) { in fuseLinalgOpsGreedily()
48 auto info = fuseProducerOfBuffer(b, *opOperand, graph); in fuseLinalgOpsGreedily()
57 } else if (opOperand->get().getType().isa<RankedTensorType>()) { in fuseLinalgOpsGreedily()
59 if (opOperand->getOperandNumber() >= linalgOp.getNumInputs()) in fuseLinalgOpsGreedily()
61 auto info = fuseProducerOfTensor(b, *opOperand); in fuseLinalgOpsGreedily()
/llvm-project-15.0.7/mlir/lib/Dialect/Shape/Transforms/
H A DBufferizableOpInterfaceImpl.cpp104 bool bufferizesToMemoryRead(Operation *op, OpOperand &opOperand, in bufferizesToMemoryRead()
109 bool bufferizesToMemoryWrite(Operation *op, OpOperand &opOperand, in bufferizesToMemoryWrite()
114 SmallVector<OpResult> getAliasingOpResult(Operation *op, OpOperand &opOperand, in getAliasingOpResult()
118 return {op->getParentOp()->getResult(opOperand.getOperandNumber())}; in getAliasingOpResult()
121 bool mustBufferizeInPlace(Operation *op, OpOperand &opOperand, in mustBufferizeInPlace()
/llvm-project-15.0.7/mlir/lib/Dialect/Arithmetic/Transforms/
H A DBufferizableOpInterfaceImpl.cpp67 bool bufferizesToMemoryRead(Operation *op, OpOperand &opOperand, in bufferizesToMemoryRead()
72 bool bufferizesToMemoryWrite(Operation *op, OpOperand &opOperand, in bufferizesToMemoryWrite()
77 SmallVector<OpResult> getAliasingOpResult(Operation *op, OpOperand &opOperand, in getAliasingOpResult()
119 bool bufferizesToMemoryRead(Operation *op, OpOperand &opOperand, in bufferizesToMemoryRead()
124 bool bufferizesToMemoryWrite(Operation *op, OpOperand &opOperand, in bufferizesToMemoryWrite()
129 SmallVector<OpResult> getAliasingOpResult(Operation *op, OpOperand &opOperand, in getAliasingOpResult()
/llvm-project-15.0.7/mlir/lib/CAPI/Dialect/
H A DLinalg.cpp32 for (OpOperand *opOperand : linalgOp.getInputAndOutputOperands()) { in mlirLinalgFillBuiltinNamedOpRegion()
33 argTypes.push_back(getElementTypeOrSelf(opOperand->get().getType())); in mlirLinalgFillBuiltinNamedOpRegion()
34 argLocs.push_back(opOperand->get().getLoc()); in mlirLinalgFillBuiltinNamedOpRegion()
/llvm-project-15.0.7/mlir/lib/Dialect/SCF/Transforms/
H A DBufferizableOpInterfaceImpl.cpp289 for (OpOperand &opOperand : operands) { in getBuffers()
290 if (opOperand.get().getType().isa<TensorType>()) { in getBuffers()
292 getBuffer(rewriter, opOperand.get(), options); in getBuffers()
297 result.push_back(opOperand.get()); in getBuffers()
379 bool bufferizesToMemoryRead(Operation *op, OpOperand &opOperand, in bufferizesToMemoryRead()
387 bool bufferizesToMemoryWrite(Operation *op, OpOperand &opOperand, in bufferizesToMemoryWrite()
396 return {forOp.getResultForOpOperand(opOperand)}; in getAliasingOpResult()
561 bool bufferizesToMemoryRead(Operation *op, OpOperand &opOperand, in bufferizesToMemoryRead()
576 unsigned int idx = opOperand.getOperandNumber(); in getAliasingOpResult()
581 opOperand.get().getType() != op->getResult(idx).getType()) in getAliasingOpResult()
[all …]
/llvm-project-15.0.7/mlir/include/mlir/Dialect/Bufferization/IR/
H A DBufferizableOpInterface.h348 SmallVector<OpResult> getAliasingOpResult(OpOperand &opOperand) const;
352 bool bufferizesToMemoryRead(OpOperand &opOperand) const;
356 bool bufferizesToMemoryWrite(OpOperand &opOperand) const;
360 bool bufferizesToAliasOnly(OpOperand &opOperand) const;
364 bool canOmitTensorCopy(OpOperand &opOperand) const;
408 virtual bool isInPlace(OpOperand &opOperand) const;
417 virtual bool hasUndefinedContents(OpOperand *opOperand) const;
H A DBufferizableOpInterface.td55 /*args=*/(ins "OpOperand &":$opOperand,
84 /*args=*/(ins "OpOperand &":$opOperand,
134 /*args=*/(ins "OpOperand &":$opOperand,
149 /*args=*/(ins "OpOperand &":$opOperand,
183 if (!opOperand.get().getType().isa<TensorType>())
186 bufferizableOp.getAliasingOpResult(opOperand, state);
188 result.push_back(&opOperand);
392 bool bufferizesToAliasOnly(OpOperand &opOperand,
396 return !bufferizableOp.bufferizesToMemoryRead(opOperand, state)
397 && !bufferizableOp.bufferizesToMemoryWrite(opOperand, state)
[all …]
/llvm-project-15.0.7/mlir/include/mlir/Dialect/Bufferization/Transforms/
H A DOneShotAnalysis.h87 bool isInPlace(OpOperand &opOperand) const;
139 bool isInPlace(OpOperand &opOperand) const override;
148 bool hasUndefinedContents(OpOperand *opOperand) const override;

12