This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] Support attribute in MapMemRefStorageClassPass
ClosedPublic

Authored by antiagainst on Nov 17 2022, 8:38 PM.

Details

Summary

MemRef memory space actually can be an attribute. Update the
map function signature to accept an attribute. The default
mappings can still only covers numeric ones, but this allows
downstream callers to extend with custom memory spaces.

Diff Detail

Event Timeline

antiagainst created this revision.Nov 17 2022, 8:38 PM
antiagainst requested review of this revision.Nov 17 2022, 8:38 PM
kuhar accepted this revision.Nov 17 2022, 8:42 PM
kuhar added inline comments.
mlir/lib/Conversion/MemRefToSPIRV/MapMemRefStorageClassPass.cpp
169–170

nit: can you spell out the exact type? It's not obvious to me just by looking at the RHS.

This revision is now accepted and ready to land.Nov 17 2022, 8:42 PM

Address comments

antiagainst marked an inline comment as done.Nov 17 2022, 8:44 PM
This revision was landed with ongoing or failed builds.Nov 17 2022, 8:56 PM
This revision was automatically updated to reflect the committed changes.