From bbaad416a11bf7a978b3324803968e27633bf07b Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Thu, 12 Nov 2020 10:42:05 -0800 Subject: [PATCH] [MLIR] Update tests to eliminate public function declarations. - Also fixed kernel_gen embed_memref_prints to mark the declarations inserted private. - This is in prep for proposed MLIR change to disallow public declarations. PiperOrigin-RevId: 342081252 --- tests/end2end/broadcast.mlir | 4 ++-- tests/end2end/legalize-trigonometric-to-approximation.mlir | 2 +- tests/end2end/reduce.mlir | 2 +- tests/ops.mlir | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/end2end/broadcast.mlir b/tests/end2end/broadcast.mlir index e2b71c7..9d9a2df 100644 --- a/tests/end2end/broadcast.mlir +++ b/tests/end2end/broadcast.mlir @@ -20,8 +20,8 @@ func @main() -> () { return } -func @print_memref_i8(memref<*xi8>) attributes { llvm.emit_c_interface } -func @print_memref_f32(memref<*xf32>) attributes { llvm.emit_c_interface } +func private @print_memref_i8(memref<*xi8>) attributes { llvm.emit_c_interface } +func private @print_memref_f32(memref<*xf32>) attributes { llvm.emit_c_interface } func @trivial_broadcast_wrapper() { %input_buf = alloc() : memref<3xf32> diff --git a/tests/end2end/legalize-trigonometric-to-approximation.mlir b/tests/end2end/legalize-trigonometric-to-approximation.mlir index a7e77b7..346c865 100644 --- a/tests/end2end/legalize-trigonometric-to-approximation.mlir +++ b/tests/end2end/legalize-trigonometric-to-approximation.mlir @@ -1,6 +1,6 @@ // RUN: mlir-hlo-opt %s --mhlo-legalize-trigonometric-to-approximation --convert-std-to-llvm | mlir-cpu-runner -e main -entry-point-result=void --shared-libs=%mlir_runner_utils_dir/libmlir_runner_utils%shlibext | FileCheck %s -func @print_memref_f32(memref<*xf32>) attributes { llvm.emit_c_interface } +func private @print_memref_f32(memref<*xf32>) attributes { llvm.emit_c_interface } // Helper function to print scalar values. func @print_f32(%arg : f32) { diff --git a/tests/end2end/reduce.mlir b/tests/end2end/reduce.mlir index 9b8b100..c5d652a 100644 --- a/tests/end2end/reduce.mlir +++ b/tests/end2end/reduce.mlir @@ -14,7 +14,7 @@ func @main() -> () { return } -func @print_memref_f32(memref<*xf32>) attributes { llvm.emit_c_interface } +func private @print_memref_f32(memref<*xf32>) attributes { llvm.emit_c_interface } func @reduce_add() { %c0 = constant 0 : index diff --git a/tests/ops.mlir b/tests/ops.mlir index 49b6d3c..5a0e545 100644 --- a/tests/ops.mlir +++ b/tests/ops.mlir @@ -3,13 +3,13 @@ // Tests for types, ops with custom constraints, verifiers, printer or parser // methods. -// CHECK-LABEL: func @token_type() -> !mhlo.token -func @token_type() -> !mhlo.token +// CHECK-LABEL: func private @token_type() -> !mhlo.token +func private @token_type() -> !mhlo.token // ----- // expected-error@+1 {{unknown mhlo type: foobar}} -func @invalid_type() -> !mhlo.foobar +func private @invalid_type() -> !mhlo.foobar // -----