This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg][bufferize][NFC] Simplify buffer API of BufferizationState
ClosedPublic

Authored by springerm on Dec 31 2021, 7:45 AM.

Details

Summary

Instead of lookupBuffer and getResultBuffer, there is now a single getBuffer function. This simplifies the BufferizableOpInterface API and is less confusing to users. They could previously have called the wrong function.

Furthermore, since getBuffer now takes an OpOperand & instead of a Value, users can no longer accidentally use one of the previous two functions incorrectly, which would have resulted in missing buffer copies.

Depends On D115706

Diff Detail

Event Timeline

springerm created this revision.Dec 31 2021, 7:45 AM
springerm requested review of this revision.Dec 31 2021, 7:45 AM
nicolasvasilache accepted this revision.Jan 7 2022, 5:49 AM
This revision is now accepted and ready to land.Jan 7 2022, 5:49 AM
This revision was landed with ongoing or failed builds.Jan 7 2022, 8:16 AM
This revision was automatically updated to reflect the committed changes.