This is an archive of the discontinued LLVM Phabricator instance.

[mlir][llvm] Fuse access_group & loop export (NFC)
ClosedPublic

Authored by Dinistro on Feb 17 2023, 3:02 AM.

Details

Summary

This commit moves the access group translation into the
LoopAnnotationTranslation class as these two metadata kinds only appear
together.

Drops the access group cleanup from ModuleTranslation::forgetMapping
as this is only used on function regions. Access groups only appear in the
region of a global metadata operation and will thus not be cleaned here.

Analogous to https://reviews.llvm.org/D143577

Diff Detail

Event Timeline

Dinistro created this revision.Feb 17 2023, 3:02 AM
Herald added a project: Restricted Project. · View Herald Transcript
Dinistro requested review of this revision.Feb 17 2023, 3:02 AM
gysit added inline comments.Feb 17 2023, 4:13 AM
mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
335–338

Is this still used? I would have expected this can be deleted now?

mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
452

can this be deleted since the access group metadata ops only exist in metadata operation regions?

gysit added a comment.Feb 17 2023, 4:14 AM

Also should this be an NFC commit?

Also should this be an NFC commit?

That depends on the definition of NFC. It removes public member functions, so in theory it has a functional change for potential downstream users. On the other hand, this does not change any upstream LLVMIR export behavior.

mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
452

Exactly. Should I mention this in the commit message?

gysit added a comment.Feb 17 2023, 4:24 AM

Also should this be an NFC commit?

That depends on the definition of NFC. It removes public member functions, so in theory it has a functional change for potential downstream users. On the other hand, this does not change any upstream LLVMIR export behavior.

The standard definition is usually if there is a test that changed, which is not the case here. However, it is a corner case since the public API changed.

Exactly. Should I mention this in the commit message?

Yes that would be good.

Dinistro updated this revision to Diff 498332.Feb 17 2023, 4:31 AM
Dinistro marked 2 inline comments as done.
Dinistro retitled this revision from [mlir][llvm] Fuse MD_access_group & MD_loop export to [mlir][llvm] Fuse access_group & loop export (NFC).

address review comments

Dinistro edited the summary of this revision. (Show Details)Feb 17 2023, 4:33 AM
Dinistro added inline comments.
mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
335–338

Good catch

gysit accepted this revision.Feb 17 2023, 4:50 AM

LGTM

This revision is now accepted and ready to land.Feb 17 2023, 4:50 AM
This revision was automatically updated to reflect the committed changes.