diff --git a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td --- a/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td +++ b/mlir/include/mlir/Dialect/StandardOps/IR/Ops.td @@ -2009,7 +2009,7 @@ // 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 @@ let extraClassDeclaration = [{ bool isExternal() { return !initial_value(); } - bool isUnitialized() { + bool isUninitialized() { return !isExternal() && initial_value().getValue().isa(); } }]; diff --git a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp --- a/mlir/lib/Dialect/StandardOps/IR/Ops.cpp +++ b/mlir/lib/Dialect/StandardOps/IR/Ops.cpp @@ -2163,7 +2163,7 @@ p << type; if (!op.isExternal()) { p << " = "; - if (op.isUnitialized()) + if (op.isUninitialized()) p << "uninitialized"; else p.printAttributeWithoutType(initialValue);