[Mlir-commits] [mlir] 63e72aa - [MLIR] Remove NoSideEffect from std.global_memref op.

Rahul Joshi llvmlistbot at llvm.org
Wed Nov 4 10:31:47 PST 2020


Author: Rahul Joshi
Date: 2020-11-04T10:31:19-08:00
New Revision: 63e72aa4f575bf2a3405fb7c5e4450efe2ee3e4f

URL: https://github.com/llvm/llvm-project/commit/63e72aa4f575bf2a3405fb7c5e4450efe2ee3e4f
DIFF: https://github.com/llvm/llvm-project/commit/63e72aa4f575bf2a3405fb7c5e4450efe2ee3e4f.diff

LOG: [MLIR] Remove NoSideEffect from std.global_memref op.

- Also spell "isUninitialized" correctly.

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

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
    mlir/lib/Dialect/StandardOps/IR/Ops.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
index 999119f51880..e88cb655f63f 100644
--- a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
+++ b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td
@@ -2009,7 +2009,7 @@ def FPTruncOp : CastOp<"fptrunc">, Arguments<(ins AnyType:$in)> {
 // GlobalMemrefOp
 //===----------------------------------------------------------------------===//
 
-def GlobalMemrefOp : Std_Op<"global_memref", [NoSideEffect, Symbol]> {
+def GlobalMemrefOp : Std_Op<"global_memref", [Symbol]> {
   let summary = "declare or define a global memref variable";
   let description = [{
     The `global_memref` operation declares or defines a named global variable.
@@ -2062,7 +2062,7 @@ def GlobalMemrefOp : Std_Op<"global_memref", [NoSideEffect, Symbol]> {
 
   let extraClassDeclaration = [{
      bool isExternal() { return !initial_value(); }
-     bool isUnitialized() {
+     bool isUninitialized() {
        return !isExternal() && initial_value().getValue().isa<UnitAttr>();
      }
   }];

diff  --git a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
index 8c9a1bba3125..264f93443a82 100644
--- a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
+++ b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp
@@ -2169,7 +2169,7 @@ static void printGlobalMemrefOpTypeAndInitialValue(OpAsmPrinter &p,
   p << type;
   if (!op.isExternal()) {
     p << " = ";
-    if (op.isUnitialized())
+    if (op.isUninitialized())
       p << "uninitialized";
     else
       p.printAttributeWithoutType(initialValue);


        


More information about the Mlir-commits mailing list