[PATCH] D80179: [mlir] Mark witness related Shape dialect ops as NoSideEffect.
Stephan Herhut via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 19 02:08:29 PDT 2020
herhut added inline comments.
================
Comment at: mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td:428
-def Shape_CstrBroadcastableOp : Shape_Op<"cstr_broadcastable", []> {
+def Shape_CstrBroadcastableOp : Shape_Op<"cstr_broadcastable", [NoSideEffect]> {
let summary = "Determines if 2 shapes can be successfully broadcasted.";
----------------
Marking these as `NoSideEffect` is dangerous. If their witness value goes unused, they will just disappear as the are considered dead at that point. That is likely not what we want.
================
Comment at: mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td:449
-def Shape_CstrEqOp : Shape_Op<"cstr_eq", []> {
+def Shape_CstrEqOp : Shape_Op<"cstr_eq", [NoSideEffect]> {
let summary = "Determines if all input shapes are equal.";
----------------
Same here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80179/new/
https://reviews.llvm.org/D80179
More information about the llvm-commits
mailing list