This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Refactor memref type -> LLVM Type conversion
ClosedPublic

Authored by jurahul on Nov 3 2020, 12:08 PM.

Details

Summary
  • Eliminate duplicated information about mapping from memref -> its descriptor fields by consolidating that mapping in two functions: getMemRefDescriptorFields and getUnrankedMemRefDescriptorFields.
  • Change convertMemRefType() and convertUnrankedMemRefType() to use these functions.
  • Remove convertMemrefSignature and convertUnrankedMemrefSignature.

Diff Detail

Event Timeline

jurahul created this revision.Nov 3 2020, 12:08 PM
jurahul requested review of this revision.Nov 3 2020, 12:08 PM
ftynse accepted this revision.Nov 4 2020, 4:41 AM
ftynse added inline comments.
mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
284–285

Let's move this comment below the constants. It belongs to the function.

(Note that it is also redundant with the comment on the function declaration)

357

Nit: unpacked -> unpack

This revision is now accepted and ready to land.Nov 4 2020, 4:41 AM
jurahul updated this revision to Diff 302851.Nov 4 2020, 8:14 AM
jurahul marked 2 inline comments as done.

Address comments

This revision was automatically updated to reflect the committed changes.