Differential D114774 Diff 390920 mlir/include/mlir/Dialect/Linalg/ComprehensiveBufferize/BufferizableOpInterface.td

# Changeset View

Changeset View

# Standalone View

Standalone View

# mlir/include/mlir/Dialect/Linalg/ComprehensiveBufferize/BufferizableOpInterface.td

Show First 20 Lines • Show All 147 Lines • ▼ Show 20 Lines | let methods = [ | ||||

/*methodBody=*/"", | /*methodBody=*/"", | ||||

/*defaultImplementation=*/[{ | /*defaultImplementation=*/[{ | ||||

// Does not have to be implemented for ops without tensor OpResults. | // Does not have to be implemented for ops without tensor OpResults. | ||||

llvm_unreachable("getInplaceableOpResult not implemented"); | llvm_unreachable("getInplaceableOpResult not implemented"); | ||||

}] | }] | ||||

>, | >, | ||||

InterfaceMethod< | InterfaceMethod< | ||||

/*desc=*/[{ | /*desc=*/[{ | ||||

Return the buffer relation between the given OpOperand and its | Return the buffer relation between the given OpResult and its aliasing | ||||

aliasing OpResult when bufferized in-place. Most OpOperands have an | OpOperands when bufferized in-place. Most OpOperands have an | ||||

"equivalence" relation. | "equivalence" relation. This method will never be called on OpResults | ||||

that do not have a tensor type. It will also never be called on | |||||

OpResults that do not have at least one aliasing OpOperand. | |||||

TODO: Support other relations such as "OpOperand is included in | TODO: Support other relations such as "OpOperand is included in | ||||

OpResult". | OpResult". | ||||

}], | }], | ||||

/*retType=*/"BufferRelation", | /*retType=*/"BufferRelation", | ||||

/*methodName=*/"bufferRelation", | /*methodName=*/"bufferRelation", | ||||

/*args=*/(ins "OpOperand &":$opOperand), | /*args=*/(ins "OpResult":$opResult, | ||||

"const BufferizationAliasInfo &":$aliasInfo), | |||||

/*methodBody=*/"", | /*methodBody=*/"", | ||||

/*defaultImplementation=*/[{ | /*defaultImplementation=*/[{ | ||||

// Does not have to be implemented for ops without tensor OpOperands. | // Does not have to be implemented for ops without tensor OpResults | ||||

// that have an aliasing OpOperand. | |||||

llvm_unreachable("bufferRelation not implemented"); | llvm_unreachable("bufferRelation not implemented"); | ||||

}] | }] | ||||

>, | >, | ||||

InterfaceMethod< | InterfaceMethod< | ||||

/*desc=*/[{ | /*desc=*/[{ | ||||

Bufferize this op, i.e., rewrite it into a memref-based equivalent. | Bufferize this op, i.e., rewrite it into a memref-based equivalent. | ||||

Tensor values should be mapped to buffer values using `state`. | Tensor values should be mapped to buffer values using `state`. | ||||

▲ Show 20 Lines • Show All 112 Lines • Show Last 20 Lines |