This patch has four dependencies:
- The first in this series of patches that implement coroutine passes in the new pass manager: https://reviews.llvm.org/D71898.
- A patch that introduces an API for CGSCC passes to add new reference edges to a LazyCallGraph, updateCGAndAnalysisManagerForCGSCCPass: https://reviews.llvm.org/D72025.
- A patch that introduces a CallGraphUpdater helper class that is capable of mutating internal LazyCallGraph state in order to insert new function nodes into a specific SCC: https://reviews.llvm.org/D70927.
- And finally, a small edge case fix for updating LazyCallGraph that patch 3 above happens to run into: https://reviews.llvm.org/D72226.
This is the second in a series of patches that ports the LLVM coroutines
passes to the new pass manager infrastructure. This patch implements
- Using the new CGSCC pass manager resulted in IR being printed in the reverse order in some tests. To prevent FileCheck checks from failing due to these reversed orders, this patch splits up test files that test multiple different coroutine functions: specifically coro-alloc-with-param.ll, coro-split-eh.ll, and coro-eh-aware-edge-split.ll.
- CoroSplit.cpp contained 2 overloads of splitCoroutine, one of which dispatched to the other based on the coroutine ABI being used (C++20 switch-based versus Swift returned-continuation-based). I found this confusing, especially with the additional branching based on CallGraph vs. LazyCallGraph, so I removed the ABI-checking overload of splitCoroutine.