diff --git a/mlir/include/mlir/Dialect/Func/IR/FuncOps.td b/mlir/include/mlir/Dialect/Func/IR/FuncOps.td --- a/mlir/include/mlir/Dialect/Func/IR/FuncOps.td +++ b/mlir/include/mlir/Dialect/Func/IR/FuncOps.td @@ -23,6 +23,7 @@ let cppNamespace = "::mlir::func"; let dependentDialects = ["cf::ControlFlowDialect"]; let hasConstantMaterializer = 1; + let usePropertiesForAttributes = 1; } // Base class for Func dialect ops. diff --git a/mlir/test/IR/print-ir-invalid.mlir b/mlir/test/IR/print-ir-invalid.mlir --- a/mlir/test/IR/print-ir-invalid.mlir +++ b/mlir/test/IR/print-ir-invalid.mlir @@ -8,10 +8,9 @@ // The operation is invalid because the body does not have a terminator, print // the generic form. // CHECK: Invalid operation: -// CHECK-NEXT: "func.func"() ({ +// CHECK-NEXT: "func.func"() <{function_type = () -> (), sym_name = "test"}> ({ // CHECK-NEXT: ^bb0: // CHECK-NEXT: }) -// CHECK-SAME: sym_name = "test" // The operation is valid because the body has a terminator, print the custom // form. diff --git a/mlir/test/IR/wrapping_op.mlir b/mlir/test/IR/wrapping_op.mlir --- a/mlir/test/IR/wrapping_op.mlir +++ b/mlir/test/IR/wrapping_op.mlir @@ -3,6 +3,7 @@ // CHECK-LABEL: func @wrapping_op // CHECK-GENERIC: "func.func" +// CHECK-GENERIC-SAME: sym_name = "wrapping_op" func.func @wrapping_op(%arg0 : i32, %arg1 : f32) -> (i3, i2, i1) { // CHECK: %0:3 = test.wrapping_region wraps "some.op"(%arg1, %arg0) {test.attr = "attr"} : (f32, i32) -> (i1, i2, i3) // CHECK-GENERIC: "test.wrapping_region"() ({ @@ -12,4 +13,3 @@ %res:3 = test.wrapping_region wraps "some.op"(%arg1, %arg0) { test.attr = "attr" } : (f32, i32) -> (i1, i2, i3) loc("some_NameLoc") return %res#2, %res#1, %res#0 : i3, i2, i1 } -// CHECK-GENERIC: sym_name = "wrapping_op" diff --git a/mlir/test/mlir-lsp-server/hover.test b/mlir/test/mlir-lsp-server/hover.test --- a/mlir/test/mlir-lsp-server/hover.test +++ b/mlir/test/mlir-lsp-server/hover.test @@ -114,7 +114,7 @@ // CHECK-NEXT: "result": { // CHECK-NEXT: "contents": { // CHECK-NEXT: "kind": "markdown", -// CHECK-NEXT: "value": "\"func.func\" : public @foo\n\nGeneric Form:\n\n```mlir\n\"func.func\"() ({...}) {function_type = (i1) -> (), sym_name = \"foo\"} : () -> ()\n```\n" +// CHECK-NEXT: "value": "\"func.func\" : public @foo\n\nGeneric Form:\n\n```mlir\n\"func.func\"() <{function_type = (i1) -> (), sym_name = \"foo\"}> ({...}) : () -> ()\n```\n" // CHECK-NEXT: }, // CHECK-NEXT: "range": { // CHECK-NEXT: "end": { @@ -138,7 +138,7 @@ // CHECK-NEXT: "result": { // CHECK-NEXT: "contents": { // CHECK-NEXT: "kind": "markdown", -// CHECK-NEXT: "value": "\"func.func\" : public @foo\n\nGeneric Form:\n\n```mlir\n\"func.func\"() ({...}) {function_type = (i1) -> (), sym_name = \"foo\"} : () -> ()\n```\n" +// CHECK-NEXT: "value": "\"func.func\" : public @foo\n\nGeneric Form:\n\n```mlir\n\"func.func\"() <{function_type = (i1) -> (), sym_name = \"foo\"}> ({...}) : () -> ()\n```\n" // CHECK-NEXT: }, // CHECK-NEXT: "range": { // CHECK-NEXT: "end": {