[PATCH] D76036: [mlir][SideEffects] Replace HasNoSideEffect with the memory effect interfaces.

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 11 17:03:52 PDT 2020


rriddle created this revision.
rriddle added reviewers: mehdi_amini, jpienaar.
Herald added subscribers: llvm-commits, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, csigg, nicolasvasilache, antiagainst, shauheen, burmako.
Herald added a reviewer: mravishankar.
Herald added a reviewer: nicolasvasilache.
Herald added a reviewer: herhut.
Herald added a reviewer: antiagainst.
Herald added a project: LLVM.

HasNoSideEffect can now be implemented using the MemoryEffectInterface, removing the need to check multiple things for the same information. This also removes an easy foot-gun for users as 'Operation::hasNoSideEffect' would ignore operations that dynamically, or recursively, have no side effects. This also leads to an immediate improvement in some of the existing users, such as DCE, now that they have access to more information.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D76036

Files:
  mlir/docs/Traits.md
  mlir/docs/Tutorials/Toy/Ch-2.md
  mlir/include/mlir/IR/Operation.h
  mlir/include/mlir/IR/OperationSupport.h
  mlir/include/mlir/Interfaces/SideEffects.h
  mlir/include/mlir/Interfaces/SideEffects.td
  mlir/include/mlir/TableGen/SideEffects.h
  mlir/include/mlir/Transforms/FoldUtils.h
  mlir/lib/Analysis/Utils.cpp
  mlir/lib/Conversion/LoopsToGPU/LoopsToGPU.cpp
  mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
  mlir/lib/Dialect/LoopOps/Transforms/ParallelLoopFusion.cpp
  mlir/lib/Interfaces/SideEffects.cpp
  mlir/lib/TableGen/SideEffects.cpp
  mlir/lib/Transforms/CSE.cpp
  mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
  mlir/lib/Transforms/Utils/FoldUtils.cpp
  mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
  mlir/lib/Transforms/Utils/LoopUtils.cpp
  mlir/lib/Transforms/Utils/RegionUtils.cpp
  mlir/test/Transforms/canonicalize.mlir
  mlir/test/mlir-tblgen/op-decl.td
  mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76036.249803.patch
Type: text/x-patch
Size: 27867 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200312/c958df1a/attachment.bin>


More information about the llvm-commits mailing list