From 7856cfa7ef3dba9ef9cd1640ee2a30018b855f7c Mon Sep 17 00:00:00 2001 From: Tres Popp Date: Wed, 23 Mar 2022 03:20:47 -0700 Subject: [PATCH] Add func namespace in MLIR files This will eventually be required rather than having an implicit namespace. PiperOrigin-RevId: 436692939 --- test/default_sequence.mlir | 4 ++-- test/inline_trivial_sair_ops.mlir | 4 ++-- test/integration/sair_to_llvm.mlir | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/default_sequence.mlir b/test/default_sequence.mlir index c0c7279e..9810227b 100644 --- a/test/default_sequence.mlir +++ b/test/default_sequence.mlir @@ -201,7 +201,7 @@ func @fby_many_compute(%arg0: f32) -> f32 { %8 = sair.proj_last of[d0:%0] %3(d0) : #sair.shape>, f32 sair.exit %8 : f32 } : f32 - return %out : f32 + func.return %out : f32 } // CHECK-LABEL: @fby_two_cycles @@ -238,7 +238,7 @@ func @fby_two_cycles(%arg0: f32) -> f32 { : #sair.shape x d1:static_range<42>>, f32 sair.exit %9 : f32 } : f32 - return %out : f32 + func.return %out : f32 } // CHECK-LABEL: @fby_then_different_source diff --git a/test/inline_trivial_sair_ops.mlir b/test/inline_trivial_sair_ops.mlir index 67500359..330f8198 100644 --- a/test/inline_trivial_sair_ops.mlir +++ b/test/inline_trivial_sair_ops.mlir @@ -20,7 +20,7 @@ func @one_map() -> f32 { sair.exit %3 : f32 } : f32 // CHECK: return %[[v3]] : f32 - return %1 : f32 + func.return %1 : f32 } // CHECK-LABEL: @sequence @@ -43,7 +43,7 @@ func @sequence() -> f32 { sair.exit %2 : f32 } : f32 // CHECK: return %[[v3]] : f32 - return %6 : f32 + func.return %6 : f32 } // CHECK-LABEL: @do_nothing diff --git a/test/integration/sair_to_llvm.mlir b/test/integration/sair_to_llvm.mlir index ad01f7ed..9f2265cf 100644 --- a/test/integration/sair_to_llvm.mlir +++ b/test/integration/sair_to_llvm.mlir @@ -28,7 +28,7 @@ func @check_memrefs_equal(%lhs: memref<8xi32>, %rhs: memref<8xi32>) -> f32 { cf.cond_br %6, ^bb0(%3 : index), ^bb2(%c0f : f32) ^bb2(%7: f32): - return %7 : f32 + func.return %7 : f32 } func @from_scalar() -> f32 { @@ -37,7 +37,7 @@ func @from_scalar() -> f32 { %1 = sair.from_scalar %0 : !sair.value<(), f32> sair.exit %1 : f32 } : f32 - return %2 : f32 + func.return %2 : f32 } func @from_to_memref() -> f32 { @@ -75,5 +75,5 @@ func @from_to_memref() -> f32 { // Check that %0 and %1 are equal. %2 = call @check_memrefs_equal(%0, %1) : (memref<8xi32>, memref<8xi32>) -> f32 - return %2 : f32 + func.return %2 : f32 }