This is an archive of the discontinued LLVM Phabricator instance.

[mlir][ArmSVE] Add basic load/store operations
ClosedPublic

Authored by jsetoain on Jun 2 2021, 9:40 AM.

Details

Summary

ArmSVE-specific memory operations are needed to generate end-to-end
code for as long as MLIR core doesn't support scalable vectors. This
instructions will be eventually unnecessary, for now they're required
for more complex testing.

Diff Detail

Event Timeline

jsetoain created this revision.Jun 2 2021, 9:40 AM
jsetoain published this revision for review.Jun 2 2021, 9:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2021, 9:42 AM
ftynse requested changes to this revision.Jun 4 2021, 4:29 AM
ftynse added inline comments.
mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
123–126

I don't think this works. Derived patterns never call this function and override matchAndRewrite, the default implementation of which would have called match then rewrite, but it is not called either.

This revision now requires changes to proceed.Jun 4 2021, 4:29 AM
Matt added a subscriber: Matt.Jun 4 2021, 9:28 AM
Matt added inline comments.Jun 4 2021, 9:32 AM
mlir/include/mlir/Dialect/ArmSVE/ArmSVE.td
380

s/on/to/

jsetoain updated this revision to Diff 349929.Jun 4 2021, 11:23 AM

Fixed legality check on memref

jsetoain marked 2 inline comments as done.Jun 4 2021, 11:27 AM
jsetoain added inline comments.
mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
123–126

This should fix it, now I make sure that the check is performed in the readAndRewrite method.

jsetoain updated this revision to Diff 349931.Jun 4 2021, 11:38 AM
jsetoain marked an inline comment as done.

Clang format...

ftynse accepted this revision.Jun 7 2021, 1:22 AM
This revision is now accepted and ready to land.Jun 7 2021, 1:22 AM
aartbik accepted this revision.Jun 7 2021, 2:02 PM
aartbik added inline comments.
mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
114

super nit: the ing forms read a bit hard

How about:

The load operation is lowered to code that obtains ... and loads

150

same

jsetoain updated this revision to Diff 350839.Jun 9 2021, 3:15 AM

Rebase to main and address comments

jsetoain marked 2 inline comments as done.Jun 9 2021, 3:17 AM
This revision was landed with ongoing or failed builds.Jun 9 2021, 8:04 AM
This revision was automatically updated to reflect the committed changes.