[PATCH] D75888: [mlir][SideEffects] Mark the CFG only terminator operations as NoSideEffect

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 9 19:26:18 PDT 2020


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

These terminator operations don't really have any side effects, and this allows for more accurate side-effect analysis for region operations. For example, currently we can't detect like a loop.for or affine.for are dead because the affine.terminator is "side effecting".

Note: Marking as NoSideEffect doesn't mean that these operations can be opaquely erased.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D75888

Files:
  mlir/examples/toy/Ch2/include/toy/Ops.td
  mlir/examples/toy/Ch3/include/toy/Ops.td
  mlir/examples/toy/Ch4/include/toy/Ops.td
  mlir/examples/toy/Ch5/include/toy/Ops.td
  mlir/examples/toy/Ch6/include/toy/Ops.td
  mlir/examples/toy/Ch7/include/toy/Ops.td
  mlir/include/mlir/Dialect/AffineOps/AffineOps.td
  mlir/include/mlir/Dialect/GPU/GPUOps.td
  mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
  mlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
  mlir/include/mlir/Dialect/LoopOps/LoopOps.td
  mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
  mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
  mlir/lib/Transforms/CSE.cpp
  mlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
  mlir/lib/Transforms/Utils/LoopUtils.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D75888.249266.patch
Type: text/x-patch
Size: 13335 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200310/7fe9a125/attachment.bin>


More information about the llvm-commits mailing list