[clang] [llvm] [coro] Lower `llvm.coro.await.suspend.handle` to resume with tail call (PR #89751)

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 08:03:27 PDT 2024


================
@@ -40,10 +38,8 @@ exit:
 
 ; Verify that in the resume part resume call is marked with musttail.
 ; CHECK-LABEL: @f.resume(
-; CHECK: %[[addr2:.+]] = call ptr @llvm.coro.subfn.addr(ptr null, i8 0)
-; NOPGO-NEXT: musttail call fastcc void %[[addr2]](ptr null)
-; PGO: call void @llvm.instrprof
----------------
zmodem wrote:

These `llvm.instrprof.value.profile` calls between the `llvm.coro.subfn.addr` call and tail call disappear with my patch. That's because the test runs `pgo-instr-gen` before `coro-split`. Is that representative of how the normal pipeline looks?

If the instrumentation is done after coro-split, it will see the indirect call and add the `llvm.instrprof.value.profile` as expected.

https://github.com/llvm/llvm-project/pull/89751


More information about the llvm-commits mailing list