This is an archive of the discontinued LLVM Phabricator instance.

[mlir][llvm] Add experimental alias scope decl intrinsic.
ClosedPublic

Authored by gysit on Mar 21 2023, 1:35 AM.

Details

Summary

The revision adds the llvm.experimental.noalias.scope.decl intrinsic
to the LLVM dialect and updates the import and export accordingly.

Diff Detail

Event Timeline

gysit created this revision.Mar 21 2023, 1:35 AM
Herald added a reviewer: dcaballe. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
gysit requested review of this revision.Mar 21 2023, 1:35 AM
Dinistro accepted this revision.Mar 21 2023, 6:53 AM

LGTM, modulo minor comments.

mlir/include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td
174

If I understand this correctly, we use this function to explicitly create a list of scopes, even though there is only one element. The Lang Ref specifies this in this manner, but I would like to see a comment somewhere that explains this unexpected handling.

mlir/test/Target/LLVMIR/Import/metadata-alias-scopes.ll
85

Shouldn't these scopes be in the beginning, i.e., before the first usage of the !2?

mlir/test/Target/LLVMIR/llvmir.mlir
2019–2020

That's in general a nice test improvement, thanks.

2037

Again, shouldn't this be at the beginning of the basic block?

This revision is now accepted and ready to land.Mar 21 2023, 6:53 AM
gysit updated this revision to Diff 506983.Mar 21 2023, 7:59 AM
gysit marked 4 inline comments as done.

Address review comments.

gysit added inline comments.Mar 21 2023, 8:02 AM
mlir/test/Target/LLVMIR/Import/metadata-alias-scopes.ll
85

Yes I that makes sense and seems to be more inline with the examples in the language reference.

This revision was automatically updated to reflect the committed changes.