[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 21:06:50 PDT 2020


rriddle added inline comments.


================
Comment at: mlir/lib/Dialect/LoopOps/Transforms/ParallelLoopFusion.cpp:152
+      auto effects = dyn_cast<MemoryEffectOpInterface>(&op);
+      noSideEffects &= (effects && effects.hasNoEffect());
     }
----------------
mehdi_amini wrote:
> I see this pattern frequently, could it be a static helper on `MemoryEffectOpInterface`?
> ```
> bool MemoryEffectOpInterface::hasNoEffect(Operation *);
> ```
Funnily enough, I had that at the beginning but lost it somewhere. Added back.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76036/new/

https://reviews.llvm.org/D76036





More information about the llvm-commits mailing list