Lines Matching refs:opOperand

135   for (OpOperand &opOperand : op->getOpOperands()) {  in resolveTensorOpOperandConflicts()
136 Type operandType = opOperand.get().getType(); in resolveTensorOpOperandConflicts()
139 if (state.isInPlace(opOperand)) in resolveTensorOpOperandConflicts()
145 state.getAliasingOpResult(opOperand); in resolveTensorOpOperandConflicts()
155 !state.bufferizesToMemoryWrite(opOperand) && in resolveTensorOpOperandConflicts()
162 if (!state.canOmitTensorCopy(opOperand)) in resolveTensorOpOperandConflicts()
168 outOfPlaceOpOperands.push_back(&opOperand); in resolveTensorOpOperandConflicts()
169 if (!state.canOmitTensorCopy(opOperand)) in resolveTensorOpOperandConflicts()
170 copiedOpOperands.insert(&opOperand); in resolveTensorOpOperandConflicts()
172 escapingOpOperandCopies.insert(&opOperand); in resolveTensorOpOperandConflicts()
178 for (OpOperand *opOperand : outOfPlaceOpOperands) { in resolveTensorOpOperandConflicts()
180 rewriter, op->getLoc(), opOperand->get(), in resolveTensorOpOperandConflicts()
181 escapingOpOperandCopies.contains(opOperand), state.getOptions(), in resolveTensorOpOperandConflicts()
182 copiedOpOperands.contains(opOperand)); in resolveTensorOpOperandConflicts()
185 rewriter.updateRootInPlace(op, [&]() { opOperand->set(*copy); }); in resolveTensorOpOperandConflicts()
330 AnalysisState::getAliasingOpResult(OpOperand &opOperand) const { in getAliasingOpResult()
332 getOptions().dynCastBufferizableOp(opOperand.getOwner())) in getAliasingOpResult()
333 return bufferizableOp.getAliasingOpResult(opOperand, *this); in getAliasingOpResult()
339 bool AnalysisState::bufferizesToMemoryRead(OpOperand &opOperand) const { in bufferizesToMemoryRead()
341 getOptions().dynCastBufferizableOp(opOperand.getOwner())) in bufferizesToMemoryRead()
342 return bufferizableOp.bufferizesToMemoryRead(opOperand, *this); in bufferizesToMemoryRead()
351 bool AnalysisState::bufferizesToMemoryWrite(OpOperand &opOperand) const { in bufferizesToMemoryWrite()
353 getOptions().dynCastBufferizableOp(opOperand.getOwner())) in bufferizesToMemoryWrite()
354 return bufferizableOp.bufferizesToMemoryWrite(opOperand, *this); in bufferizesToMemoryWrite()
363 bool AnalysisState::bufferizesToAliasOnly(OpOperand &opOperand) const { in bufferizesToAliasOnly()
365 getOptions().dynCastBufferizableOp(opOperand.getOwner())) in bufferizesToAliasOnly()
366 return bufferizableOp.bufferizesToAliasOnly(opOperand, *this); in bufferizesToAliasOnly()
447 bool AnalysisState::canOmitTensorCopy(OpOperand &opOperand) const { in canOmitTensorCopy()
449 if (hasUndefinedContents(&opOperand)) in canOmitTensorCopy()
454 if (bufferizesToMemoryWrite(opOperand) && !bufferizesToMemoryRead(opOperand)) in canOmitTensorCopy()
458 SmallVector<OpResult> aliasingOpResults = getAliasingOpResult(opOperand); in canOmitTensorCopy()
459 if (!bufferizesToMemoryRead(opOperand) && in canOmitTensorCopy()
468 bool AnalysisState::isInPlace(OpOperand &opOperand) const { in isInPlace()
470 if (isa<ToMemrefOp>(opOperand.getOwner())) in isInPlace()
475 return !bufferizesToMemoryWrite(opOperand); in isInPlace()
490 bool AnalysisState::hasUndefinedContents(OpOperand *opOperand) const { in hasUndefinedContents()