Skip to content

Commit 19b664d

Browse files
authored
[Coroutine][DebugInfo] Remove the memory attributes on coro-async-declaration.ll (NFC) (llvm#66088)
According to @drodriguez's reminder in #7168 (comment), `memory` breaks the backport to the apple branch. And this is irrelevant to that test. Delete to get better a test case.
1 parent 8b8841e commit 19b664d

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

llvm/test/Transforms/Coroutines/coro-async-declaration.ll

+3-16
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ entry:
2828
%4 = load i32, ptr getelementptr inbounds (%swift.async_func_pointer, ptr @"$s3foo1fyyYaFTu", i32 0, i32 1), align 8, !dbg !10
2929
%5 = zext i32 %4 to i64, !dbg !10
3030
%6 = call swiftcc ptr @swift_task_alloc(i64 %5), !dbg !10
31-
call void @llvm.lifetime.start.p0(i64 -1, ptr %6), !dbg !10
3231
%7 = load ptr, ptr %1, align 8, !dbg !10
3332
%8 = getelementptr inbounds <{ ptr, ptr }>, ptr %6, i32 0, i32 0, !dbg !10
3433
store ptr %7, ptr %8, align 8, !dbg !10
@@ -40,7 +39,6 @@ entry:
4039
%13 = call ptr @__swift_async_resume_project_context(ptr %12), !dbg !10
4140
store ptr %13, ptr %1, align 8, !dbg !10
4241
call swiftcc void @swift_task_dealloc(ptr %6), !dbg !10
43-
call void @llvm.lifetime.end.p0(i64 -1, ptr %6), !dbg !10
4442
%14 = load ptr, ptr %1, align 8, !dbg !11
4543
%15 = getelementptr inbounds <{ ptr, ptr }>, ptr %14, i32 0, i32 1, !dbg !11
4644
%16 = load ptr, ptr %15, align 8, !dbg !11
@@ -52,21 +50,15 @@ entry:
5250
; Function Attrs: nounwind
5351
declare token @llvm.coro.id.async(i32, i32, i32, ptr) #0
5452

55-
; Function Attrs: cold noreturn nounwind memory(inaccessiblemem: write)
56-
declare void @llvm.trap() #1
57-
5853
; Function Attrs: nounwind
5954
declare ptr @llvm.coro.begin(token, ptr writeonly) #0
6055

6156
declare swifttailcc void @"$s3foo1fyyYaF"(ptr swiftasync)
6257

6358
declare swiftcc ptr @swift_task_alloc(i64)
6459

65-
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
66-
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2
67-
6860
; Function Attrs: nomerge nounwind
69-
declare ptr @llvm.coro.async.resume() #3
61+
declare ptr @llvm.coro.async.resume() #1
7062

7163
define linkonce_odr hidden ptr @__swift_async_resume_project_context(ptr %0) !dbg !12 {
7264
entry:
@@ -86,13 +78,10 @@ entry:
8678
}
8779

8880
; Function Attrs: nomerge nounwind
89-
declare { ptr } @llvm.coro.suspend.async.sl_p0s(i32, ptr, ptr, ...) #3
81+
declare { ptr } @llvm.coro.suspend.async.sl_p0s(i32, ptr, ptr, ...) #1
9082

9183
declare swiftcc void @swift_task_dealloc(ptr)
9284

93-
; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
94-
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2
95-
9685
define internal swifttailcc void @"$s3foo3FooO3baryyYaF.0.1"(ptr %0, ptr %1) !dbg !17 {
9786
entry:
9887
musttail call swifttailcc void %0(ptr swiftasync %1), !dbg !18
@@ -103,9 +92,7 @@ entry:
10392
declare i1 @llvm.coro.end.async(ptr, i1, ...) #0
10493

10594
attributes #0 = { nounwind }
106-
attributes #1 = { cold noreturn nounwind memory(inaccessiblemem: write) }
107-
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
108-
attributes #3 = { nomerge nounwind }
95+
attributes #1 = { nomerge nounwind }
10996

11097
!llvm.dbg.cu = !{!0}
11198
!llvm.module.flags = !{!3, !4}

0 commit comments

Comments
 (0)