This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Move AtomicRMW into MemRef dialect and enum into Arith
ClosedPublic

Authored by wsmoses on Dec 29 2021, 10:02 PM.

Details

Summary

Per the discussion in https://reviews.llvm.org/D116345 it makes sense
to move AtomicRMWOp out of the standard dialect. This was accentuated by the
need to add a fold op with a memref::cast. The only dialect
that would permit this is the memref dialect (keeping it in the standard dialect
or moving it to the arithmetic dialect would require those dialects to have a
dependency on the memref dialect, which breaks linking).

As the AtomicRMWKind enum is used throughout, this has been moved to Arith.

Diff Detail

Event Timeline

wsmoses created this revision.Dec 29 2021, 10:02 PM
wsmoses requested review of this revision.Dec 29 2021, 10:02 PM
wsmoses updated this revision to Diff 396608.Dec 29 2021, 10:38 PM

Move LLVM conversion test

Mogball requested changes to this revision.Dec 30 2021, 9:22 AM

LGTM but blocking until at least Monday when folks are back to integrate this change into their repos

mlir/lib/Dialect/StandardOps/Transforms/ExpandOps.cpp
43

These patterns should be split into a new expand-memref-ops pass. Although if it's too painful to do (splitting some of the passes is), that can be kicked down the road.

This revision now requires changes to proceed.Dec 30 2021, 9:22 AM

LGTM but blocking until at least Monday when folks are back to integrate this change into their repos

We don't block on stuff like this (sometimes people can be nice and try and stage commits, but that doesn't seem applicable for this patch).

This revision is now accepted and ready to land.Dec 30 2021, 10:58 AM
mlir/include/mlir/Dialect/StandardOps/IR/Ops.td