[llvm] [Coroutines][LazyCallGraph] resumes are not really SCC (PR #116285)
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 9 16:41:59 PST 2025
================
@@ -1720,6 +1720,7 @@ void LazyCallGraph::addSplitRefRecursiveFunctions(
for (Function *NewFunction : NewFunctions) {
Node &NewN = initNode(*NewFunction);
+ // Make the original function reference each new function
----------------
aeubanks wrote:
regarding being conservative and adding ref edges where they don't actually exist, we should avoid that if possible. in general having the LazyCallGraph not match the actual IR is something that we should really not be doing. we actually do [allow spurious ref edges](https://github.com/llvm/llvm-project/blob/5d88a84ecddab3471693e44b57a1c1f21ce14f3f/llvm/include/llvm/Analysis/LazyCallGraph.h#L534) as a special case but we shouldn't rely on that if possible unless the alternatives are bad.
I think following the inliner pass and using `updateCGAndAnalysisManagerForCGSCCPass()` to update the call graph automatically after running simplify-cfg is the conceptually cleanest way of doing this unless I'm missing something
https://github.com/llvm/llvm-project/pull/116285
More information about the llvm-commits
mailing list