[llvm] [Coroutines] Make CoroSplit properly update CallGraph (PR #107935)

Chuanqi Xu via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 19:04:16 PDT 2024


================
@@ -2080,12 +2080,13 @@ splitCoroutine(Function &F, SmallVectorImpl<Function *> &Clones,
   return Shape;
 }
 
-static void updateCallGraphAfterCoroutineSplit(
+static LazyCallGraph::SCC &updateCallGraphAfterCoroutineSplit(
     LazyCallGraph::Node &N, const coro::Shape &Shape,
     const SmallVectorImpl<Function *> &Clones, LazyCallGraph::SCC &C,
     LazyCallGraph &CG, CGSCCAnalysisManager &AM, CGSCCUpdateResult &UR,
     FunctionAnalysisManager &FAM) {
----------------
ChuanqiXu9 wrote:

nit: the signature is slightly odd to me. It looks better to make it the below `CurrentSCC` to be an output parameter of the function. So that we can avoid the odd the pattern

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


More information about the llvm-commits mailing list