This is an archive of the discontinued LLVM Phabricator instance.

[mlir][NFC] Rename `MemRefType::getMemorySpace` to `getMemorySpaceAsInt`
ClosedPublic

Authored by vinograd47 on Feb 25 2021, 8:07 AM.

Details

Summary

Just a pure method renaming.

It is a preparation step for replacing "memory space as raw integer"
with more generic "memory space as attribute", which will be done in
separate commit.

The MemRefType::getMemorySpace method will return Attribute and
become the main API, while getMemorySpaceAsInt will be declared as
deprecated and will be replaced in all in-tree dialects (also in separate
commits).

Diff Detail

Event Timeline

vinograd47 created this revision.Feb 25 2021, 8:07 AM
vinograd47 requested review of this revision.Feb 25 2021, 8:07 AM
rriddle accepted this revision.Feb 25 2021, 11:32 AM
rriddle added inline comments.
mlir/include/mlir/IR/BuiltinTypes.h
296

nit: I'd probably go with getMemorySpaceAsInteger, but I don't think it matters that much if it is going away soon.

This revision is now accepted and ready to land.Feb 25 2021, 11:32 AM
vinograd47 retitled this revision from [mlir][NFC] Rename `MemRefType::getMemorySpace` to `getMemorySpaceInteger` to [mlir][NFC] Rename `MemRefType::getMemorySpace` to `getMemorySpaceAsInt`.
vinograd47 edited the summary of this revision. (Show Details)

Use getMemorySpaceAsInt instead of getMemorySpaceInteger.

vinograd47 added inline comments.Feb 26 2021, 8:18 AM
mlir/include/mlir/IR/BuiltinTypes.h
296

@rriddle I've replaced it with getMemorySpaceAsInt, which is a bit shorter version of getMemorySpaceAsInteger. Are you OK with this?

mehdi_amini accepted this revision.Feb 27 2021, 9:53 AM