[PATCH] D71903: [Coroutines][6/6] Clang schedules new passes

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 30 12:42:45 PST 2019


wenlei added inline comments.


================
Comment at: clang/lib/CodeGen/BackendUtil.cpp:1228
+          MPM.addPass(createModuleToFunctionPassAdaptor(CoroElidePass()));
+          MPM.addPass(createModuleToPostOrderCGSCCPassAdaptor(CoroSplitPass()));
+          MPM.addPass(createModuleToFunctionPassAdaptor(CoroCleanupPass()));
----------------
Manually scheduling the 2nd coro-split passes in the same CGSCC pipeline would make the resume/suspend funclet ineligible for the bulk of CSGSS opts, given the split point is relatively early. The implication would be discouraging the use of coroutine in performance critical path. I would love to see this being addressed before we claim coroutine is ready for new PM.

As commented in the 2nd patch, we may not need the devirt trick used with legacy PM, instead for new PM, we could try to leverage `CGSCCUpdateResult` without involving artificial indirect call and devirt (or follow how outlining is handled by new PM).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71903/new/

https://reviews.llvm.org/D71903





More information about the llvm-commits mailing list