[PATCH] D74440: [mlir][SideEffects] Enable specifying side effects directly on the arguments/results of an operation.

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 11 13:18:52 PST 2020


rriddle created this revision.
rriddle added reviewers: mehdi_amini, jpienaar.
Herald added subscribers: llvm-commits, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, nicolasvasilache, antiagainst, shauheen, burmako, mgorny.
Herald added a reviewer: antiagainst.
Herald added a project: LLVM.
rriddle added a child revision: D74441: [mlir][SideEffects] Replace the old SideEffects dialect interface with the newly added op interfaces/traits..

New classes are added to ODS to enable specifying additional information on the arguments and results of an operation. These classes, `Arg` and `Res` allow for adding a description and a set of 'decorators' along with the constraint. This enables specifying the side effects of an operation directly on the arguments and results themselves.

Example:

  def LoadOp : Std_Op<"load"> {
    let arguments = (ins Arg<"The MemRef to load from.", AnyMemRef,
                             [MemRead]>:$memref,
                         Variadic<Index>:$indices);
  }

Depends On D74439 <https://reviews.llvm.org/D74439>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74440

Files:
  mlir/include/mlir/IR/OpBase.td
  mlir/include/mlir/IR/SideEffects.td
  mlir/include/mlir/TableGen/Operator.h
  mlir/include/mlir/TableGen/SideEffects.h
  mlir/lib/TableGen/CMakeLists.txt
  mlir/lib/TableGen/Operator.cpp
  mlir/lib/TableGen/SideEffects.cpp
  mlir/test/mlir-tblgen/op-side-effects.td
  mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74440.243972.patch
Type: text/x-patch
Size: 17094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200211/9557692f/attachment.bin>


More information about the llvm-commits mailing list