This is an archive of the discontinued LLVM Phabricator instance.

[mlir][NFC] Promote memory space to BaseMemRefType
ClosedPublic

Authored by dcaballe on Sep 14 2020, 4:01 PM.

Details

Summary

This patch moves the memory space field from MemRefType and UnrankedMemRefType
to their base class BaseMemRefType so that it can be retrieved from it without
downcasting it to the specific memref.

Diff Detail

Event Timeline

dcaballe created this revision.Sep 14 2020, 4:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 14 2020, 4:01 PM
dcaballe requested review of this revision.Sep 14 2020, 4:01 PM

Looks good, overall. One question below.

mlir/lib/IR/TypeDetail.h
214–216

Do we need this? What happens if this is removed?

silvas accepted this revision.Sep 22 2020, 7:28 PM
This revision is now accepted and ready to land.Sep 22 2020, 7:28 PM

Thanks!

mlir/lib/IR/TypeDetail.h
214–216

I'll try. According to the doc, it shouldn't be needed for basic types.

This revision was automatically updated to reflect the committed changes.