[Mlir-commits] [mlir] 44226c1 - [mlir] Mark witness related Shape dialect ops as NoSideEffect.

Tres Popp llvmlistbot at llvm.org
Wed May 20 01:26:54 PDT 2020


Author: Tres Popp
Date: 2020-05-20T10:26:35+02:00
New Revision: 44226c1fea7b5aa407e7e0a17cf71cab9082fd0f

URL: https://github.com/llvm/llvm-project/commit/44226c1fea7b5aa407e7e0a17cf71cab9082fd0f
DIFF: https://github.com/llvm/llvm-project/commit/44226c1fea7b5aa407e7e0a17cf71cab9082fd0f.diff

LOG: [mlir] Mark witness related Shape dialect ops as NoSideEffect.

Differential Revision: https://reviews.llvm.org/D80179

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td b/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
index 074a54f9e5ae..d06a1cea781b 100644
--- a/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
+++ b/mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
@@ -369,7 +369,7 @@ def Shape_ConcatOp : Shape_Op<"concat",
 
 //TODO(tpopp): Move the code below and witnesses to a 
diff erent file.
 def Shape_AnyOp : Shape_Op<"any",
-    [DeclareOpInterfaceMethods<InferTypeOpInterface>]> {
+    [NoSideEffect, DeclareOpInterfaceMethods<InferTypeOpInterface>]> {
   let summary = "Return any combination of the input shapes.";
   let description = [{
     This operation takes multiple input shapes and returns some combination of
@@ -389,7 +389,7 @@ def Shape_AnyOp : Shape_Op<"any",
   let results = (outs Shape_ShapeType:$result);
 }
 
-def Shape_AssumingAllOp : Shape_Op<"assuming_all", []> {
+def Shape_AssumingAllOp : Shape_Op<"assuming_all", [NoSideEffect]> {
   let summary = "Return a logical AND of all witnesses.";
   let description = [{
     Used to simplify constraints as any single failing precondition is enough


        


More information about the Mlir-commits mailing list