@@ -171,9 +171,9 @@ func.func @func_without_tensor_args(%v : vector<10xf32>) -> () {
171171// Bufferization of a function that is reading and writing. %t0 is writable, so
172172// no copy should be inserted.
173173
174- // CHECK-LABEL: func @inner_func(
174+ // CHECK-LABEL: func private @inner_func(
175175// CHECK-SAME: %[[arg0:.*]]: memref<?xf32
176- func.func @inner_func (%t: tensor <?xf32 >) -> (tensor <?xf32 >, f32 ) {
176+ func.func private @inner_func (%t: tensor <?xf32 >) -> (tensor <?xf32 >, f32 ) {
177177 // CHECK-NOT: copy
178178 %f = arith.constant 1.0 : f32
179179 %c0 = arith.constant 0 : index
@@ -186,9 +186,9 @@ func.func @inner_func(%t: tensor<?xf32>) -> (tensor<?xf32>, f32) {
186186 return %0 , %1 : tensor <?xf32 >, f32
187187}
188188
189- // CHECK-LABEL: func @call_func_with_non_tensor_return(
189+ // CHECK-LABEL: func private @call_func_with_non_tensor_return(
190190// CHECK-SAME: %[[arg0:.*]]: memref<?xf32
191- func.func @call_func_with_non_tensor_return (
191+ func.func private @call_func_with_non_tensor_return (
192192 %t0: tensor <?xf32 > {bufferization.writable = true }) -> (f32 , tensor <?xf32 >) {
193193 // CHECK-NOT: alloc
194194 // CHECK-NOT: copy
@@ -203,9 +203,9 @@ func.func @call_func_with_non_tensor_return(
203203// Bufferization of a function that is reading and writing. %t0 is not writable,
204204// so a copy is needed.
205205
206- // CHECK-LABEL: func @inner_func(
206+ // CHECK-LABEL: func private @inner_func(
207207// CHECK-SAME: %[[arg0:.*]]: memref<?xf32
208- func.func @inner_func (%t: tensor <?xf32 >) -> (tensor <?xf32 >, f32 ) {
208+ func.func private @inner_func (%t: tensor <?xf32 >) -> (tensor <?xf32 >, f32 ) {
209209 // CHECK-NOT: copy
210210 %f = arith.constant 1.0 : f32
211211 %c0 = arith.constant 0 : index
@@ -276,10 +276,10 @@ func.func @main(%t: tensor<?xf32> {bufferization.writable = false}) -> (f32) {
276276
277277// This function does not read, just write. We need an alloc, but no copy.
278278
279- // CHECK-LABEL: func @does_not_read(
279+ // CHECK-LABEL: func private @does_not_read(
280280// CHECK-NOT: alloc
281281// CHECK-NOT: copy
282- func.func @does_not_read (%t: tensor <?xf32 >) -> tensor <?xf32 > {
282+ func.func private @does_not_read (%t: tensor <?xf32 >) -> tensor <?xf32 > {
283283 %f0 = arith.constant 0.0 : f32
284284 %r = linalg.fill ins (%f0 : f32 ) outs (%t : tensor <?xf32 >) -> tensor <?xf32 >
285285 return %r : tensor <?xf32 >
@@ -354,9 +354,9 @@ func.func @main() {
354354
355355// A write inside an scf.execute_region. An equivalent tensor is yielded.
356356
357- // CHECK-LABEL: func @execute_region_test(
357+ // CHECK-LABEL: func private @execute_region_test(
358358// CHECK-SAME: %[[m1:.*]]: memref<?xf32
359- func.func @execute_region_test (%t1 : tensor <?xf32 >)
359+ func.func private @execute_region_test (%t1 : tensor <?xf32 >)
360360 -> (f32 , tensor <?xf32 >, f32 )
361361{
362362 %f1 = arith.constant 0.0 : f32
@@ -397,11 +397,11 @@ func.func @no_inline_execute_region_not_canonicalized() {
397397// CHECK: func private @some_external_func(memref<?xf32, strided<[?], offset: ?>>)
398398func.func private @some_external_func (tensor <?xf32 >)
399399
400- // CHECK: func @scf_for_with_tensor_insert_slice(
400+ // CHECK: func private @scf_for_with_tensor_insert_slice(
401401// CHECK-SAME: %[[A:[a-zA-Z0-9]*]]: memref<?xf32, strided<[?], offset: ?>>
402402// CHECK-SAME: %[[B:[a-zA-Z0-9]*]]: memref<?xf32, strided<[?], offset: ?>>
403403// CHECK-SAME: %[[C:[a-zA-Z0-9]*]]: memref<4xf32, strided<[?], offset: ?>>
404- func.func @scf_for_with_tensor_insert_slice (
404+ func.func private @scf_for_with_tensor_insert_slice (
405405 %A : tensor <?xf32 >, %B : tensor <?xf32 >, %C : tensor <4 xf32 >,
406406 %lb : index , %ub : index , %step : index )
407407 -> (tensor <?xf32 >, tensor <?xf32 >)
@@ -456,11 +456,11 @@ func.func @bar(
456456
457457// -----
458458
459- // CHECK: func @init_and_dot(
459+ // CHECK: func private @init_and_dot(
460460// CHECK-SAME: %[[A:[a-zA-Z0-9]*]]: memref<64xf32, strided<[?], offset: ?>>
461461// CHECK-SAME: %[[B:[a-zA-Z0-9]*]]: memref<64xf32, strided<[?], offset: ?>>
462462// CHECK-SAME: %[[C:[a-zA-Z0-9]*]]: memref<f32, strided<[], offset: ?>>
463- func.func @init_and_dot (%a: tensor <64 xf32 >, %b: tensor <64 xf32 >, %c: tensor <f32 >) -> tensor <f32 > {
463+ func.func private @init_and_dot (%a: tensor <64 xf32 >, %b: tensor <64 xf32 >, %c: tensor <f32 >) -> tensor <f32 > {
464464 // CHECK-NEXT: %[[C0:.*]] = arith.constant 0{{.*}} : f32
465465 %v0 = arith.constant 0.0 : f32
466466
@@ -574,9 +574,9 @@ func.func @entry(%A : tensor<?xf32> {bufferization.buffer_layout = affine_map<(i
574574
575575// No alloc or copy inside of the loop.
576576
577- // CHECK-LABEL: func @inner_func(
577+ // CHECK-LABEL: func private @inner_func(
578578// CHECK-SAME: %[[arg0:.*]]: memref<?xf32
579- func.func @inner_func (%t: tensor <?xf32 >) -> tensor <?xf32 > {
579+ func.func private @inner_func (%t: tensor <?xf32 >) -> tensor <?xf32 > {
580580 %f = arith.constant 1.0 : f32
581581 %c0 = arith.constant 0 : index
582582 // CHECK: memref.store %{{.*}}, %[[arg0]]
0 commit comments