This is an archive of the discontinued LLVM Phabricator instance.

[mlir][spirv] Make MemRef memory space mapping pass more flexible
ClosedPublic

Authored by antiagainst on Aug 8 2022, 9:40 AM.

Details

Summary
  • Avoid restricting the pass to to builtin module ops. The pass should be able to run on any region ops.
  • Avoid hardcoding func FuncOp when handling functions. Instead, use the function op interface.
  • Assigns the default mapping in the constructor. So for cases where we are using the pass in a pipeline, we still have a meaningful default.

Along the way, dropped uncessary unrealized conversion casts and
use full conversion. The pass should be able to convert all sorts
of ops; there is really no need to have such bridages.

Diff Detail

Event Timeline

antiagainst created this revision.Aug 8 2022, 9:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2022, 9:40 AM
antiagainst requested review of this revision.Aug 8 2022, 9:40 AM
kuhar accepted this revision.Aug 9 2022, 8:38 AM
kuhar added inline comments.
mlir/lib/Conversion/MemRefToSPIRV/MapMemRefStorageClassPass.cpp
98

nit: grammar seems a bit off to me here. Shouldn't it be due to being unable to or due to the inability to or due to not being able to?

This revision is now accepted and ready to land.Aug 9 2022, 8:38 AM
antiagainst marked an inline comment as done.Aug 9 2022, 11:21 AM
This revision was landed with ongoing or failed builds.Aug 9 2022, 11:22 AM
This revision was automatically updated to reflect the committed changes.