[clang] [llvm] Introduce -defer-thinlto-prelink-coro-split that skips Coro passes in ThinLTO pre-link pipeline (PR #107153)

Wei Wang via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 4 11:47:54 PDT 2024


apolloww wrote:

> I don't know much about the Coro handling, but this not only makes it conditional but changes the default - what should the default behavior be?

Default behavior: Coro passes were always run in pre-link pipeline. Since all the coro intrinsics are lowered, the output bitcode object file can be fed into codegen directly or optimized by custom pipeline that does not have coro passes. 

With #100205, they are postponed to post-link pipeline in order to take advantage of cross-module inlining for better CoroElide. However this creates a discrepancy from the default behavior: user now must run both pre-link and post-link pipelines (or custom pipeline with coro passes) before running codegen.

So this change tries to move back the default behavior unless user explicitly wants coro pass to happen in post-link and makes sure the build process is set up properly.

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


More information about the cfe-commits mailing list