This is an archive of the discontinued LLVM Phabricator instance.

[mlir][LLVM] Handle access groups during inlining
ClosedPublic

Authored by zero9178 on Jul 20 2023, 12:54 AM.

Details

Summary

Handling access groups is luckily rather trivial: Any access groups from the call instruction are simply appended to any memory operations.
This is similar to one of the steps when handling alias scopes.
This patch nevertheless implements it as a separate function purely for readability purposes as it uses a different interface than alias scopes.

Diff Detail

Event Timeline

zero9178 created this revision.Jul 20 2023, 12:54 AM
Herald added a reviewer: dcaballe. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
zero9178 requested review of this revision.Jul 20 2023, 12:54 AM
gysit accepted this revision.Jul 20 2023, 1:29 AM

LGTM modulo minor comment.

mlir/test/Dialect/LLVMIR/inlining.mlir
588

Can you maybe add another memory operation in the caller that is also marked with the #caller interface. That way we test the same access group is used for both operations.

This revision is now accepted and ready to land.Jul 20 2023, 1:29 AM
This revision was landed with ongoing or failed builds.Jul 20 2023, 1:46 AM
This revision was automatically updated to reflect the committed changes.
zero9178 marked an inline comment as done.