1 ; REQUIRES: llvm_inliner_model_autogenerated
2 ; RUN: opt -S -passes='coro-early,scc-oz-module-inliner,print<inline-advisor>' \
3 ; RUN: -enable-ml-inliner=release -keep-inline-advisor-for-printing < %s
5 define void @_Z5get_sv() presplitcoroutine {
6 %1 = call token @llvm.coro.id(i32 0, ptr null, ptr null, ptr null)
7 %2 = call ptr @llvm.coro.begin(token %1, ptr null)
8 %3 = call token @llvm.coro.save(ptr null)
9 %4 = call i8 @llvm.coro.suspend(token none, i1 false)
10 call void @_ZN1S12promise_typeD2Ev()
14 declare token @llvm.coro.id(i32, ptr readnone, ptr nocapture readonly, ptr)
15 declare ptr @llvm.coro.begin(token, ptr writeonly)
16 declare token @llvm.coro.save(ptr)
17 declare i8 @llvm.coro.suspend(token, i1)
19 declare void @__clang_call_terminate()
21 define void @_ZN1S12promise_typeD2Ev() personality ptr null {
22 invoke void @_Z4funcv()
23 to label %1 unwind label %2
29 %3 = landingpad { ptr, i32 }
31 call void @__clang_call_terminate()
34 declare void @_Z4funcv()
36 ; CHECK: [MLInlineAdvisor] FuncLevels:
37 ; CHECK-NEXT: _Z5get_sv : 1
38 ; CHECK-NEXT: _ZN1S12promise_typeD2Ev : 0
39 ; CHECK-NEXT: _Z5get_sv.resume : 1
40 ; CHECK-NEXT: _Z5get_sv.destroy : 1
41 ; CHECK-NEXT: _Z5get_sv.cleanup : 1