1212
1313source_filename = "coro.c"
1414
15- declare void @bar (...) local_unnamed_addr #2
16- declare void @baz (...) local_unnamed_addr #2
15+ declare void @bar (...) local_unnamed_addr #0
16+ declare void @baz (...) local_unnamed_addr #0
1717
1818; Roughly equivalent to:
1919;
@@ -27,16 +27,16 @@ declare void @baz(...) local_unnamed_addr #2
2727; }
2828
2929; Function Attrs: nounwind uwtable
30- define ptr @f () #3 !dbg !16 {
30+ define ptr @f () #2 !dbg !16 {
3131entry:
3232 %0 = tail call token @llvm.coro.id (i32 0 , ptr null , ptr @f , ptr null ), !dbg !26
3333 %1 = tail call i64 @llvm.coro.size.i64 (), !dbg !26
3434 %frame = tail call ptr @malloc (i64 %1 ), !dbg !26
35- %2 = tail call ptr @llvm.coro.begin (token %0 , ptr %frame ) #4 , !dbg !26
35+ %2 = tail call ptr @llvm.coro.begin (token %0 , ptr %frame ) #3 , !dbg !26
3636 br label %loop1 , !dbg !27
3737
3838loop1: ; preds = %for.cond, %entry
39- tail call void (...) @bar () #7 , !dbg !33
39+ tail call void (...) @bar () #0 , !dbg !33
4040 %3 = tail call token @llvm.coro.save (ptr null ), !dbg !34
4141 %4 = tail call i8 @llvm.coro.suspend (token %3 , i1 false ), !dbg !34
4242 switch i8 %4 , label %coro_Suspend [
@@ -45,7 +45,7 @@ loop1: ; preds = %for.cond, %entry
4545 ], !dbg !34
4646
4747loop2: ; preds = %for.cond, %entry
48- tail call void (...) @baz () #7 , !dbg !35
48+ tail call void (...) @baz () #0 , !dbg !35
4949 %5 = tail call token @llvm.coro.save (ptr null ), !dbg !36
5050 %6 = tail call i8 @llvm.coro.suspend (token %5 , i1 false ), !dbg !36
5151 switch i8 %6 , label %coro_Suspend [
@@ -59,7 +59,7 @@ coro_Cleanup: ; preds = %for.cond
5959 br label %coro_Suspend , !dbg !37
6060
6161coro_Suspend: ; preds = %for.cond, %if.then, %coro_Cleanup
62- tail call i1 @llvm.coro.end (ptr null , i1 false , token none) #4 , !dbg !40
62+ tail call i1 @llvm.coro.end (ptr null , i1 false , token none) #3 , !dbg !40
6363 ret ptr %2 , !dbg !41
6464}
6565
@@ -94,27 +94,23 @@ coro_Suspend: ; preds = %for.cond, %if.then,
9494
9595
9696; Function Attrs: argmemonly nounwind readonly
97- declare token @llvm.coro.id (i32 , ptr readnone , ptr nocapture readonly , ptr ) #5
97+ declare token @llvm.coro.id (i32 , ptr readnone , ptr nocapture readonly , ptr ) #4
9898
9999; Function Attrs: nounwind
100- declare noalias ptr @malloc (i64 ) local_unnamed_addr #6
100+ declare noalias ptr @malloc (i64 ) local_unnamed_addr #0
101101declare i64 @llvm.coro.size.i64 () #1
102- declare ptr @llvm.coro.begin (token, ptr writeonly ) #7
103- declare token @llvm.coro.save (ptr ) #7
104- declare i8 @llvm.coro.suspend (token, i1 ) #7
105- declare ptr @llvm.coro.free (token, ptr nocapture readonly ) #5
106- declare void @free (ptr nocapture ) local_unnamed_addr #6
107- declare i1 @llvm.coro.end (ptr , i1 , token) #7
108-
109- attributes #0 = { nounwind uwtable "correctly-rounded-divide-sqrt-fp-math" = "false" "disable-tail-calls" = "false" "less-precise-fpmad" = "false" "frame-pointer" = "none" "no-infs-fp-math" = "false" "no-jump-tables" = "false" "no-nans-fp-math" = "false" "no-signed-zeros-fp-math" = "false" "no-trapping-math" = "false" "stack-protector-buffer-size" = "8" "target-cpu" = "x86-64" "target-features" = "+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math" = "false" "use-soft-float" = "false" }
102+ declare ptr @llvm.coro.begin (token, ptr writeonly ) #0
103+ declare token @llvm.coro.save (ptr ) #0
104+ declare i8 @llvm.coro.suspend (token, i1 ) #0
105+ declare ptr @llvm.coro.free (token, ptr nocapture readonly ) #4
106+ declare void @free (ptr nocapture ) local_unnamed_addr #0
107+ declare i1 @llvm.coro.end (ptr , i1 , token) #0
108+
109+ attributes #0 = { nounwind }
110110attributes #1 = { nounwind readnone }
111- attributes #2 = { "correctly-rounded-divide-sqrt-fp-math" ="false" "disable-tail-calls" ="false" "less-precise-fpmad" ="false" "frame-pointer" ="none" "no-infs-fp-math" ="false" "no-nans-fp-math" ="false" "no-signed-zeros-fp-math" ="false" "no-trapping-math" ="false" "stack-protector-buffer-size" ="8" "target-cpu" ="x86-64" "target-features" ="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math" ="false" "use-soft-float" ="false" }
112- attributes #3 = { nounwind uwtable presplitcoroutine "correctly-rounded-divide-sqrt-fp-math" ="false" "disable-tail-calls" ="false" "less-precise-fpmad" ="false" "frame-pointer" ="none" "no-infs-fp-math" ="false" "no-jump-tables" ="false" "no-nans-fp-math" ="false" "no-signed-zeros-fp-math" ="false" "no-trapping-math" ="false" "stack-protector-buffer-size" ="8" "target-cpu" ="x86-64" "target-features" ="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math" ="false" "use-soft-float" ="false" }
113- attributes #4 = { noduplicate }
114- attributes #5 = { argmemonly nounwind readonly }
115- attributes #6 = { nounwind "correctly-rounded-divide-sqrt-fp-math" ="false" "disable-tail-calls" ="false" "less-precise-fpmad" ="false" "frame-pointer" ="none" "no-infs-fp-math" ="false" "no-nans-fp-math" ="false" "no-signed-zeros-fp-math" ="false" "no-trapping-math" ="false" "stack-protector-buffer-size" ="8" "target-cpu" ="x86-64" "target-features" ="+fxsr,+mmx,+sse,+sse2,+x87" "unsafe-fp-math" ="false" "use-soft-float" ="false" }
116- attributes #7 = { nounwind }
117- attributes #8 = { alwaysinline nounwind }
111+ attributes #2 = { nounwind uwtable presplitcoroutine }
112+ attributes #3 = { noduplicate }
113+ attributes #4 = { argmemonly nounwind readonly }
118114
119115!llvm.dbg.cu = !{!0 }
120116!llvm.module.flags = !{!3 , !4 }
0 commit comments