[llvm-branch-commits] [llvm] [LLVM][Coroutines] Transform "coro_must_elide" calls to switch ABI coroutines to the `noalloc` variant (PR #99285)

Yuxuan Chen via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Aug 21 15:37:31 PDT 2024


================
@@ -968,8 +969,8 @@ PassBuilder::buildInlinerPipeline(OptimizationLevel Level,
   // it's been modified since.
   MainCGPipeline.addPass(createCGSCCToFunctionPassAdaptor(
       RequireAnalysisPass<ShouldNotRunFunctionPassesAnalysis, Function>()));
-
   MainCGPipeline.addPass(CoroSplitPass(Level != OptimizationLevel::O0));
+  MainCGPipeline.addPass(CoroAnnotationElidePass());
----------------
yuxuanchen1997 wrote:

I applied this suggestion. However, looking at the `buildModuleInlinerPipeline`. It looks like it uses an adapter that runs single CGSCC pass on every function in the module. This won't work well for `CoroAnnotationElidePass` actually. It depends on the callee to be split, but not the caller. 

Thinking about this, this is actually the same condition as the old `CoroElidePass`. Maybe the right thing to do here is to make this pass a function pass instead and use `createCGSCCToFunctionPassAdaptor`. What do you think?

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


More information about the llvm-branch-commits mailing list