This is an archive of the discontinued LLVM Phabricator instance.

[mlir][linalg][bufferize][NFC] Clean up BufferizationState
ClosedPublic

Authored by springerm on Dec 2 2021, 12:12 AM.

Details

Summary

Make fields private and clean up the interface. In particular, BufferizableOpInterface::bufferize no longer has access to aliasInfo. This was potentially dangerous because some of the ops registered in BufferizationAliasInfo may have been deleted.

Depends On D114930

Diff Detail

Event Timeline

springerm created this revision.Dec 2 2021, 12:12 AM
springerm requested review of this revision.Dec 2 2021, 12:12 AM
nicolasvasilache accepted this revision.Dec 3 2021, 12:50 AM
This revision is now accepted and ready to land.Dec 3 2021, 12:50 AM
This revision was landed with ongoing or failed builds.Dec 6 2021, 5:08 PM
This revision was automatically updated to reflect the committed changes.

@springerm This has produced a new warning on one of our bots https://lab.llvm.org/buildbot/#/builders/179/builds/2050/steps/11/logs/warnings__8_.

ComprehensiveBufferize.h:20:1: warning: struct 'BufferizationState' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]

I think you just need to change the forward declaration in that file to "class".

@springerm This has produced a new warning on one of our bots https://lab.llvm.org/buildbot/#/builders/179/builds/2050/steps/11/logs/warnings__8_.

ComprehensiveBufferize.h:20:1: warning: struct 'BufferizationState' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]

I think you just need to change the forward declaration in that file to "class".

Fixed. Thx for pointing that one.