diff --git a/mlir/include/mlir/IR/OpImplementation.h b/mlir/include/mlir/IR/OpImplementation.h --- a/mlir/include/mlir/IR/OpImplementation.h +++ b/mlir/include/mlir/IR/OpImplementation.h @@ -1347,10 +1347,6 @@ return AliasResult::NoAlias; } - /// Get a special name to use when printing the given operation. See - /// OpAsmInterface.td#getAsmResultNames for usage details and documentation. - virtual void getAsmResultNames(Operation *op, - OpAsmSetValueNameFn setNameFn) const {} }; } // namespace mlir diff --git a/mlir/lib/IR/AsmPrinter.cpp b/mlir/lib/IR/AsmPrinter.cpp --- a/mlir/lib/IR/AsmPrinter.cpp +++ b/mlir/lib/IR/AsmPrinter.cpp @@ -1071,8 +1071,6 @@ if (!printerFlags.shouldPrintGenericOpForm()) { if (OpAsmOpInterface asmInterface = dyn_cast(&op)) asmInterface.getAsmResultNames(setResultNameFn); - else if (auto *asmInterface = interfaces.getInterfaceFor(op.getDialect())) - asmInterface->getAsmResultNames(&op, setResultNameFn); } // If the first result wasn't numbered, give it a default number. diff --git a/mlir/test/IR/parser.mlir b/mlir/test/IR/parser.mlir --- a/mlir/test/IR/parser.mlir +++ b/mlir/test/IR/parser.mlir @@ -1209,18 +1209,15 @@ func private @nested_reference() attributes {test.ref = @some_symbol::@some_nested_symbol } // CHECK-LABEL: func @custom_asm_names -func @custom_asm_names() -> (i32, i32, i32, i32, i32, i32, i32) { +func @custom_asm_names() -> (i32, i32, i32, i32, i32, i32) { // CHECK: %[[FIRST:first.*]], %[[MIDDLE:middle_results.*]]:2, %[[LAST:[0-9]+]] %0, %1:2, %2 = "test.asm_interface_op"() : () -> (i32, i32, i32, i32) // CHECK: %[[FIRST_2:first.*]], %[[LAST_2:[0-9]+]] %3, %4 = "test.asm_interface_op"() : () -> (i32, i32) - // CHECK: %[[RESULT:result.*]] - %5 = "test.asm_dialect_interface_op"() : () -> (i32) - // CHECK: return %[[FIRST]], %[[MIDDLE]]#0, %[[MIDDLE]]#1, %[[LAST]], %[[FIRST_2]], %[[LAST_2]] - return %0, %1#0, %1#1, %2, %3, %4, %5 : i32, i32, i32, i32, i32, i32, i32 + return %0, %1#0, %1#1, %2, %3, %4 : i32, i32, i32, i32, i32, i32 } diff --git a/mlir/test/lib/Dialect/Test/TestDialect.cpp b/mlir/test/lib/Dialect/Test/TestDialect.cpp --- a/mlir/test/lib/Dialect/Test/TestDialect.cpp +++ b/mlir/test/lib/Dialect/Test/TestDialect.cpp @@ -99,12 +99,6 @@ } return AliasResult::NoAlias; } - - void getAsmResultNames(Operation *op, - OpAsmSetValueNameFn setNameFn) const final { - if (auto asmOp = dyn_cast(op)) - setNameFn(asmOp, "result"); - } }; struct TestDialectFoldInterface : public DialectFoldInterface {