This is an archive of the discontinued LLVM Phabricator instance.

[mlir][llvm] Fuse MD_access_group & MD_loop import
ClosedPublic

Authored by Dinistro on Feb 8 2023, 5:53 AM.

Details

Summary

This commit moves the importing logic of access group metadata into the
loop annotation importer. These two metadata imports can be grouped
because access groups are only used in combination with
llvm.loop.parallel_accesses.

As a nice side effect, this commit decouples the LoopAnnotationImporter
from the ModuleImport class.

Diff Detail

Event Timeline

Dinistro created this revision.Feb 8 2023, 5:53 AM
Herald added a project: Restricted Project. · View Herald Transcript
Dinistro requested review of this revision.Feb 8 2023, 5:53 AM
gysit accepted this revision.Feb 8 2023, 10:43 AM

nice! LGTM modulo doc comments.

mlir/lib/Target/LLVMIR/LoopAnnotationImporter.h
26

nit: I would drop the back ticks here since they are usually used to document function parameters, e.g.:

... and llvm.access.group metadata nodes into AccessGroupMetadataOps.

34–35

It sounds like we create the operations twice here, maybe:

Converts all LLVM access groups starting from node to MLIR access group operations nested in the region of metadataOp.

35

nit: node

This revision is now accepted and ready to land.Feb 8 2023, 10:43 AM
Dinistro updated this revision to Diff 496044.Feb 9 2023, 1:26 AM
Dinistro marked 3 inline comments as done.

address review comments

This revision was automatically updated to reflect the committed changes.