This is an archive of the discontinued LLVM Phabricator instance.

[mlir][vector] Add memory effects to transfer_read transfer_write ops
ClosedPublic

Authored by ThomasRaoux on Jan 8 2021, 9:53 AM.

Details

Summary

This allow more accurate modeling of the side effects and allow dead code elimination to remove dead transfer ops.

Diff Detail

Event Timeline

ThomasRaoux created this revision.Jan 8 2021, 9:53 AM
ThomasRaoux requested review of this revision.Jan 8 2021, 9:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 8 2021, 9:53 AM

do we need similar extensions for the other load/store flavors (masked load/store, gather/scatter, compress/expand)?
[if so, please let's wait until my CL is in to avoid conflicts, since I have been making some mods to those ops]

mlir/test/Conversion/VectorToSCF/vector-to-loops.mlir
25

Add a slightly more clarifying comment on why that is here, below too

mlir/test/Dialect/Vector/canonicalize.mlir
671

can you indent this line up with the other parameters?

ThomasRaoux added a comment.EditedJan 8 2021, 11:12 AM

do we need similar extensions for the other load/store flavors (masked load/store, gather/scatter, compress/expand)?
[if so, please let's wait until my CL is in to avoid conflicts, since I have been making some mods to those ops]

We do need to mark those as well, it looks like right now DCE wouldn't be able to remove a dead masked_load for instance. If those ops are not going to be expanded to tensor it can done in a slightly simpler way, we can just add MemRead<$base> to the properties directly in tablegen. I can definitely wait and update all of them once your patch lands.

Address review comments.

ThomasRaoux marked 2 inline comments as done.Jan 8 2021, 11:13 AM
nicolasvasilache accepted this revision.Jan 8 2021, 11:31 AM
This revision is now accepted and ready to land.Jan 8 2021, 11:31 AM
aartbik accepted this revision.Jan 8 2021, 11:39 AM